question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

internal library dosen't get version from git repo

See original GitHub issue
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: MacOS 11.1 (20C69)

  • Poetry version: 1.1.13 (tried also on 1.2.0b1)

    • Link of a Gist with the contents of your pyproject.toml file: in the issues

Issue

I have a repo A that is using 2 other repos B and C C is also using B

A’s pyproject.toml

B = {git = "<B's github repo>", branch = "my-branch"}
C = {version="^0.5.8"}

B’s pyproject.toml (in my-branch branch)

[tool.poetry]
name = "B"
version = "0.31.0"

C’s pyproject.toml

B = {version=">=0.30"}

The current versions of B in my PyPI server are (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4)

It seems that when locking C inside A, C’s not aware B’s version is acceptable

  Because no versions of B match >0.30,<0.30.1 || >0.30.1,<0.30.2 || >0.30.2,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4
   and B (0.30.0) depends on B (0.30.0), B (>=0.30,<0.30.1 || >0.30.1,<0.30.2 || >0.30.2,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4) requires B (0.30.0).
  And because B (0.30.1) depends on B (0.30.1)
   and B (0.30.2) depends on B (0.30.2), B (>=0.30,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4) requires B (0.30.0 || 0.30.1 || 0.30.2).
  And because B (0.30.3) depends on B (0.30.3)
   and B (0.30.4) depends on B (0.30.4), B (>=0.30) requires B (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4).
  Because no versions of C match >0.5.8
   and C (0.5.8) depends on B (>=0.30), C (>=0.5.8) requires B (>=0.30).
  Thus, C (>=0.5.8) requires B (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4).
  And because B (rev my-branch) depends on B (rev my-branch), C (>=0.5.8) is incompatible with B (rev my-branch).
  So, because A depends on both B (branch my-branch) and C (>=0.5.8), version solving failed.

I tried to publish my-branch as a beta branch, changed A’s to use this version, and still had the same issue

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:4
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ericman93commented, May 27, 2022
Source (PyPI): 17 packages found for coverage >=5.2.1
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/coverage/ HTTP/1.1" 404 10
   1: selecting coverage (6.4)
Source (PyPI): No release information found for py-0.8.0-alpha2, skipping
Source (PyPI): No release information found for py-0.9.0, skipping
Source (PyPI): No release information found for py-1.4.32.dev1, skipping
Source (PyPI): 4 packages found for py >=1.8.2
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/py/ HTTP/1.1" 404 10
   1: selecting py (1.11.0)
Source (PyPI): 4 packages found for pluggy >=0.12,<2.0
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/pluggy/ HTTP/1.1" 404 10
   1: selecting pluggy (1.0.0)
Source (PyPI): No release information found for iniconfig-0.0, skipping
Source (PyPI): 5 packages found for iniconfig *
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/iniconfig/ HTTP/1.1" 404 10
   1: selecting iniconfig (1.1.1)
Source (PyPI): No release information found for numpy-0.9.6, skipping
Source (PyPI): No release information found for numpy-0.9.8, skipping
Source (PyPI): No release information found for numpy-1.0.3, skipping
Source (PyPI): No release information found for numpy-1.0.4, skipping
Source (PyPI): No release information found for numpy-1.0b1, skipping
Source (PyPI): No release information found for numpy-1.0b4, skipping
Source (PyPI): No release information found for numpy-1.0b5, skipping
Source (PyPI): No release information found for numpy-1.0rc1, skipping
Source (PyPI): No release information found for numpy-1.0rc2, skipping
Source (PyPI): No release information found for numpy-1.0rc3, skipping
Source (PyPI): No release information found for numpy-1.1.1, skipping
Source (PyPI): No release information found for numpy-1.2.0, skipping
Source (PyPI): No release information found for numpy-1.2.1, skipping
Source (PyPI): No release information found for numpy-1.4.0, skipping
Source (PyPI): 53 packages found for numpy >=1.14
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/numpy/ HTTP/1.1" 404 10
   1: selecting numpy (1.22.4)
Source (PyPI): 1 packages found for sklearn 0.0
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/sklearn/ HTTP/1.1" 404 10
   1: fact: sklearn (0.0) depends on scikit-learn (*)
   1: selecting sklearn (0.0)
Source (PyPI): No release information found for scipy-0.4.4, skipping
Source (PyPI): No release information found for scipy-0.5.2, skipping
Source (PyPI): No release information found for scipy-0.6.0, skipping
Source (PyPI): No release information found for scipy-0.7.0, skipping
Source (PyPI): No release information found for scipy-0.7.2, skipping
Source (PyPI): 1 packages found for scipy 1.7.0
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/scipy/ HTTP/1.1" 404 10
   1: fact: scipy (1.7.0) depends on numpy (>=1.16.5,<1.23.0)
   1: selecting scipy (1.7.0)
Source (PyPI): No release information found for scikit-learn-0.14a1, skipping
Source (PyPI): 2 packages found for scikit-learn 0.22.2
[urllib3.connectionpool] https://pypi.fury.io:443 "GET /explorium/scikit-learn/ HTTP/1.1" 404 10
   1: fact: scikit-learn (0.22.2.post1) depends on numpy (>=1.11.0)
   1: fact: scikit-learn (0.22.2.post1) depends on scipy (>=0.17.0)
   1: fact: scikit-learn (0.22.2.post1) depends on joblib (>=0.11)
   1: Version solving took 22.211 seconds.
   1: Tried 1 solutions.

  Stack trace:
0reactions
ericman93commented, Jun 23, 2022

I removed the problematic sckitlearn package and now the solving is finishes successfully 100% of the time the issue now is that it can’t get a valid version of uvicorn (albus is from my private repo)

  Because no versions of albus match >=0.40,<0.40.2 || >0.40.2,<0.41
   and albus (0.40.2) depends on uvicorn (>=0.17.0,<0.18.0), albus (>=0.40,<0.41) requires uvicorn (>=0.17.0,<0.18.0).
  So, because no versions of uvicorn match >=0.17.0,<0.18.0
   and chef depends on albus (^0.40), version solving failed.

but reading the -vvv logs I do see that it found a valid version

   1: selecting uvicorn[standard] (0.17.6)

right after locking the file, I see those logs (and those are the only libs with extras)

Finding the necessary packages for the current system
Falling back to installed packages to discover metadata for uvicorn[standard]
Found 0 compatible packages for uvicorn[standard]
Falling back to installed packages to discover metadata for dask[distributed]
Found 0 compatible packages for dask[distributed]
Falling back to installed packages to discover metadata for albus[aioredis,atlas,dask,explorium,filesystem,http,interops,jupyter,message_bus,pandas,rq,s3,tracing]
Found 0 compatible packages for albus[
aioredis,atlas,dask,explorium,filesystem,http,interops,jupyter,message_bus,pandas,rq,s3,tracing]

Albus’s pyproject

[tool.poetry.dependencies]
uvicorn = { version = "^0.17.0", optional = true, extras=['standard'] }
dask = { version = "==2022.5.0", extras = ["distributed"], optional = true }

[tool.poetry.extras]
http = ["gunicorn", "uvicorn", "fastapi", "python-jose", "auth0-python", "inflect", "jaraco.text", "opentelemetry-instrumentation-fastapi"]
dask = ["dask", "crontab", "bokeh"]

pyproject of the repo I’m trying to update

[tool.poetry.dependencies]
albus = { version = "^0.40", source="explorium", extras = ["http", "pandas", "filesystem", "s3", "message_bus", "explorium", "rq", "aioredis", "atlas", "interops", "dask", "jupyter", "tracing"] }

[tool.poetry.dev-dependencies]
albus = { version = "^0.40", source="explorium", extras = ["testing"] }

full logs are attached poetry.log

@dimbleby still no repo but a major update

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get current version of repository - git - Stack Overflow
Get the last version of a repository (online). I can only compare the two, but it doesn't give me any information about the...
Read more >
git - How do you put different versions of your library under ...
Before using version control, I used to do something like this. I had a folder with the name of the library, inside many...
Read more >
It is possible to add a dependency of a private git repo? #835
I've just stated to use poetry, I quite like some of the features, but i'm now stuck since installing a private repo doesn't...
Read more >
Git - Submodules - Git SCM
Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your...
Read more >
Source Control with Git in Visual Studio Code
Make sure Git is installed. VS Code will use your machine's Git installation (at least version 2.0.0 ), so you need to install...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found