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

BUG FIX: Use Path.relative_to() for Python 3.8 compatibility #150

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

bswck
Copy link
Contributor

@bswck bswck commented Jan 1, 2024

.is_relative_to is 3.9+. It caused python -m devtools install to fail in Python 3.8.

https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.is_relative_to

@bswck bswck changed the title Use Path.relative_to() for Python 3.8 compatibility BUG FIX: Use Path.relative_to() for Python 3.8 compatibility Jan 1, 2024
Copy link

codecov bot commented Jan 1, 2024

Codecov Report

Merging #150 (1c5362f) into main (ec406ff) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files           8        8           
  Lines         729      729           
  Branches      111      111           
=======================================
  Hits          702      702           
  Misses         21       21           
  Partials        6        6           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec406ff...1c5362f. Read the comment docs.

@bswck
Copy link
Contributor Author

bswck commented Jan 1, 2024

I believe the CI pipeline should be configured to lint on the minimal supported Python version to ensure backward compatibility, not on 3.10 as it is configured now.
I am however hesitant to submit a patch that configures it to 3.8, since 3.7 still supported by python-devtools despite it being EOL.

@bswck
Copy link
Contributor Author

bswck commented Jan 23, 2024

@samuelcolvin

Copy link
Owner

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

otherwise LGTM, sorry for the slow review.

devtools/__main__.py Show resolved Hide resolved
@bswck
Copy link
Contributor Author

bswck commented Jan 26, 2024

I believe the CI pipeline should be configured to lint on the minimal supported Python version to ensure backward compatibility, not on 3.10 as it is configured now. I am however hesitant to submit a patch that configures it to 3.8, since 3.7 still supported by python-devtools despite it being EOL.

Shall I drop Python 3.7 support in a separate PR? @samuelcolvin

@samuelcolvin
Copy link
Owner

I'm happy to drop 3.7 support.

@samuelcolvin samuelcolvin merged commit 2aea99d into samuelcolvin:main Jan 26, 2024
19 checks passed
@samuelcolvin
Copy link
Owner

Thanks so much.

@bswck
Copy link
Contributor Author

bswck commented Jan 26, 2024

You're welcome! devtools are awesome! 🚀

@samuelcolvin
Copy link
Owner

Thanks so much.

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.

None yet

2 participants