Skip to content

Allow cryptography 46.x version and move it to dev dependencies.#98

Merged
mridang merged 3 commits intozitadel:betafrom
danielhav:patch-1
Feb 27, 2026
Merged

Allow cryptography 46.x version and move it to dev dependencies.#98
mridang merged 3 commits intozitadel:betafrom
danielhav:patch-1

Conversation

@danielhav
Copy link
Contributor

@danielhav danielhav commented Feb 2, 2026

  • Updates the dependency "cryptography" to be able to use the most recent stable version (which is currently 46.0.4).
  • Move the cryptography dependency into the dev group as its only used in a test (test/auth/test_web_token_authenticator.py)

Description

This is also part of the latest "uv-version-updates" dependabot PR but I don't know what your plans are with those.

We wouldn't be able to use the client-python without this version bump so I kindly ask you to update it for the next (or one of the next) beta releases.

Related Issue

#97

Motivation and Context

We wouldn't be able to use the client-python without this version bump so I kindly ask you to update it for the next (or one of the next) beta releases.

How Has This Been Tested?

Check out the project, modify pyproject.toml accordingly and run uv run pytest.

Documentation:

I don't think doc updates are needed here?

Checklist:

  • I have updated the documentation accordingly.
  • I have assigned the correct milestone or created one if non-existent.
  • I have correctly labeled this pull request.
  • [ X ] I have linked the corresponding issue in this description.
  • I have requested a review from at least 2 reviewers
  • I have checked the base branch of this pull request
  • [ X ] I have checked my code for any possible security vulnerabilities

This is also part of the latest "uv-version-updates" dependabot PR but I don't know what your plans are with those.

We wouldn't be able to use the client-python without this version bump so I kindly ask you to update it for the next (or one of the next) beta releases.
`cryptography` is only used in `test/auth/test_web_token_authenticator.py`
@danielhav danielhav changed the title Allow cryptography 46.x version. Allow cryptography 46.x version and move it to dev dependencies. Feb 2, 2026
@danielhav danielhav changed the title Allow cryptography 46.x version and move it to dev dependencies. Allow cryptography 46.x version and move it to dev dependencies. Feb 2, 2026
@Lauszus
Copy link

Lauszus commented Feb 2, 2026

Would be great to get this merged. It's blocking me from updating other dependencies in my project.

@d0rianb
Copy link

d0rianb commented Feb 20, 2026

Any update on this ?

@mridang mridang self-assigned this Feb 27, 2026
@mridang mridang requested review from Copilot and mridang February 27, 2026 00:33
@mridang mridang added the enhancement New feature or request label Feb 27, 2026
@mridang
Copy link
Collaborator

mridang commented Feb 27, 2026

I'm checking this now.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts dependency management for the Python SDK by relocating cryptography from runtime dependencies to the dev dependency group, with the stated intent of supporting newer cryptography versions and reflecting that it’s only used in tests.

Changes:

  • Remove cryptography from [project].dependencies.
  • Add cryptography to [dependency-groups].dev with the same version range (>=44.0.1,<47.0.0).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 31 to 33
dev = [
"cryptography>=44.0.1,<47.0.0",
"pytest>=7.2.1",
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description/title mention a version bump to allow 46.x, but the cryptography specifier here remains >=44.0.1,<47.0.0 (just moved groups). If the goal is to relax constraints for downstreams, moving it to dev may actually remove the constraint entirely for consumers; please confirm the intended behavior and adjust the constraint location/range accordingly.

Copilot uses AI. Check for mistakes.
Comment on lines 15 to 22
dependencies = [
"urllib3>=1.25.3,<3.0.0",
"python-dateutil>=2.8.2",
"pydantic>=2",
"typing-extensions>=4.7.1",
"authlib>=1.3.2,<2.0.0",
"cryptography>=44.0.1,<47.0.0",
"requests>=2.32.4,<3.0.0",
]
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving cryptography out of [project].dependencies means the published package no longer constrains the runtime cryptography version for consumers. Since authlib depends on cryptography without a version specifier (see uv.lock), installers may resolve to a newer major cryptography than the SDK has been validated against, which can break JWT signing used by WebTokenAuthenticator. Consider keeping an explicit runtime constraint in [project].dependencies, or introducing an optional extra (e.g. jwt) that includes cryptography with a bounded range, rather than relying on the transitive dependency.

Copilot uses AI. Check for mistakes.
@mridang mridang added bug Something isn't working and removed enhancement New feature or request labels Feb 27, 2026
@mridang mridang merged commit 64f0e3d into zitadel:beta Feb 27, 2026
5 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 27, 2026
# [4.1.0-beta.9](v4.1.0-beta.8...v4.1.0-beta.9) (2026-02-27)

### Bug Fixes

* allow `cryptography` 46.x version and move it to `dev` dependencies. ([#98](#98)) ([64f0e3d](64f0e3d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants