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

Prefer pathlib #555

Merged
merged 3 commits into from
Mar 11, 2023
Merged

Prefer pathlib #555

merged 3 commits into from
Mar 11, 2023

Conversation

dimbleby
Copy link
Contributor

@dimbleby dimbleby commented Feb 12, 2023

I've been sitting for a while on some tweaks to move poetry-core in the direction of preferring pathlib over os for file and path manipulations, but they've not seemed interesting enough to be worth an MR.

However I notice that they in passing should fix python-poetry/poetry#7505, which makes it all seem a bit more worthwhile.

This first push deliberately doesn't include the fixes - I'm using the CI pipeline to do my windows testing and am hoping to see that the testcase that I've added fails, per that issue. Then I'll follow up with the changes that are supposed to fix it.

@dimbleby dimbleby force-pushed the prefer-pathlib branch 2 times, most recently from d9cf8c3 to 401a0de Compare February 12, 2023 17:57
@gpongelli
Copy link

Hi,
I've tested this branch locally and I confirm this fixes python-poetry/poetry#7505 .

Steps I've done:

  1. clone locally dimbleby's prefer-pathlib branch
  2. clone locally poetry and checkout tag 1.4.0
  3. change poetry's pyproject.toml to reference local folder , run poetry lock to obtain
[[package]]
name = "poetry-core"
version = "1.5.0"
...
[package.source]
type = "directory"
url = "../poetry-core"
  1. run pipx.exe install --verbose --suffix=@loc .\poetry\
  2. into the native extension project, I've run poetry@loc.exe build

Result:

  • no UserWarning: Duplicate name: warning
  • RECORD file does not have duplicated hashes

I'm on Windows 11 OS, powershell environment.

Please consider merging this branch ASAP for next poetry release, thank you.

@radoering
Copy link
Member

I think we can include this in a patch release (and bump the required core version in the next poetry patch release). However, I don't want to remove any deprecation in a patch release (even if it is unlikely anybody still uses it). Do you mind if I drop the first commit in this PR? (You're welcome to create a deprecation removal PR for the next minor release if you like. There might be some more things that are deprecated for a long time.)

@dimbleby
Copy link
Contributor Author

dimbleby commented Mar 10, 2023

feel free to rearrange as you wish

(per opening remarks, I'd intended this series as more of a tidying-up sequence of commits rather than actually-fixes-something; it's mostly luck that it turns out to fix something that someone cares about)

@sonarcloud
Copy link

sonarcloud bot commented Mar 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@radoering radoering merged commit 35e656c into python-poetry:main Mar 11, 2023
@dimbleby dimbleby deleted the prefer-pathlib branch April 30, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate lines in the wheel RECORD file when a native extension is built
3 participants