Commit Graph
4 Commits
Author SHA1 Message Date
Mitchell Hentges 1ad3706fbc Bug 1763695: Move python-test poetry to ini "requirements" r=ahal
The `test_vendor.py` test needs access to `poetry` to make its
assertions. This requirement was previously satisfied by adding `poetry`
to the `python-test` site.

Unfortunately, this caused conflicts when running the `mozlint` tests,
as they use the ini "requirements" feature to install their
dependencies. Importantly, the `mozlint` dependencies aren't compatible
with the version of `poetry` we need.

Fortunately, this was a good reminder: since `poetry` is a test-specific
dependency, leverage the existing ini "requirements" feature as it
represents exactly that: the extra package dependencies of a specific
test.

Note that I had to doctor the `dataclass` line in
`vendor_requirements.txt` to include an environment marker, otherwise it
would fail to install with Python >= 3.7.

Differential Revision: https://phabricator.services.mozilla.com/D143376
2022-04-19 19:10:38 +00:00
Mitchell Hentges d62f3b8a4e Bug 1659593: Make ./mach vendor python cross-platform r=ahal
Use `poetry` instead of `pip-compile`, then leverage `pip` to assert
that there's no conflicts between environments.

This enables simplifying `requirements.in`, since `colorama` is now
automatically picked up, as vendoring is no longer linux-py3.6-specific.

`poetry==1.2.0a2` was chosen because it was the first version that would
include `pip`/`setuptools`/`wheel` in the `requirements.txt`, yet it was
also the last version that supports Python 3.6 (as still used in CI in
some spots).

Sorry about the `requirements.txt` noise, that's because poetry doesn't
sort hashes yet [1]. Fortunately, you can be confident in
`requirements.txt` changes by checking that this patch doesn't include
changes to vendored packages themselves (I'm including the results of a
`./mach vendor python`).

[1] https://github.com/python-poetry/poetry/issues/5408

Differential Revision: https://phabricator.services.mozilla.com/D142884
2022-04-07 18:00:28 +00:00
Mitchell Hentges bcba18107d Bug 1732795: Update pytest to 7.0.1 r=ahal
`4.6.6` was 3 years old. There's been many helpful features and
ergonomics improvements in the years since.

Differential Revision: https://phabricator.services.mozilla.com/D140679
2022-04-04 17:03:33 +00:00
Mitchell Hentges eb3080a220 Bug 1724274: Move virtualenv dependency manifests to python/virtualenvs r=ahal
This is needed for a few reasons:
* All mach commands can use virtualenvs, not just `build`-related
  commands, so the files don't make sense to be in `build/`.
* When locking is added, more files associated with virtualenvs will be
  added, and this will change will ease the related directory structure
  setup.
* This removes the need for a redundant "_virtualenv_packages" keyword
  as part of the manifest filenames.

Differential Revision: https://phabricator.services.mozilla.com/D140382
2022-03-24 14:04:34 +00:00