Skip to content

Conversation

jemand771
Copy link
Member

@jemand771 jemand771 commented Aug 8, 2025

cgi and cgitb were removed with the 3.13 release of python. an (unsupported) replacement is available from pypi

also fix the pythonAtLeast condition for asyncore which was also removed with 3.13 (and not 3.12 like the current default.nix claims)

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

asyncore was removed with the 3.13 release of python.

3.12 still had it, hence we can patch "one version later"
cgi and cgitb were removed with the 3.13 release of python. an (unsupported) replacement is available from pypi
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 6.topic: python Python is a high-level, general-purpose programming language. labels Aug 8, 2025
@nix-owners nix-owners bot requested a review from clkamp August 8, 2025 13:40
@jemand771
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 432011
Commit: 95dab8b63c2393ddc10022573d55ae62be265024


x86_64-linux

✅ 5 packages built:
  • http2tcp
  • python312Packages.wsgitools
  • python312Packages.wsgitools.dist
  • python313Packages.wsgitools
  • python313Packages.wsgitools.dist

# the built-in asyncore and cgi libraries were removed in python 3.13
dependencies = lib.optionals (pythonAtLeast "3.13") [
pyasyncore
legacy-cgi
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have both standard-cgi and legacy-cgi, maybe we should drop one of them.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, interesting find! the official docs recommend legacy-cgi but python-deadlib seems to have made its way into nixpkgs as standard-*. I haven't tried it, but switching to standard-cgi might be right "right" thing to do here

Copy link
Member Author

@jemand771 jemand771 Aug 9, 2025

Choose a reason for hiding this comment

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

moving everything legacy-cgi -> standard-cgi probably won't be a thing (even if the libraries might technically be compatible / do the same thing) since at least one project explicitly defines a dependency on legacy-cgi: https://github.com/Pylons/webob/blob/main/setup.py#L56-L58 which makes pythonRuntimeDepsCheck fail.

I assume as more people start introducing "compatibility" with 3.13, that's just gonna get more and we'll end up needing both

for wsgitools (this PR), I think it really doesn't matter

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 18, 2025
@jemand771
Copy link
Member Author

mostly done in #434173. I guess the incorrect pythonAtLeast condition doesn't hurt anyone as python will prefer the builtin over 3rd party modules anyway

@jemand771 jemand771 closed this Aug 25, 2025
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 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.

2 participants