Skip to content

Comments

poetry: 1.4.2 -> 1.5.1#241458

Closed
Dessix wants to merge 2 commits intoNixOS:stagingfrom
Dessix:dev/dessix/update-poetry-1.5.1
Closed

poetry: 1.4.2 -> 1.5.1#241458
Dessix wants to merge 2 commits intoNixOS:stagingfrom
Dessix:dev/dessix/update-poetry-1.5.1

Conversation

@Dessix
Copy link
Contributor

@Dessix Dessix commented Jul 4, 2023

poetry: 1.4.2 -> 1.5.1

Dropped support for python-plugin-up which has not been updated past poetry 1.4.2 after 1.5.x's significant change from tomlkit to tomli.

Based largely upon work from the hence-abandoned PR #233393.

Diff: python-poetry/poetry@refs/tags/1.4.2...1.5.1

Changelogs:
1.4.2 -> 1.5.0: python-poetry/poetry@refs/tags/1.5.0/CHANGELOG.md
1.5.0 -> 1.5.1: python-poetry/poetry@refs/tags/1.5.1/CHANGELOG.md

Dropped support for poetry-plugin-up as it has not been updated for compatibility with Poetry's new core and is apparently not taking pull requests at the moment.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 4, 2023
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from 1e658eb to 51db6da Compare July 4, 2023 11:00
@ofborg ofborg bot added the 8.has: clean-up This PR removes packages or removes other cruft label Jul 4, 2023
@ofborg ofborg bot requested review from dotlambda, jbaum98 and mweinelt July 4, 2023 11:18
@ofborg ofborg bot added 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. labels Jul 4, 2023
@mweinelt mweinelt marked this pull request as draft July 4, 2023 11:20
@mweinelt
Copy link
Member

mweinelt commented Jul 4, 2023

poetry: 1.4.2 -> 1.5.1

All commit messages lack changelogs, as required by CONTRIBUTING.md.

poetry-core: 1.5.1 -> 1.6.1

That's too big a change for master. This is a blocker currently, hence marking it as a draft. You could use an override for the time being.

poetry-plugin-export: 1.3.1 -> 1.4.0
python310Packages.poetry-plugin-export: 1.3.1 -> 1.4.0
python311Packages.poetry-plugin-export: 1.3.1 -> 1.4.0

Every changed attribute should roughly receive its own commit. So one commit per plugin for example.

@Dessix
Copy link
Contributor Author

Dessix commented Jul 4, 2023

Every changed attribute should roughly receive its own commit. So one commit per plugin for example.

I was avoiding this because that left multiple commits wherein each one was broken; if you'd prefer, I can indeed split them out.

poetry-core: 1.5.1 -> 1.6.1
That's too big a change for master.

They barely have support for anything less. Note that 3 months ago it was at 1.6.0, as included in @dotlambda's previous incarnation of this PR. Multiple breaking bugs and performance regressions were addressed since 1.5.1, making the version in-Nixpkgs currently dangerous to use.

@ofborg ofborg bot requested a review from jonringer July 4, 2023 11:35
@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. and removed 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. labels Jul 4, 2023
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from b87189d to 0a20a0d Compare July 4, 2023 11:52
@github-actions github-actions bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Jul 4, 2023
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch 2 times, most recently from f562a14 to da8fb57 Compare July 4, 2023 12:02
@mweinelt mweinelt requested a review from K900 July 4, 2023 12:08
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from da8fb57 to f29040f Compare July 4, 2023 12:10
@SuperSandro2000
Copy link
Member

I was avoiding this because that left multiple commits wherein each one was broken; if you'd prefer, I can indeed split them out.

We do one commit per package update even if between the commits something is broken. Please consult the contributing guide for more details.

They barely have support for anything less. Note that 3 months ago it was at 1.6.0, as included in @dotlambda's previous incarnation of this PR. Multiple breaking bugs and performance regressions were addressed since 1.5.1, making the version in-Nixpkgs currently dangerous to use.

What hexa means is that this PR should target staging. See my standard template on how to do that.


This PR rebuilds a lot of packages which means we must target staging. Please follow the contributing guide to not potentially ping a lot of people.

@ofborg ofborg bot added 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. and removed 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. labels Jul 4, 2023
@ofborg ofborg bot removed the 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. label Jul 4, 2023
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from f29040f to 5d7e87f Compare July 5, 2023 03:38
Dropped support for python-plugin-up which has not been updated past poetry 1.4.2 after 1.5.x's significant change from tomlkit to tomli.
Poetry now includes a built-in update command.
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from 5d7e87f to aa6fcfc Compare July 5, 2023 03:53
@Dessix Dessix changed the base branch from master to staging July 5, 2023 04:00
@Dessix Dessix marked this pull request as ready for review July 5, 2023 22:40
@Dessix Dessix requested a review from considerate July 5, 2023 22:41
@Dessix Dessix force-pushed the dev/dessix/update-poetry-1.5.1 branch from aa6fcfc to a604feb Compare July 6, 2023 06:57
@Dessix Dessix requested a review from considerate July 6, 2023 07:24
Copy link
Member

@considerate considerate left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@SuperSandro2000
Copy link
Member

@ofborg build poetry

@SuperSandro2000
Copy link
Member

can you check why ofborg fails?

@Dessix
Copy link
Contributor Author

Dessix commented Jul 6, 2023

@SuperSandro2000

can you check why ofborg fails?

Looks like #241227 may be the culprit. Hard to pick apart from how ofborg logs are structured for parallel tasks.

mirkolenz added a commit to mirkolenz/nixos that referenced this pull request Jul 7, 2023
@mirkolenz
Copy link
Member

Poetry 1.4.2 currently also fails to build on the unstable channel due to the linked issue #241227 with the following message:

> ERROR: Could not find a version that satisfies the requirement cachecontrol[filecache]<0.13.0,>=0.12.9 (from poetry) (from versions: none)
> ERROR: No matching distribution found for cachecontrol[filecache]<0.13.0,>=0.12.9

@domenkozar
Copy link
Member

The following patch should fix it:

+  patches = [
+    (fetchpatch {
+      url = "https://github.com/python-poetry/poetry/pull/8055/commits/a5a6df8d8792a8ae47f1d1b57b439dee3ee4d64f.patch";
+      hash = "sha256-c2IYrdc2RaGZupRH2n26Rr2eUpDPV87Aw/P3x54j6ts=";
+    })
+  ];

@K900
Copy link
Contributor

K900 commented Jul 7, 2023

diff --git a/pkgs/tools/package-management/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix
index 48263c1f309..913b95fc8ef 100644
--- a/pkgs/tools/package-management/poetry/default.nix
+++ b/pkgs/tools/package-management/poetry/default.nix
@@ -55,12 +55,12 @@ let
           self.time-machine
         ];
       });
-      poetry-plugin-export = super.poetry-plugin-export.overridePythonAttrs(old: {
+      poetry-plugin-export = super.poetry-plugin-export.overridePythonAttrs(old: rec {
         version = "1.4.0";
         src = fetchFromGitHub {
           owner = "python-poetry";
           repo = old.pname;
-          rev = "refs/tags/${old.version}";
+          rev = "refs/tags/${version}";
           hash = "sha256-okI91Z9u5w7IHpPb9jL4Hb8+MkYJEF2qm0mqqCdyKbk=";
         };
       });

Is probably what was intended here?

self.time-machine
];
});
poetry-plugin-export = super.poetry-plugin-export.overridePythonAttrs(old: {
Copy link
Member

Choose a reason for hiding this comment

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

poetry-plugin-export should be removed from python3Packages.

@mweinelt mweinelt added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 7, 2023
@andersk andersk mentioned this pull request Jul 8, 2023
@Hamled
Copy link

Hamled commented Jul 8, 2023

The following patch should fix it:

+  patches = [
+    (fetchpatch {
+      url = "https://github.com/python-poetry/poetry/pull/8055/commits/a5a6df8d8792a8ae47f1d1b57b439dee3ee4d64f.patch";
+      hash = "sha256-c2IYrdc2RaGZupRH2n26Rr2eUpDPV87Aw/P3x54j6ts=";
+    })
+  ];

I wasn't able to get this to apply to version 1.4.2 as it was originally made for 1.5.0 I believe. I made a patch has the same changes backported to 1.4.2, but it is untested beyond building the package and running poetry init:

+  patches = [
+    (fetchpatch {
+      url = "https://github.com/Hamled/poetry/commit/d2802deec588a07626e89da33ad41bb36b885426.patch";
+      hash = "sha256-8Yznjvwz+kg4U+kml/GbodHAKYnvEn86TZfD65j/86A=";
+    })
+  ];

@dotlambda dotlambda mentioned this pull request Jul 9, 2023
12 tasks
@dotlambda
Copy link
Member

I updated #233393 to build poetry-plugin-up with support for poetry 1.5.

@K900 K900 closed this in #233393 Jul 9, 2023
@Dessix Dessix deleted the dev/dessix/update-poetry-1.5.1 branch July 9, 2023 04:51
packageOverrides = self: super: {
poetry = self.callPackage ./unwrapped.nix { };

filelock = super.filelock.overridePythonAttrs (old: rec {
Copy link
Member

Choose a reason for hiding this comment

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

Would not be needed with #242402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 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. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants