Skip to content
Myr

setup.py

This file

Path

setup.py

105 lines · 3.1 KiB · Python

Last changed by

Fix CI and build failures (#7190)Nate Prewittbefore adoptionf8bec2f

History of this file

Take it

The walk stopped after 200 commits: lines older than 1096835 point at it.

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 1–7why, one step back
1#!/usr/bin/env python
2import os3import sys4from codecs import open56from setuptools import setup7

Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583

line 8why, one step back
8CURRENT_PYTHON = sys.version_info[:2]

Add support for Python 3.14 and drop support for Python 3.8 (#6993)Nate Prewittbefore adoption2edca11

line 9why, one step back
9REQUIRED_PYTHON = (3, 9)

Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583

lines 10–21why, one step back
10
11if CURRENT_PYTHON < REQUIRED_PYTHON:12 sys.stderr.write(13 """14==========================15Unsupported Python version16==========================17This version of Requests requires at least Python {}.{}, but18you're trying to install it on Python {}.{}. To resolve this,19consider upgrading to a supported Python version.2021If you can't upgrade your Python version, you'll need to

Merge pull request #6642 from nateprewitt/drop_python_37Nate Prewittbefore adoption7a13c04

line 22why, one step back
22pin to an older version of Requests (<2.32.0).

Fix CI and build failures (#7190)Nate Prewittbefore adoptionf8bec2f

line 23why, one step back
23""".format(*(REQUIRED_PYTHON + CURRENT_PYTHON))

Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583

lines 24–26why, one step back
24 )
25 sys.exit(1)26

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 27why, one step back
27

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

line 28why, one step back
28# 'setup.py publish' shortcut.

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 29–31why, one step back
29if sys.argv[-1] == "publish":
30 os.system("python setup.py sdist bdist_wheel")31 os.system("twine upload dist/*")

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 32–34why, one step back
32 sys.exit()
3334requires = [

Allow charset normalizer >=2 and <4 (#6261)deedy5before adoptionc57f1f0

line 35why, one step back
35 "charset_normalizer>=2,<4",

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 36why, one step back
36 "idna>=2.5,<4",

v2.30.0Nate Prewittbefore adoption2ad18e0

line 37why, one step back
37 "urllib3>=1.21.1,<3",

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 38why, one step back
38 "certifi>=2017.4.17",

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 39–40why, one step back
39]
40test_requirements = [

Merge pull request #6802 from graingert/3.13Ian Stapleton Cordascobefore adoption1ae6fc3

line 41why, one step back
41 "pytest-httpbin==2.1.0",

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 42–46why, one step back
42 "pytest-cov",
43 "pytest-mock",44 "pytest-xdist",45 "PySocks>=1.5.6, !=1.5.7",46 "pytest>=3",

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 47–49why, one step back
47]
4849about = {}

Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583

line 50why, one step back
50here = os.path.abspath(os.path.dirname(__file__))

Move to src directory (#6506)Nate Prewittbefore adoptiond63e94f

line 51why, one step back
51with open(os.path.join(here, "src", "requests", "__version__.py"), "r", "utf-8") as f:

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 52–53why, one step back
52 exec(f.read(), about)
53

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 54why, one step back
54with open("README.md", "r", "utf-8") as f:

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 55–57why, one step back
55 readme = f.read()
5657setup(

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 58–60why, one step back
58 name=about["__title__"],
59 version=about["__version__"],60 description=about["__description__"],

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

line 61why, one step back
61 long_description=readme,

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 62–67why, one step back
62 long_description_content_type="text/markdown",
63 author=about["__author__"],64 author_email=about["__author_email__"],65 url=about["__url__"],66 packages=["requests"],67 package_data={"": ["LICENSE", "NOTICE"]},

Move to src directory (#6506)Nate Prewittbefore adoptiond63e94f

line 68why, one step back
68 package_dir={"": "src"},

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

line 69why, one step back
69 include_package_data=True,

Add support for Python 3.14 and drop support for Python 3.8 (#6993)Nate Prewittbefore adoption2edca11

line 70why, one step back
70 python_requires=">=3.9",

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

line 71why, one step back
71 install_requires=requires,

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 72why, one step back
72 license=about["__license__"],

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 73–74why, one step back
73 zip_safe=False,
74 classifiers=[

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 75–85why, one step back
75 "Development Status :: 5 - Production/Stable",
76 "Environment :: Web Environment",77 "Intended Audience :: Developers",78 "License :: OSI Approved :: Apache Software License",79 "Natural Language :: English",80 "Operating System :: OS Independent",81 "Programming Language :: Python",82 "Programming Language :: Python :: 3",83 "Programming Language :: Python :: 3.9",84 "Programming Language :: Python :: 3.10",85 "Programming Language :: Python :: 3.11",

Add 3.12 classifier and tox configuration (#6503)Nate Prewittbefore adoptione9fa2e2

line 86why, one step back
86 "Programming Language :: Python :: 3.12",

Merge pull request #6802 from graingert/3.13Ian Stapleton Cordascobefore adoption1ae6fc3

line 87why, one step back
87 "Programming Language :: Python :: 3.13",

Add support for Python 3.14 and drop support for Python 3.8 (#6993)Nate Prewittbefore adoption2edca11

line 88why, one step back
88 "Programming Language :: Python :: 3.14",

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 89–93why, one step back
89 "Programming Language :: Python :: 3 :: Only",
90 "Programming Language :: Python :: Implementation :: CPython",91 "Programming Language :: Python :: Implementation :: PyPy",92 "Topic :: Internet :: WWW/HTTP",93 "Topic :: Software Development :: Libraries",

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 94–96why, one step back
94 ],
95 tests_require=test_requirements,96 extras_require={

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 97–98why, one step back
97 "security": [],
98 "socks": ["PySocks>=1.5.6, !=1.5.7"],

Update Dependency with `chardet>=3.0.2,<6` (#6179)Wong Hoi Sing Edisonbefore adoption73793ce

line 99why, one step back
99 "use_chardet_on_py3": ["chardet>=3.0.2,<6"],

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 100–101why, one step back
100 },
101 project_urls={

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 102–103why, one step back
102 "Documentation": "https://requests.readthedocs.io",
103 "Source": "https://github.com/psf/requests",

Appropriately handle urllib3's InvalidHeader exception (#5914)Nate Prewittbefore adoption1096835

lines 104–105why, one step back
104 },
105)