Skip to content

fix(pytest): move warning filters to pyproject and fix factory postgeneration warnings#3905

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/remove-wildcard-ignore-warnings
Open

fix(pytest): move warning filters to pyproject and fix factory postgeneration warnings#3905
Copilot wants to merge 3 commits intomasterfrom
copilot/remove-wildcard-ignore-warnings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

  • Relevant tickets: N/A
  • Conventional squash commit title: fix(pytest): move warning filters to pyproject and fix factory postgeneration warnings
  • Description: move pytest warning filters into pyproject.toml, remove the blanket deprecation ignore, and fix the CI / python-tests failures by setting skip_postgeneration_save = True on the affected factories
  • Screenshots: N/A (no UI changes)
  • How can this be tested?
    • pre-commit run --files users/factories.py cms/factories.py courses/factories.py ecommerce/factories.py
    • pytest hubspot_xpro/serializers_test.py::test_serialize_b2b_order[created] users/views_test.py::test_get_user_by_me[True-True] ecommerce/api_test.py::test_validate_basket_all_good[True] -q --no-cov
  • Additional context: the CI failures were caused by factory_boy postgeneration deprecation warnings being treated as errors after removing the blanket warning ignore

Agent-Logs-Url: https://github.com/mitodl/mitxpro/sessions/dbb0a43c-be3d-4eb6-93d8-f27ea03dd5d3

Co-authored-by: asadali145 <52656433+asadali145@users.noreply.github.com>
@asadali145
Copy link
Copy Markdown
Contributor

@copilot run pre-commit checks and fix the issues

Agent-Logs-Url: https://github.com/mitodl/mitxpro/sessions/bcc07426-b337-4f82-81be-a02a988a1fc6

Co-authored-by: asadali145 <52656433+asadali145@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot run pre-commit checks and fix the issues

Addressed in f65b2c7. I ran pre-commit run --all-files, fixed the detect-secrets failures from the new pytest config, installed the JS deps so the frontend hooks could run, and re-ran the checks. The only remaining failure is a pre-existing actionlint issue in .github/workflows/ci.yml, which is outside this PR’s scope.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https -I /usr/include/postgresql/16/server -I /usr/include/libxml2 --gdwarf-5 --64 hon3.13 build/temp.linux-x86_64-cpython-313/psycopg/replication_cursor_type.o /tmp/ccTLf9YK.s (dns block)
  • releases.astral.sh
    • Triggering command: /home/REDACTED/.local/bin/uv /home/REDACTED/.local/bin/uv sync --frozen --group dev (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@asadali145
Copy link
Copy Markdown
Contributor

@copilot look into the failing CI tests in CI / python-tests github action and make appropriate changes to fix the tests

Agent-Logs-Url: https://github.com/mitodl/mitxpro/sessions/37570578-0b1c-48ae-b692-0b17883706e1

Co-authored-by: asadali145 <52656433+asadali145@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot look into the failing CI tests in CI / python-tests github action and make appropriate changes to fix the tests

Addressed in 2894c28. I checked the failing CI / python-tests run, traced the failures to factory_boy postgeneration deprecation warnings being treated as errors, and updated the affected factories to set skip_postgeneration_save = True. I also re-ran representative failing tests locally against Postgres and they passed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https -I /usr/include/postgresql/16/server -I /usr/include/libxml2 --gdwarf-5 --64 hon3.13 build/temp.linux-x86_64-cpython-313/psycopg/replication_cursor_type.o /tmp/ccbTr2no.s nux-x86_64 bash --no�� ude (dns block)
  • releases.astral.sh
    • Triggering command: /home/REDACTED/.local/bin/uv /home/REDACTED/.local/bin/uv sync --frozen --group dev (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@asadali145
Copy link
Copy Markdown
Contributor

@copilot update the PR description to follow conventional commit messages to help with squash merge. Also, update the PR description as per the repo PR description format.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot update the PR description to follow conventional commit messages to help with squash merge. Also, update the PR description as per the repo PR description format.

Updated the PR description to match the repo template sections and added a conventional squash commit title suggestion: fix(pytest): move warning filters to pyproject and fix factory postgeneration warnings. Latest code change on the branch remains 2894c28.

@asadali145 asadali145 changed the title Move pytest warning filters into pyproject and remove blanket deprecation ignore fix(pytest): move warning filters to pyproject and fix factory postgeneration warnings May 7, 2026
@asadali145 asadali145 marked this pull request as ready for review May 7, 2026 12:03
@asadali145 asadali145 removed their request for review May 7, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants