Closed white-gecko closed 3 months ago
I ran with 3.12 prior to the change in urllib3 version and it worked. The pin to that particular old urllib3 version was related to proxy http/https, as @tw4l mentioned a few days ago. This error ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
doesn't seem to have an obvious cause, when I google it.
This CI failure was caused by pypi timing out. I'll try it again in a while.
Hm. I made my own branch that tests 3.12 and uses the exact urllib3 version and no bueno.
Locally on my machine it works with python 3.12, I also made an integration branch which succeeded on github: https://github.com/white-gecko/warcio/actions/runs/10452831491/job/28944239907
I have rebased the branch on the current master, according to my experiments that should work.
The urllib3==1.25.11
dependency causes ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
on python 3.12. At least 1.26.5
is required. It can also be seen in the urllib3 changelog, that an update to the six
dependency happened: https://github.com/urllib3/urllib3/blob/main/CHANGES.rst#1265-2021-05-26.
I have just adjusted the minimum version from 1.26.4
to 1.26.5
.
OK, I think this is fully safe. Thanks @white-gecko for working out this fix and also for figuring out that at some point urllib3 fixed the http/https proxy thing that motivated us pinning the version in the first place.
I still have 2 questions:
1) why the upper bound in 'urllib3>=1.26.5,<1.26.16',
?
2) can we future-proof installing setuptools
for python 3.12 and up? Right now it's only exactly 3.12.
I can answer both of my questions myself, I suppose.
OK, I think this is fully safe. Thanks @white-gecko for working out this fix and also for figuring out that at some point urllib3 fixed the http/https proxy thing that motivated us pinning the version in the first place.
I still have 2 questions:
1. why the upper bound in `'urllib3>=1.26.5,<1.26.16',`? 2. can we future-proof installing `setuptools` for python 3.12 and up? Right now it's only exactly 3.12.
Thank you for raising the question. It might be relevant to document the decisions.
For future-proofing, you were installing setuptools only if the python version was exactly 3.12 ... I made it a >= while trying to get 3.13-rc to work, and that worked fine, although 3.13-rc itself failed because the greenlet wheel doesn't build. (This is typical when trying out release candidates...)
- name: Install setuptools on python 3.12
if: ${{ matrix.python-version == '3.12' }}
run: |
pip install setuptools
Requires: #172
Add python 3.12 to the build matrix. Install
setuptools
in test environment for python 3.12 (cf. #168).