Description
Author's note: This was originally meant to be compiled in a blog post once pip was working again, but since people have repeatedly submitted GitHub issues complaining about pip not working, I decided to write and pin this issue.
Background
On 29 January 2022, pip v22.0 was released. This broke our CI workflow because pip vendors dependencies that we don't currently support. (In that same update, pip dropped support for Python 3.6, which can introduce more incompatibilities, as there are parts of our codebase that haven't been updated since Python 3.6, such as asyncio
.)
Progress so far
- In Bad f-string, causing CI issuesΒ #3531, I reported a problem in the way that RustPython parsed "format specifier expressions" in f-strings. In CPython's f-strings, it's possible to format numbers with a width and a precision. However, RustPython's f-strings wouldn't let you use variables in the context of those width and precision values. With the help of VSCode and LLDB, I engineered a fix and submitted Fix f-string format specΒ #3532.
- While I was working on the previous problem, I noticed that pip needed the
mmap
module in order to function. In mmap skeletonΒ #3564, @youknowone contributed a (nonfunctional) skeleton for themmap
module, which was abandoned shortly thereafter. (I suppose this effort stalled because we needed a way to abstract over both read-only and read-write memory maps, andmemmap2
doesn't have a trait to extract over both theMmap
and theMmapMut
structs. However, I could be wrong.) Thankfully, @killme2008 contributed mmap moduleΒ #3755, taking a considerable amount of effort and time to make themmap
module functional (on macOS and Linux) - Next, it was noticed that
get-pip.py
was taking too long, so @youknowone identified and fixed a deadlock in Fix slot call deadlockΒ #3792. - Finally, the
get-pip.py
script was working, but it couldn't find apip
to download, and it wasn't leaving much of a trail to trace the root cause. (Even when pip was installed withensurepip
, pip would still fail to install a package from PyPI.) Thankfully, @dieterplex narrowed the problem down to the HTML parser. A little later, the HTML parser's problem was isolated to within there
module. As of 29 June 2022, this is the extent of the current progress.
If you were mentioned in the previous bullet points, thank you very much for helping this along.
How you can help
- Please consider leaving an emoji reaction (or a comment) on this issue instead of filing a new issue. Filing new issues tends to drown out other issues that other people might find more approachable.
- A good way to get started contributing code is to update a Python module (and its corresponding test suite, if possible) to the latest stable version of CPython (v3.10 as of when I'm writing this). You can let a maintainer know if you're running into problems.
- From what I have seen, Windows doesn't get nearly as much attention as Linux or macOS. If you are a Windows user, I invite you to help RustPython expand its Windows support.
(Maintainers, please feel free to edit this issue as you see fit, especially if I misrepresented something.)