Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnatcoll-python3: upgrade from Python 3.9 to Python 3.12 #350003

Closed
wants to merge 1 commit into from

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Oct 20, 2024

The gnatcoll bindings site suggests using the highest supported Python version, which is currently 3.10. See https://github.com/AdaCore/gnatcoll-bindings/blob/master/python3/README.md. Additional patches from upstream bump the support to Python 3.12.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

@emilazy
Copy link
Member

emilazy commented Oct 21, 2024

It looks like there are upstream commits to support Python 3.11 and 3.12. It’d be nice if we could use them given how far behind the release is. Possible options include fetchpatch2ing the upstream commits, if they’ll apply cleanly, or potentially bumping to the current Git HEAD.

@samueltardieu
Copy link
Contributor Author

It looks like there are upstream commits to support Python 3.11 and 3.12. It’d be nice if we could use them given how far behind the release is. Possible options include fetchpatch2ing the upstream commits, if they’ll apply cleanly, or potentially bumping to the current Git HEAD.

Looks like by including an intermediate patch they might apply cleanly. I'll update the PR.

@samueltardieu samueltardieu changed the title gnatcoll-python3: upgrade from Python 3.9 to Python 3.10 gnatcoll-python3: upgrade from Python 3.9 to Python 3.12 Oct 21, 2024
Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Wonderful, thank you! Forgive me for a couple nits; not all are essential but since the patch fetches will need touching I’ve commented with them all.

pkgs/development/ada-modules/gnatcoll/bindings.nix Outdated Show resolved Hide resolved
pkgs/development/ada-modules/gnatcoll/bindings.nix Outdated Show resolved Hide resolved
pkgs/development/ada-modules/gnatcoll/bindings.nix Outdated Show resolved Hide resolved
@sternenseemann
Copy link
Member

I'm not really sure this is safe to do. Upgrading the python interpreter used should be able to break user code. Since upstream says they support up to 3.10 and recommend that, it seems reasonable to upgrade to that point, but not necessarily beyond.

The gnatcoll bindings site suggests using the highest supported Python
version, which is currently 3.10. Additional patches from upstream bump
the support to Python 3.12.
@samueltardieu
Copy link
Contributor Author

I'm not really sure this is safe to do. Upgrading the python interpreter used should be able to break user code. Since upstream says they support up to 3.10 and recommend that, it seems reasonable to upgrade to that point, but not necessarily beyond.

On the other hand, it looks like upstream just didn't push a release out. I'll let you and @emilazy tell me what you prefer.

@samueltardieu
Copy link
Contributor Author

I have also opened AdaCore/gnatcoll-bindings#21 (comment)

@emilazy
Copy link
Member

emilazy commented Oct 23, 2024

Hopefully upstream will tag a new release soon. If not, I think given that they’re clearly willing to do so with these patches but just haven’t gotten around to it yet speaks to it being okay for us to apply them; they are quite trivial in any case.

Any Python bump could potentially break user code but of course CPython 3.9 will not be in Nixpkgs forever and given that upstream specifically recommends using the latest Python it seems reasonable to follow that advice.

@sternenseemann
Copy link
Member

What do you know… https://github.com/AdaCore/gnatcoll-bindings/releases/tag/v25.0.0

I'll try and do a gnatPackages bump soon.

@samueltardieu
Copy link
Contributor Author

What do you know… https://github.com/AdaCore/gnatcoll-bindings/releases/tag/v25.0.0

Yes, in response to my issue.

I'll try and do a gnatPackages bump soon.

Ok, I'll let you do that since you're the maintainer, and I'll close this issue.

@samueltardieu samueltardieu deleted the push-lzyvzzqrtupk branch October 25, 2024 16:16
@sternenseemann
Copy link
Member

#352856

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.

3 participants