-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Migrate to Poetry and modernise #349
Conversation
f655733
to
8bbcbee
Compare
611259e
to
92516c8
Compare
1243787
to
4433845
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Excited to see it all in action 😄
While I've come across poetry
before I hadn't heard of poe
, looks interesting - I assume you chose it due to it's integration with poetry
?
4cab42a
to
d207d38
Compare
That was perhaps me being over-optimistic 😅, happy to go for a release now. |
d207d38
to
1c9fe84
Compare
Ok, just waiting for @dgreisen to do those Github Settings chores then. I tested the |
FYI, on the python tools repos we keep EOL python support for three months, with a note in our releases asking users to switch to new versions of python (for python 3.7 till Sept 27th). This means that if |
That seems totally reasonable @karthiknadig, I'm sure I can find a way to bring this PR back down to 3.7 👍 |
d644f06
to
28b41f0
Compare
Turns out it was really easy to maintain Python 3.7 support, just needed to change So @dgreisen can you add back the Also, even now, with pinned dependencies, we got the |
28b41f0
to
84c118b
Compare
Poetry is currently the most popular Python dependency manager. Whilst it is ostenibly a replacement for the `requirements.txt` convention it is also encourages more general best practices such as; dependency lockfiles, releasing, task running, and so on. This commit also introduces Ruff, a modern Python linter, that in our case replaces our dependencies on `flake8` and `bandit`.
Also enable a lint that checks to see if the autogenerated client is uptodate.
Will this fix the typing_extensions/Any error?
84c118b
to
ca2a305
Compare
Ok, so I've got this back down to Python 3.7. I think we can merge it now. |
Poetry is currently the most popular Python dependency manager. Whilst it is ostensibly a replacement for the
requirements.txt
convention it also encourages more general best practices such as; dependency lockfiles, oneliner releasing, task running, and so on.Note that the lockfile isn't used to force locked dependencies in the officially published packages to PyPI. Wheels stilly only use the conventional versions (Eg
~1.0.3
,^2.3.12
,>=3.8.1,<4
, etc) specified inpyproject.toml
. The lockfile will mostly just be used for reproducibility in CINew
flake8
andbandit
. This is also a nice community hat tip as Ruff uses Pygls for its LSP: https://github.com/astral-sh/ruff-lsppoetry run poe lint
poe
and I can't remember the other right now) require that we have a minium Python version of3.8.1
. Python 3.7 is end of life, so I assume that's ok.Last Modified:
section of the autogenerated file is no longer dynamic, it just references thegit
command to get the last commit date for the file. When the date is dynamically added, it makes it difficult forgit diff
to detect if actual relevant code has changed.push
andpull_request
events at the same time, only one is chosen. Thanks to https://github.com/fkirc/skip-duplicate-actionsCONTRIBUTORS.md
is automatedCHANGELOG.md
autogenerated during Github ReleaseTODO
[x] Remove Python 3.7 required check from branch protection rules /cc @dgreisenImportError: cannot import name 'Any' from 'typing_extensions'
. But Poetry doesn't build wheels with the lock file, there's some discussion here about the default behaviour, they recommend using a plugin like poetry-plugin-export to achieve it.Code review checklist (for code reviewer to complete)