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

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

Merged
merged 752 commits into from Sep 27, 2023

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.

@vcunat
Copy link
Member

vcunat commented Aug 29, 2023

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

@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

@@ -10,11 +10,12 @@

buildPythonPackage rec {
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet