Skip to content

Comments

Add missing as_posix() calls#2582

Merged
abn merged 2 commits intopython-poetry:masterfrom
msakai:fix-path-error
Jun 28, 2020
Merged

Add missing as_posix() calls#2582
abn merged 2 commits intopython-poetry:masterfrom
msakai:fix-path-error

Conversation

@msakai
Copy link
Contributor

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

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

@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
@github-actions
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'PosixPath' object has no attribute 'endswith'

2 participants