Skip to content

python3Packages.aiohttp-swagger: fix tests - #391551

Closed
taranarmo wants to merge 2 commits into
NixOS:masterfrom
taranarmo:aiohttp-swagger-fix-tests
Closed

taranarmo wants to merge 2 commits into
NixOS:masterfrom
taranarmo:aiohttp-swagger-fix-tests

Conversation

@taranarmo

@taranarmo taranarmo commented Mar 20, 2025

Copy link
Copy Markdown
Contributor

During attempt to build apache-airflow 2.10.5 I faced failed tests on aiohttp-swagger package build due to unset asyncio_default_fixture_loop_scope option which is now deprecated
pytest-dev/pytest-asyncio#924
This PR sets it with environmental variable.

This is also included in #396544.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 20, 2025
@taranarmo taranarmo mentioned this pull request Apr 6, 2025
13 tasks
@taranarmo
taranarmo force-pushed the aiohttp-swagger-fix-tests branch from b82211e to e52f335 Compare May 5, 2025 12:53
@ofborg ofborg Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 5, 2025
@taranarmo

Copy link
Copy Markdown
Contributor Author

@jopejoe1 I'm sorry to bother but seems like this fixes tests for python3Packages.aiohttp-swagger which you recently disabled. Can you take a look?

I rebased the branch on the last commit before deleting tests and it built successfully.

@jopejoe1

jopejoe1 commented May 5, 2025

Copy link
Copy Markdown
Member

You probly want to do a revert commit before your commit so that there is no longer a merge conflict

Comment thread pkgs/development/python-modules/aiohttp-swagger/default.nix Outdated
@taranarmo
taranarmo force-pushed the aiohttp-swagger-fix-tests branch from e52f335 to 2ebeeda Compare May 6, 2025 07:45
@ofborg ofborg Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 6, 2025
@taranarmo

taranarmo commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

Thank you for your help, I created a PR upstream to fix the tests and added those commits here as patches, now it builds fine.
cr0hn/aiohttp-swagger#108

@taranarmo
taranarmo force-pushed the aiohttp-swagger-fix-tests branch from 2ebeeda to 35284b3 Compare May 6, 2025 08:08
This reverts commit ba4935b.
Patches to fix tests are added in the previous commit
e1f478b738d5390cc553f851deb252f1e3cad2bd.
@mkg20001
mkg20001 force-pushed the aiohttp-swagger-fix-tests branch from 35284b3 to b2e59b0 Compare August 29, 2025 18:13
@mkg20001

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 391551
Commit: b2e59b0910cac42697fa100f73a1374b283c42f6


x86_64-linux

⏩ 2 packages marked as broken and skipped:
  • apache-airflow
  • apache-airflow.dist
❌ 4 packages failed to build:
  • python312Packages.aiohttp-swagger
  • python312Packages.aiohttp-swagger.dist
  • python313Packages.aiohttp-swagger
  • python313Packages.aiohttp-swagger.dist

Error logs: `x86_64-linux`
python312Packages.aiohttp-swagger
ERROR tests/test_openapi.py::test_wrong_method
ERROR tests/test_openapi.py::test_class_view
ERROR tests/test_openapi.py::test_data_defs
ERROR tests/test_openapi.py::test_sub_app
ERROR tests/test_swagger.py::test_ping
ERROR tests/test_swagger.py::test_swagger_ui
ERROR tests/test_swagger.py::test_swagger_ui3
ERROR tests/test_swagger.py::test_swagger_file_url
ERROR tests/test_swagger.py::test_partial_swagger_file
ERROR tests/test_swagger.py::test_custom_swagger
ERROR tests/test_swagger.py::test_swagger_home_decorator
ERROR tests/test_swagger.py::test_swagger_def_decorator
ERROR tests/test_swagger.py::test_swagger_info
ERROR tests/test_swagger.py::test_undocumented_fn
ERROR tests/test_swagger.py::test_wrong_method
ERROR tests/test_swagger.py::test_class_view_single_method
ERROR tests/test_swagger.py::test_class_view_multiple_methods
ERROR tests/test_swagger.py::test_data_defs
ERROR tests/test_swagger.py::test_sub_app
======================== 1 warning, 27 errors in 0.48s =========================
python313Packages.aiohttp-swagger
ERROR tests/test_openapi.py::test_wrong_method
ERROR tests/test_openapi.py::test_class_view
ERROR tests/test_openapi.py::test_data_defs
ERROR tests/test_openapi.py::test_sub_app
ERROR tests/test_swagger.py::test_ping
ERROR tests/test_swagger.py::test_swagger_ui
ERROR tests/test_swagger.py::test_swagger_ui3
ERROR tests/test_swagger.py::test_swagger_file_url
ERROR tests/test_swagger.py::test_partial_swagger_file
ERROR tests/test_swagger.py::test_custom_swagger
ERROR tests/test_swagger.py::test_swagger_home_decorator
ERROR tests/test_swagger.py::test_swagger_def_decorator
ERROR tests/test_swagger.py::test_swagger_info
ERROR tests/test_swagger.py::test_undocumented_fn
ERROR tests/test_swagger.py::test_wrong_method
ERROR tests/test_swagger.py::test_class_view_single_method
ERROR tests/test_swagger.py::test_class_view_multiple_methods
ERROR tests/test_swagger.py::test_data_defs
ERROR tests/test_swagger.py::test_sub_app
======================== 1 warning, 27 errors in 0.88s =========================

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 16, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 25, 2026
@taranarmo taranarmo closed this Mar 11, 2026
@taranarmo
taranarmo deleted the aiohttp-swagger-fix-tests branch March 11, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants