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

Upgrade to Poetry 1.2.0 #39

Merged
merged 16 commits into from
Sep 2, 2022
Merged

Upgrade to Poetry 1.2.0 #39

merged 16 commits into from
Sep 2, 2022

Conversation

pronovic
Copy link
Owner

@pronovic pronovic commented Sep 2, 2022

Upgrade to Poetry v1.2.0

Poetry v1.2.0 was released on August 31. This PR converts the repo to use it.

I have adjusted the developer runtime (in the run script and pre-commit hooks, etc.) to expect Poetry v1.2.0. The syntax varies in a few places (nothing major), but we do now need to install the poetry-plugin-export plugin to generate requirements.txt for the documentation. Strictly speaking, this is not needed for use with Poetry v1.2.0, since the plugin is installed by default for now. However, the release notes say it will become optional in some future release.

The pyproject.toml file has been modified to rename the deprecated tool.poetry.dev-dependencies section. I did not change the build system dependency at the bottom of the file, which still remains at poetry-core>=1.0.0. I have tested using the PEP 517 build tool to confirm that a PEP 517 build still works as expected, even though we are using Poetry v1.2.0 syntax in pyproject.toml. (This is not so important for apologies but does matter for some of my other tools like cedar-backup3, which need to build on platforms that won't have newer versions of poetry-core available.)

Observed Problems

I did run into one oddity while upgrading in my Debian environment. From an SSH session (i.e. no X session available), the plugin install step fails with an error Failed to unlock the collection!, as described in Poetry issue #2692. The fix is to install plugins with an explicit null keyring set, like:

PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" poetry self add poetry-plugin-export

I've added that workaround into the run script and the GitHub Actions workflow, so it shouldn't be noticeable to anyone else.

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.

1 participant