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 fecd8f1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ 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 index versions 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
20 changes: 20 additions & 0 deletions tmp_bug_unearth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from datetime import datetime

from requests import Session

session = Session()

print("before get:", datetime.now())
resp = session.get(
"https://pypi.org/simple/flit-core/",
headers={
"Accept": "application/vnd.pypi.simple.v1+json",
"Cache-Control": "no-cache",
},
timeout=120,
)
print("after get:", datetime.now())

print(resp)
print(resp.content[-400:])
print(resp.json()["versions"])

0 comments on commit fecd8f1

Please sign in to comment.