Skip to main content

The requests library is a useful and well-written HTTP library for Python, by Kenneth Reitz.

In December 2012, Reitz released version 1.0 of requests and decided that it would break backward compatibility with the 0.x versions. This is a valid thing to do – after all, that’s what major version numbers are for.

Unfortunately, the state of Python packaging is pretty bad about managing multiple versions of the same library. There’s lots of code out there that depends on Requests 0.x, and it can’t all be instantly updated to 1.0.

Some libraries have been declaring a dependency on “requests < 1.0” using setuptools, which allows them to keep working if you use setuptools right. But the problem there is that you can’t ever upgrade to 1.x while using such code.

We want to make it possible to move to the shiny new Requests 1.x code. But we also want our code stack to keep working in the present. That’s the purpose of requests-transition. All it does is it installs both versions of requests as two different packages with different names.

To use Requests 0.14:

import requests0 as requests

To use Requests 1.0:

import requests1 as requests

Installation

To install this distribution, simply:

$ pip install requests-transition

For once it’s actually relevant that Python distributions can have multiple packages in them. This will install two packages, requests0 and requests1.

It will not install anything as a package named requests; that name still belongs to the real distribution of requests, whichever version of it you choose to install.

Release files for requests-transition 1.0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for requests-transition 1.0.4.0
File Size Uploaded
requests-transition-1.0.4.0.tar.gz 701.6 kB Details

Release files / requests-transition-1.0.4.0.tar.gz

Download URL requests-transition-1.0.4.0.tar.gz
Size 701.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c2a82263adeda89181a7e181d5d93acaa4a9fc3b4e6d6966adf6af94200004c0
BLAKE2b-256 checksum
How to use checksums
f7ecbb7ca43ae244d624ea8c71d9018d775727353dde2685234de9ec3f46b278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.4.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page