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

Add missing as_posix() calls #2582

merged 2 commits into from Jun 28, 2020


Copy link

@msakai msakai commented Jun 19, 2020

As PR #2398 changed package.root_dir from str to Path , we need to call as_posix() to convert it to str before passing to os.path.join. Otherwise, it raises 'PosixPath' object has no attribute 'endswith' error on Python <3.6.

Pull Request Check List

Resolves: #issue-number-here

  • Added tests for changed code.
  • Updated documentation for changed code.

As PR python-poetry#2398 changed package.root_dir from str to Path, we need to call
as_posix() to convert it to str before passing to os.path.join.
Copy link

@abn abn left a comment

Choose a reason for hiding this comment

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

Might be better to drop the os.path.join usage altogether.

poetry/installation/ Outdated Show resolved Hide resolved
abn approved these changes Jun 28, 2020
@abn abn merged commit b19873a into python-poetry:master Jun 28, 2020
@sdispater sdispater mentioned this pull request Jul 21, 2020
@abn abn linked an issue Aug 4, 2020 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

'PosixPath' object has no attribute 'endswith'
2 participants