Skip to content

python-updates - major updates - 2023-09-15 (python3: 3.10 -> 3.11)#251878

Merged
mweinelt merged 752 commits intostagingfrom
python-updates
Sep 27, 2023
Merged

python-updates - major updates - 2023-09-15 (python3: 3.10 -> 3.11)#251878
mweinelt merged 752 commits intostagingfrom
python-updates

Conversation

@tjni
Copy link
Contributor

@tjni tjni commented Aug 28, 2023

Description of changes

Updates the default python version to 3.11, while keeping 3.10 around until after the NixOS 23.11 release.

This is #249731 on python-updates.

@tjni tjni requested a review from FRidh as a code owner August 28, 2023 02:09
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Aug 28, 2023
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package labels Aug 28, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Aug 28, 2023
@tjni tjni marked this pull request as draft August 28, 2023 05:08
@vcunat
Copy link
Member

vcunat commented Aug 29, 2023

Running with low build shares: https://hydra.nixos.org/eval/1798880

@mweinelt mweinelt changed the title python3: 3.10 -> 3.11 python-updates - major updates - 2023-09-15 (python3: 3.10 -> 3.11) Sep 15, 2023
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Sep 15, 2023
@trofi
Copy link
Contributor

trofi commented Sep 28, 2023

I suspect ac85b30 python3Packages.breathe: 4.34.0 -> 4.35.0 broke breathe build in staging as:

           > applying patch /nix/store/dmbcdrjm61q5i0mndanj4zn8fkw7g5nj-de3504c81c7cefc87c8229743f93232ca00a685d.patch
           > patching file tests/test_renderer.py
           > Reversed (or previously applied) patch detected!  Assume -R? [n]
           > Apply anyway? [n]
           > Skipping patch.
           > 2 out of 2 hunks ignored -- saving rejects to file tests/test_renderer.py.rej

Proposed the change as: #257806

pname = "clickhouse-cli";
version = "0.3.8";
version = "0.3.9";
format = "pyproject";
Copy link
Contributor

Choose a reason for hiding this comment

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

It no longer works:

$ clickhouse-cli
Traceback (most recent call last):
  File "/Users/ivan/.nix-profile/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/ivan/projects/clickhouse-cli-venv/venv/bin/clickhouse-cli", line 33, in <module>
    sys.exit(load_entry_point('clickhouse-cli==0.3.8', 'console_scripts', 'clickhouse-cli')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ivan/projects/clickhouse-cli-venv/venv/bin/clickhouse-cli", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ivan/.nix-profile/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ivan/.nix-profile/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for clickhouse-cli

It also didn't work before due to sqlalchemy (hatarist/clickhouse-cli#50), but it failed later.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your report.
Unfortunately, we cannot check that all packages are working correctly.
Would you please either fix the packages or if necessary, revert and submit a PR? Feel free to ping me on that.
Also, I would appreciate it if you would consider adding a test, which will help us notice the breakage more quickly.

Copy link

Choose a reason for hiding this comment

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

I'm using some overlay as workaournd

{ channels, ... }:

final: prev: {
  clickhouse-cli = channels.unstable.python311Packages.clickhouse-cli.override {
    sqlparse = channels.unstable.python311Packages.sqlparse.overridePythonAttrs (oldAttrs: {
      src = prev.fetchPypi {
        pname = "sqlparse";
        version = "0.4.3";
        hash = "sha256-acqASEa7EU0uw4DkNgqKNA24PwzPOvzusUBN8Cj1cmg=";
      };
      nativeBuildInputs = [
        prev.python311Packages.flit-core
        prev.python311Packages.setuptools
        prev.installShellFiles
      ];
    });
  };
}

@trofi
Copy link
Contributor

trofi commented Oct 25, 2023

git bisect says commit d77e138 python3: 3.10 -> 3.11 somehow managed to break displaycal which looks like a missing dependency:

$ nix build --no-link -f. displaycal
error: builder for '/nix/store/xrdbz5p7986jn2yqcx9zfs04v55rxjj6-displaycal-3.9.10.drv' failed with exit code 1;
       last 10 log lines:
       >     object.__getattribute__(self, "init")()
       >   File "/build/DisplayCAL-3.9.10/DisplayCAL/defaultpaths.py", line 380, in init
       >     XDG.set_translation(self)
       >   File "/build/DisplayCAL-3.9.10/DisplayCAL/defaultpaths.py", line 238, in set_translation
       >     obj.translation = gettext.translation(
       >                       ^^^^^^^^^^^^^^^^^^^^
       >   File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/gettext.py", line 520, in translation
       >     raise FileNotFoundError(ENOENT,
       > FileNotFoundError: [Errno 2] No translation file found for domain: 'xdg-user-dirs'
       > /nix/store/bbxdw4rgwwl3gnajri82yidr1nlsfskf-stdenv-linux/setup: line 1596: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/xrdbz5p7986jn2yqcx9zfs04v55rxjj6-displaycal-3.9.10.drv'.

@trofi trofi mentioned this pull request Oct 25, 2023
13 tasks
@arcnmx arcnmx mentioned this pull request Oct 26, 2023
13 tasks
infinisil added a commit to tweag/nixpkgs that referenced this pull request Nov 9, 2023
Was broken since the Python update from NixOS#251878

This should fix the apfelgrid and applgrid builds, not tested yet
@fabaff fabaff mentioned this pull request Dec 21, 2023
12 tasks
@fabaff fabaff mentioned this pull request Dec 30, 2023
@wegank wegank mentioned this pull request Mar 9, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 8.has: changelog This PR adds or changes release notes 8.has: clean-up This PR removes packages or removes other cruft 8.has: documentation This PR adds or changes documentation 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.