diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e95bd05..f64b97a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,12 +13,14 @@ image: fluiddyn/python3-stable:lastest validate_code: script: - # - pdm info - # - pdm info --env - - rm -rf ../unearth - - git clone https://github.com/paugier/unearth.git ../unearth - - pip install -e ../unearth --user - - python3.9 -c "from unearth import PackageFinder as F; f = F(index_urls=['https://pypi.org/simple/']); print(list(f.find_all_packages('flit-core')))" + - pip install requests + - python3.9 tmp_bug_unearth.py + + # - rm -rf ../unearth + # - git clone https://github.com/paugier/unearth.git ../unearth + # - pip install -e ../unearth --user + # - python3.9 -c "from unearth import PackageFinder as F; f = F(index_urls=['https://pypi.org/simple/']); print(list(f.find_all_packages('flit-core')))" + # - pdm install -G dev -v # - pdm run make lint # - pdm run make black_check \ No newline at end of file diff --git a/tmp_bug_unearth.py b/tmp_bug_unearth.py new file mode 100644 index 00000000..b0f7c3bd --- /dev/null +++ b/tmp_bug_unearth.py @@ -0,0 +1,24 @@ +from requests import Session + +session = Session() + +resp = session.get( + "https://pypi.org/simple/flit-core/", + headers={ + "Accept": ", ".join( + [ + "application/vnd.pypi.simple.v1+json", + "application/vnd.pypi.simple.v1+html; q=0.1", + "text/html; q=0.01", + ] + ), + # Don't cache the /simple/{package} page, to ensure it gets updated + # immediately when a new release is uploaded. + "Cache-Control": "max-age=0", + }, + timeout=10, +) + +print(resp.content[-400:]) + +print(resp.json()["versions"])