Skip to content
Myr

Avoid breaking people using requests.__version__

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Using __version__ as a module breaks users who expect requests.__version__ to be the version string.

authored by Ian Cordasco · committed by Ian Cordasco · parent 4f8f4b5 · Browse files · 5 files+19 added−19 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+19 added−19 removed

  • other:+19 added−19 removed

5 files+19 added−19 removed

modified:docs/conf.py+1 added-1 removed
23 unmodified lines
24sys.path.insert(0, os.path.abspath('..'))25sys.path.insert(0, os.path.abspath('_themes'))2627import requests28from requests.__version__ import __version__28from requests import __version__293031# -- General configuration ------------------------------------------------32
347 unmodified lines
added:requests/__about__.py+16 added
1# -*- coding: utf-8 -*-23# .-. .-. .-. . . .-. .-. .-. .-.4# |( |- |.| | | |- `-. | `-.5# ' ' `-' `-`.`-' `-' `-' ' `-'67__title__ = 'requests'8__description__ = 'Python HTTP for Humans.'9__url__ = 'http://python-requests.org'10__version__ = '2.14.2'11__build__ = 0x02140212__author__ = 'Kenneth Reitz'13__author_email__ = 'me@kennethreitz.org'14__license__ = 'Apache 2.0'15__copyright__ = 'Copyright 2017 Kenneth Reitz'16__cake__ = u'✨ 🍰 ✨ Thanks for using my software. It means the world to me. --kennethreitz'
modified:requests/__init__.py+1 added-1 removed
38 unmodified lines
39:copyright: (c) 2017 by Kenneth Reitz.40:license: Apache 2.0, see LICENSE for more details.41"""4243from .__version__ import *43from .__about__ import *4445# Attempt to enable urllib3's SNI support, if possible46try:47 from .packages.urllib3.contrib import pyopenssl
34 unmodified lines
deleted:requests/__version__.py-16 removed
1# -*- coding: utf-8 -*-23# .-. .-. .-. . . .-. .-. .-. .-.4# |( |- |.| | | |- `-. | `-.5# ' ' `-' `-`.`-' `-' `-' ' `-'67__title__ = 'requests'8__description__ = 'Python HTTP for Humans.'9__url__ = 'http://python-requests.org'10__version__ = '2.14.2'11__build__ = 0x02140212__author__ = 'Kenneth Reitz'13__author_email__ = 'me@kennethreitz.org'14__license__ = 'Apache 2.0'15__copyright__ = 'Copyright 2017 Kenneth Reitz'16__cake__ = u'✨ 🍰 ✨ Thanks for using my software. It means the world to me. --kennethreitz'
modified:setup.py+1 added-1 removed
51 unmodified lines
52requires = []53test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock']5455about = {}56with open(os.path.join(here, 'requests', '__version__.py')) as f:56with open(os.path.join(here, 'requests', '__about__.py')) as f:57 exec(f.read(), about)5859with open('README.rst', 'r', 'utf-8') as f:60 readme = f.read()
43 unmodified lines