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

Update pyproject.toml to fix required dependencies for vendored poetry #678

Merged
merged 2 commits into from
Sep 8, 2024

Conversation

romain-intel
Copy link
Contributor

Description

PR #637 initially vendored 1.8.2 and dependencies had been updated for that. It then included 1.8.3 which changed some dependencies.

This updates the dependencies for 1.8.3. It also fixes an issue with ~= versus = ^ (and therefore relaxes the previous dependencies.

Also regenerated the environments/conda-lock.yml file as a result of the modifications on pyproject.toml using
conda-lock --platform linux-64 --platform osx-64 --platform osx-arm64 --platform linux-aarch64 --file=environments/dev-environment.yaml --file=pyproject.toml --lockfile=environments/conda-lock.yml

Fixes #676

PR conda#637 initially vendored 1.8.2 and dependencies had been updated for that.
It then included 1.8.3 which changed some dependencies.

This updates the dependencies for 1.8.3. It also fixes an issue with
~= versus = ^ (and therefore relaxes the previous dependencies.

Also regenerated the environments/conda-lock.yml file as a result
of the modifications on pyproject.toml using
`conda-lock --platform linux-64 --platform osx-64 --platform osx-arm64 --platform linux-aarch64 --file=environments/dev-environment.yaml --file=pyproject.toml --lockfile=environments/conda-lock.yml`
@romain-intel romain-intel requested a review from a team as a code owner September 6, 2024 17:53
Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit d09648f
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/66dd4ff99aed390008fa0682
😎 Deploy Preview https://deploy-preview-678--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@maresb
Copy link
Contributor

maresb commented Sep 6, 2024

Cool!!! I have an independent alternative approach based on reading the dependencies via conda-lock which I'm using to cross-check.

I discovered that conda-lock incorrectly parses tilde and caret dependencies. 🤦 PR incoming...

@romain-intel
Copy link
Contributor Author

I got confused between ~ and ^ so I checked. I hope I got it right this time. I was going with:

  • ^: the left-most non-zero version can't change so ^0.4.1 is equivalent to >=0.4.1,<0.5.0
  • ~=: strip out the last number so ~= 1.2.3 is equivalent to >=1.2.3,==1.2.* and ~=1.2 is equivalent to >=1.2,==1.*

@maresb
Copy link
Contributor

maresb commented Sep 7, 2024

Thanks @romain-intel for your patience on this!

In #664 I can run

conda-lock -f ../cleo/pyproject.toml -f ../poetry-core/pyproject.toml -f ../poetry/pyproject.toml -c conda-forge > /tmp/pixi-test/pixi.toml

and I get stderr

./conda_lock/models/lock_spec.py:239: UserWarning: Extras not supported in Conda dep name='cachecontrol' manager='conda' category='main' extras=['filecache'] markers=None version='>=0.14.0,<0.15.0' build=None conda_channel=None hash=None
  warnings.warn(f"Extras not supported in Conda dep {dep}")
./conda_lock/models/lock_spec.py:239: UserWarning: Extras not supported in Conda dep name='pytest-xdist' manager='conda' category='test' extras=['psutil'] markers=None version='>=3.1.0,<4.0.0' build=None conda_channel=None hash=None
  warnings.warn(f"Extras not supported in Conda dep {dep}")

and stdout

# This file was generated by conda-lock for the pixi environment manager.
# For more information, see <https://github.com/conda/conda-lock> and <https://pixi.sh>.
# Source files:
# - ../cleo/pyproject.toml
# - ../poetry-core/pyproject.toml
# - ../poetry/pyproject.toml

[project]
name = "project-name-placeholder"
platforms = ['linux-64', 'osx-arm64', 'osx-64', 'win-64']
channels = ['conda-forge']

[dependencies]
cachecontrol = ">=0.14.0,<0.15.0"
cleo = ">=2.1.0,<3.0.0"
crashtest = ">=0.4.1,<0.5.0"
dulwich = ">=0.21.2,<0.22.0"
importlib-metadata = ">=4.4"
keyring = ">=24.0.0,<25.0.0"
packaging = ">=23.1"
pexpect = ">=4.7.0,<5.0.0"
pkginfo = ">=1.10.0,<2.0.0"
platformdirs = ">=3.0.0,<5"
poetry-core = "1.9.0"
poetry-plugin-export = ">=1.6.0,<2.0.0"
pyproject_hooks = ">=1.0.0,<2.0.0"
python = ">=3.8.0,<4.0.0"
python-build = ">=1.0.3,<2.0.0"
python-fastjsonschema = ">=2.18.0,<3.0.0"
python-installer = ">=0.7.0,<0.8.0"
rapidfuzz = ">=3.0.0,<4.0.0"
requests = ">=2.26.0,<3.0.0"
requests-toolbelt = ">=1.0.0,<2.0.0"
shellingham = ">=1.5.0,<2.0.0"
tomli = ">=2.0.1,<3.0.0"
tomlkit = ">=0.11.4,<1.0.0"
trove-classifiers = ">=2022.5.19"
virtualenv = ">=20.23.0,<21.0.0"

[target.osx-64.dependencies]
xattr = ">=1.0.0,<2.0.0"

[target.osx-arm64.dependencies]
xattr = ">=1.0.0,<2.0.0"

[feature.dev.dependencies]
pre-commit = ">=2.10"
towncrier = ">=22.12.0"
vendoring = ">=1.0"

[feature.doc.dependencies]
sphinx = ">=5.2.3,<6.0.0"
sphinx-rtd-theme = ">=1.0.0,<2.0.0"

[feature.github-actions.dependencies]
pytest-github-actions-annotate-failures = ">=0.1.7,<0.2.0"

[feature.test.dependencies]
coverage = ">=7.2.0"
deepdiff = ">=6.3.0,<7.0.0"
httpretty = ">=1.1.0,<2.0.0"
pytest = ">=8.0.0,<9.0.0"
pytest-cov = ">=4.0.0,<5.0.0"
pytest-mock = ">=3.9.0,<4.0.0"
pytest-randomly = ">=3.12.0,<4.0.0"
pytest-xdist = ">=3.1.0,<4.0.0"
setuptools = ">=60"
tomli-w = ">=1.0.0,<2.0.0"

[feature.typing.dependencies]
mypy = ">=1.8.0"
types-requests = ">=2.28.8"
types-setuptools = ">=57.4.14"

Note that the relevant section is [dependencies] but the names have been mapped from pypi to conda-forge.

It's very possible that there are errors in the above, but I have spotted discrepancies in the version constraints. I believe some discrepancies are due to looking at the poetry/poetry-core/cleo main branch instead of looking at the tags for the vendored releases. I will try and finish my computation of the dependencies tomorrow. If you manage to find the time it'd be great if you could also do it independently so that we can compare answers.

@romain-intel
Copy link
Contributor Author

Yes -- you are right, I looked at a mixture it looks like. I think the versions you present are correct. Let me update the PR.

@maresb
Copy link
Contributor

maresb commented Sep 8, 2024

Thanks @romain-intel! I have done this independently in a few different ways, and my work matches yours.

@maresb maresb merged commit 30250d2 into conda:main Sep 8, 2024
10 checks passed
@maresb maresb mentioned this pull request Sep 8, 2024
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.

ModuleNotFoundError: No module named 'build' with no command line options
2 participants