-
Notifications
You must be signed in to change notification settings - Fork 45
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
buildchain, docs, salt, tests: update Python dependencies #2986
Conversation
Hello nicolast,My role is to assist you with the merge of this Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
1d1891e
to
0a4bbe1
Compare
cryptography
d721417
to
7e87a07
Compare
The arrays were called `py3_files` and `py2_files`, even though they're not strictly referring to Python3 or Python2 files: the `sparse_volume_cleanup` script is actually a Python3 script (according to its shebang). The actual split is some files are linted using `mypy`, others are not. Hence renaming into `typed_files` and `untyped_files`. See: https://scality.slack.com/archives/CFXQQUDPT/p1608200682012800
Some future commit updates the version of `pylint` we use to validate Python code, which adds a warning about using `super(Klass, self)` which can be replaced with `super()`.
Some future commit updates the version of `pylint` we use to validate Python code, which adds a warning about using `raise ... from ...` when applicable.
90c9af1
to
05b8c03
Compare
A future commit updates the version of `pylint` we use to validate Python code, which does not work properly with Python 3.9 at the time of writing, which is the default Python on e.g., a Fedora 32 system. Instead, pin the Python version to the (Python 3) version as found on our target system(s), i.e., RHEL/CentOS 7, so Python 3.6. See: pylint-dev/pylint#3882 See: https://scality.slack.com/archives/CFXQQUDPT/p1608201195013900?thread_ts=1608200122.011200&cid=CFXQQUDPT
05b8c03
to
47bfe9e
Compare
It appears `pytest-bdd` 4.0.2 introduced changes which are incompatible with our current test-suite. To be investigated.
47bfe9e
to
635d0fe
Compare
/approve |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following options are set: approve |
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.
LGTM, but a Mac user (@thomasdanan or @ChengYanJin) should run the pip-compile
to also update buildchain/requirements-Darwin.txt
.
@thomasdanan will do. I wonder whether there's a way to unify these two... The only difference appears to be including |
I remember trying a lot of things back then, but none of them worked out, but I may have missed something (environment markers sounded like a good option, but didn't work with |
Here's a suggestion:
If I'm not mistaken, this then allows to run |
For this PR, I'm going to revert the changes in @JBWatenbergScality tried updating on an OSX machine, but it turns out Python3.6 is not supported on Big Sur sigh |
Due to changes in `pluggy` (a dependency of `pytest`) using the `importlib.metadata` module from the standard library instead of the `importlib-metadata` package when running on Python >= 3.8, we need to pin the `basepython` used in the `pip-compile` Tox env to the version that's actually used in CI, otherwise `pip` complains during installation of dependencies the `importlib-metadata` package is not listed (with hashes) in some `requirements.txt`. As such, setting `basepython` to `python3.6`, similar to 8a9104b. Also, update the versions of `pip` and `pip-tools` used in the `pip-compile` `tox` target, and use the `--allow-unsafe` flag which is supposedly not really unsafe at all (and will become the default). Finally, since we're currently unable to properly update the MacOS X platform-specific dependencies for the buildchain (in `buildchain/requirements-Darwin.txt`), the updates to `buildchain/requirements-Linux.txt` are manually reverted (after running `tox -e pip-compile` on a Linux host) to ensure both `buildchain/requirements-Linux.txt` and `buildchain/requirements-Darwin.txt` remain in sync (except for `pyinotify` and `macfsevents`, as usual). See: 8a9104b Closes: #2897 Closes: #2898 See: pytest-dev/pluggy#222 See: https://github.com/pytest-dev/pluggy/pull/223/files#diff-60f61ab7a8d1910d86d9fda2261620314edcae5894d5aaa236b821c7256badd7 See: jazzband/pip-tools#806 (comment) See: #2986 (comment)
635d0fe
to
46f1f76
Compare
@bert-e status |
StatusStatus report is not available. The following options are set: approve |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following options are set: approve |
/approve |
Build failedThe build for commit did not succeed in branch improvement/update-cryptography. The following options are set: approve |
Instead of having both a `buildchain/requirements-Linux.txt` file and `buildchain/requirements-Darwin.txt`, rendered from `buildchain/requirements.in` and as such being almost identical (modulo the platform-specific `pyinotify` and `macfsevents` modules), making updates to the requirement lock files cumbersome (need to be executed on all platforms), this commit creates a file containing a pinned version of these two dependencies including a (manually added) platform constraint, which is then used as a constraint file for `pip-compile` to do its job (hence the `-c platform-requirements.txt` line in `requirements.in`). After `pip-compile` generates a temporary lockfile (cfr. code in `tox.ini`), we parse out the `pyinotify` and/or `macfsevents` dependency, and append the constraint file to the result. Using this approach we end up with a single `buildchain/requirements.txt` which has all cross-platform `doit` (and other) dependencies from `buildchain/requirements.in`, and (platform-constrained) mentions of `pyinotify` and `macfsevents`. The versions of the latter are pinned in `platform-requirements.txt`, so these won't be upgraded when running `tox -e pip-compile`. If need be, they can be bumped manually. See: #2986 (comment)
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list:
The following options are set: approve |
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.
LGTM 👌
In the queueThe changeset has received all authorizations and has been added to the The changeset will be merged in:
The following branches will NOT be impacted:
There is no action required on your side. You will be notified here once IMPORTANT Please do not attempt to modify this pull request.
If you need this pull request to be removed from the queue, please contact a The following options are set: approve |
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue None. Goodbye nicolast. |
Ran
tox -e pip-compile
to bring everything up-to-date.The
dependabot
-generated PR fails because for some reason,importlib-metadata
is (attempted to be) installed but has no entry inrequirements.txt
(and hence no hash). Turns out this is due topluggy
now usingimportlib.metadata
from the standard library when using Python >= 3.8, which is likely what @dependabot uses.Hence, pinning the Python version used for
pip-compile
to Python 3.6, which is what RHEL/CentOS7 comes with (and what we run in CI).The updated dependencies also bring a new version of
pylint
(which doesn't work with Python 3.9, hence also pinning to 3.6...). This introduces some new warnings, which are fixed in some related commits as well.Finally, rename some unfortunately-named variables in a
tox.ini
script.Closes: #2897
Closes: #2898
See: pytest-dev/pluggy#222