Skip to content

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

Merged
samuelcolvin merged 1 commit intosamuelcolvin:mainfrom
johnslavik:path-relcheck-fix
Jan 26, 2024
Merged

BUG FIX: Use Path.relative_to() for Python 3.8 compatibility#150
samuelcolvin merged 1 commit intosamuelcolvin:mainfrom
johnslavik:path-relcheck-fix

Conversation

@johnslavik
Copy link
Contributor

@johnslavik johnslavik 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

@johnslavik johnslavik 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
@codecov
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.

@johnslavik
Copy link
Contributor Author

johnslavik 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.

@johnslavik
Copy link
Contributor Author

@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.

@johnslavik
Copy link
Contributor Author

johnslavik 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
@samuelcolvin
Copy link
Owner

Thanks so much.

@johnslavik
Copy link
Contributor Author

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.

2 participants