HomeSoftware Heritage

Replace `urllib2` HTTP requests with `urllib3`

Description

Replace urllib2 HTTP requests with urllib3

dulwich.client.default_urllib2_opener has been replaced by
dulwich.client.default_urllib3_manager with otherwise similar input
arguments, returning a urllib3.PoolManager or urllib3.ProxyManager,
depending on whether a proxy configuration is given.

The opener argument to dulwich.client.HttpGitClient that took a
urllib2 opener instance has been replaced by a pool_manager argument
that takes a urllib3 pool manager instance.

Initially tested with urllib3 version 1.21, but anything later in the
1.x series should work.

Added a requirements.txt as a common convention for local setup with a
known working version. Pinned it to the latest available urllib3
version at the time.

Details

Provenance
Daniel Andersson <dandersson@users.noreply.github.com>Authored on Jan 25 2018, 2:33 PM
ardumontPushed on Sep 27 2021, 5:34 PM
Parents
rPPDW1578223d194f: Fix "wrong" read method called
Branches
Unknown
Tags
Unknown

Event Timeline