-
Notifications
You must be signed in to change notification settings - Fork 29
Set default python version 3.9 and fix strenum problem #135
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
base: master
Are you sure you want to change the base?
Conversation
|
I tried to get this check in the pre-commit, but adding all ruff lints wasn't enough, I had to add type checking... Which made the PR huge. So I'll stick with just this change for now. |
|
|
||
| [tool.ruff] | ||
| line-length = 120 | ||
| target-version = "py39" |
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 doesn't mesh well with your attempt to externalise python version into a variable
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.
Not sure I can fix that.
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.
You can abandon the idea to externalise it :)
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.
You mean out of the dockerfile?
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.
Yeah
server/pyproject.toml
Outdated
|
|
||
| [tool.pytest.ini_options] | ||
| log_cli = true | ||
| log_cli_level = "DEBUG" |
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.
Do we really need this as default?
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.
Its used to make the logs published by docker appear in the ci logs.
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.
Isn't this setting global, i.e. would apply also if I clone and run locally?
Can't it be specified on the command-line when executing pytest?
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.
Yeah, you can override it. But sure tests running with debug enabled makes sense?
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.
IMO no, since pytest is configured by default to display log messages over a certain verbosity only for failing tests, and since it is an easy modification for any user to alter the verbosity if necessary.
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.
I'm with @jacomago on this one. If the tests are failing for some reason in CI but are not reproducible locally, this is pretty useful.
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.
My point is not to remove it from CI, but that this is a global config. We can still lower the verbosity for CI.
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.
Just change https://github.com/ChannelFinder/recsync/blob/master/.github/workflows/server.yml#L69 to pytest --log-cli-level=DEBUG
Having the matrix wasn't making that much difference since recceiver is running in a container anyway
7dd8ea3 to
e3862b6
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.
It's too bad the 1.8 release already included the update that was >= 3.11 but oh well. Let's make a new release after this PR is merged
Also can you update the README with the new minimum python version?
| strategy: | ||
| matrix: | ||
| include: | ||
| - python-version: "3.6" |
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.
should remove 3.6 - 3.8 in the CI
| import logging | ||
| import random | ||
|
|
||
| from zope.interface import implementer |
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.
is moving these imports necessary? same goes for all the other import changes
| description="resync server" | ||
| version="1.5" | ||
| readme = "README.md" | ||
| requires-python = ">=3.6" |
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.
update to >=3.9
| version="1.5" | ||
| readme = "README.md" | ||
| requires-python = ">=3.6" | ||
| classifiers = [ |
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.
remove 3.6. - 3.8
| "Programming Language :: Python :: 3.13", | ||
| "Programming Language :: Python :: 3.14", | ||
| ] | ||
| dependencies = [ |
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.
with >= 3.9 , we could use StrEnum and use this pip package like you mentioned? https://pypi.org/project/StrEnum/


No description provided.