Skip to content

Support Python 3.14#1725

Open
hmpf wants to merge 2 commits intomainfrom
python-314
Open

Support Python 3.14#1725
hmpf wants to merge 2 commits intomainfrom
python-314

Conversation

@hmpf
Copy link
Contributor

@hmpf hmpf commented Jan 14, 2026

Scope and purpose

Test and run on Python 3.14.

Depends on #1724

This pull request

  • adds/changes/removes a dependency

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
  • [ ] Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • [ ] Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • [ ] If this results in changes in the UI: Added screenshots of the before and after
  • [ ] If this results in changes to the database model: Updated the ER diagram

@hmpf hmpf added the dependencies Run `tox -r` before testing locally, dependencies have changed label Jan 14, 2026
@hmpf hmpf moved this from 📋 Backlog to 🏗 In progress in Argus development, public Jan 14, 2026
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Test results

    6 files    834 suites   1m 42s ⏱️
  657 tests   656 ✅ 1 💤 0 ❌
3 942 runs  3 936 ✅ 6 💤 0 ❌

Results for commit 764da52.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.47%. Comparing base (61b2109) to head (764da52).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1725   +/-   ##
=======================================
  Coverage   80.46%   80.47%           
=======================================
  Files         135      135           
  Lines        6399     6402    +3     
=======================================
+ Hits         5149     5152    +3     
  Misses       1250     1250           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hmpf hmpf self-assigned this Jan 14, 2026
@hmpf
Copy link
Contributor Author

hmpf commented Jan 15, 2026

This fails on:

Traceback (most recent call last):
  File "CENSORED/Argus/tests/dev/test_utils.py", line 11, in setUp
    self.stresstester = StressTester("http://localhost.com", "token", 10, 1)
                        ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "CENSORED/Argus/src/argus/dev/utils.py", line 36, in __init__
    self._loop = asyncio.get_event_loop()
                 ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.14/asyncio/events.py", line 715, in get_event_loop
    raise RuntimeError('There is no current event loop in thread %r.'
                       % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.

Your code, @stveit. I looked for solutions and found this:

@hmpf hmpf added the blocked Another thing/issue has to be resolved before tackling this label Jan 15, 2026
@hmpf
Copy link
Contributor Author

hmpf commented Jan 15, 2026

Finishing this is blocked because:

There's problems with the direct dependency pydantic on python 3.14. pydantic needs rpds which is a rust crate:

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      error: failed to parse lock file at: /tmp/pip-install-nl5ky0_r/rpds-py_0d5a219ec1dd4f848c74cefed920a494/Cargo.lock
      
      Caused by:
        lock file version `4` was found, but this version of Cargo does not understand this lock file, perhaps Cargo needs to be updated?
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-j0t4zoi_', '--interpreter', 'CENSORED/Argus/.tox/py314-django52/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-j0t4zoi_ --interpreter CENSORED/Argus/.tox/py314-django52/bin/python`
      [end of output]

It seems only argus depends on pydantic so worst case we could try switching to [cattrs](https://catt.rs/).

@hmpf hmpf requested a review from a team January 19, 2026 09:36
@hmpf hmpf moved this from 📋 Backlog to 🏗 In progress in Argus development, public Jan 21, 2026
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Another thing/issue has to be resolved before tackling this dependencies Run `tox -r` before testing locally, dependencies have changed

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

1 participant