Skip to content

Commit

Permalink
Add tmp_bug_unearth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 3, 2024
1 parent a1a7888 commit 2f5d132
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions tmp_bug_unearth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from requests import Session

session = Session()

resp = session.get(
"https://pypi.org/simple/flit-core/",
headers={
"Accept": "application/vnd.pypi.simple.v1+json",
# # 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"])

0 comments on commit 2f5d132

Please sign in to comment.