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 support for Poetry 1.2.0 and above (including 1.5.1), deprecate support for Python 3.6 #28

Merged
merged 6 commits into from Jul 10, 2023

Conversation

mbeacom
Copy link
Contributor

@mbeacom mbeacom commented Aug 28, 2022

The goal of this PR is to resolve issues documented in #27 and compatibility issues mentioned in #25.

This PR resolves:

  • a bad method reference to module_name in poetry.utils.helpers@module_name which is now only available via poetry.core.utils.helpers@module_name
  • invalid method exception encountered on set_version as it was recently removed and rewritten to handle hashing under poetry.core's ProjectPackage._set_version(version, pretty_version)

Additionally, this PR updates some dependencies to allow pytest to execute under Python 3.10.

Tests are passing with the provided changes.

Related to #27 and #25 (probably fixes them)

@zmievsa
Copy link

zmievsa commented Sep 10, 2022

@tiangolo @Gl0deanR Any chance this gets merged soon? All the new versions of poetry are simply not supported without this patch.

Copy link

@zmievsa zmievsa left a comment

Choose a reason for hiding this comment

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

Everything works and the changes are very simple. I hope this gets merged soon.

@zmievsa
Copy link

zmievsa commented Sep 15, 2022

I think I understand why Tiangolo gave up on this project. importlib.metadata.version does this without any plugins required. Poetry uses it too.

@tiangolo tiangolo changed the title Modify plugin for 1.2.0rc2 ✨ Add support for Poetry 1.2.0 and above (including 1.5.1) Jul 10, 2023
@tiangolo tiangolo changed the title ✨ Add support for Poetry 1.2.0 and above (including 1.5.1) ✨ Add support for Poetry 1.2.0 and above (including 1.5.1), deprecate support for Python 3.6 Jul 10, 2023
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Patch coverage: 75.00% and project coverage change: -2.50 ⚠️

Comparison is base (69b60e0) 100.00% compared to head (6b2c72c) 97.50%.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #28      +/-   ##
===========================================
- Coverage   100.00%   97.50%   -2.50%     
===========================================
  Files            2        2              
  Lines          160      160              
===========================================
- Hits           160      156       -4     
- Misses           0        4       +4     
Impacted Files Coverage Δ
poetry_version_plugin/plugin.py 93.44% <75.00%> (-6.56%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tiangolo
Copy link
Owner

Thanks a lot @mbeacom! 🚀

And thanks everyone for the comments here.

I updated a couple of extra packages to be able to run the tests locally and tweaked a couple of extra things.

I'm not sure why Codecov is reporting some lines as not reached despite the tests that check for that exact output are passing. But anyway, I plan on moving away from Codecov, so that's fine for now.

@tiangolo tiangolo merged commit 7a9d54c into tiangolo:main Jul 10, 2023
3 of 5 checks passed
@mbeacom mbeacom deleted the poetry-120rc2 branch July 12, 2023 00:47
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

3 participants