devpi / devpi-constrained

releases filter for devpi-server
MIT License
8 stars 2 forks source link

Constraints are not inherited #7

Open amoutaux opened 10 months ago

amoutaux commented 10 months ago

Hello,

I am encountering the same issue as in #3

$ devpi --version
devpi-client 7.0.2

current devpi server: http://localhost:3141
    devpi-constrained 2.0.1
    devpi-server 6.9.2
    devpi-web 4.2.1
http://localhost:3141/root/dev:
  type=stage
  bases=root/pypi-constrained
  volatile=True
  acl_upload=root
  acl_toxresult_upload=:ANONYMOUS:
  mirror_whitelist=
  mirror_whitelist_inheritance=intersection

http://localhost:3141/root/pypi-constrained:
  type=constrained
  bases=root/pypi
  volatile=True
  acl_upload=root
  acl_toxresult_upload=:ANONYMOUS:
  constraints=virtualenv==v20.24.5
  mirror_whitelist=
  mirror_whitelist_inheritance=intersection

http://localhost:3141/root/pypi:
  type=mirror
  volatile=False
  mirror_url=https://pypi.org/simple/
  mirror_web_url_fmt=https://pypi.org/project/{name}/
  title=PyPI

Unfortunately:

pip install -i http://localhost:3141/root/pypi-constrained --no-cache-dir virtualenv
--> install virtualenv 20.24.5

pip install -i http://localhost:3141/root/dev --no-cache-dir virtualenv
--> install virtualenv 20.24.6

From my understanding this issue has been resolved already and I see the tests are passing, is there something I misunderstood ?

Many thanks

amoutaux commented 10 months ago

Hello again @fschulze,

After a bit of investigation, it seems that devpi-constrained methods are not called at all when using an index that is not of type "constrained", even if it inherit a constrained one (as in my example above).

Also, if an constrained index inherits from another constrained index, the constraints are not propagated either.

fschulze commented 10 months ago

I noticed there are also no tests for inherited indexes, which is an oversight on my part. I hope to look into it soon, but have no ETA.