Skip to content

Commit 83b2274

Browse files
authored
Merge branch 'master' into 415-altendky-deprecation_warnings
2 parents 02fdb32 + 5c7cdfb commit 83b2274

28 files changed

+191
-75
lines changed

TESTING.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ The test suite can be run with:
44

55
$ tox
66

7-
which tests the module under a number of different python versions, where available.
7+
which tests the module under a number of different python versions, where available, or with:
8+
9+
$ py.test
10+
11+
To execute a single test:
12+
13+
$ pytest -k test_chained_exceptions_stacktrace

docs/compatible_idioms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ urllib module
12701270
~~~~~~~~~~~~~
12711271

12721272
``urllib`` is the hardest module to use from Python 2/3 compatible code.
1273-
You may like to use Requests (http://python-requests.org) instead.
1273+
You might want to switch to Requests (http://python-requests.org) instead.
12741274

12751275
.. code:: python
12761276

docs/credits.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Python-Future is largely written by Ed Schofield <[email protected]> with th
5050
- Grant Bakker
5151
- Jacob Beck
5252
- Nate Bogdanowicz
53+
- Christian Clauss
5354
- Denis Cornehl
5455
- Nicolas Delaby
5556
- Jon Dufresne
@@ -79,7 +80,6 @@ Python-Future is largely written by Ed Schofield <[email protected]> with th
7980
- Jeff Tratner
8081
- Tim Tröndle
8182
- Brad Walker
82-
- cclaus (GiHub user)
8383
- lsm (GiHub user)
8484
- Mystic-Mirage (GitHub user)
8585
- str4d (GitHub user)

docs/futurize_overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ use the ``-w`` flag.
5151

5252
For complex projects, it is probably best to divide the porting into two stages.
5353
Stage 1 is for "safe" changes that modernize the code but do not break Python
54-
2.7 compatibility or introduce a depdendency on the ``future`` package. Stage 2
54+
2.7 compatibility or introduce a dependency on the ``future`` package. Stage 2
5555
is to complete the process.

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"past.builtins",
4747
"past.types",
4848
"past.utils",
49-
# "past.tests",
5049
"past.translation",
5150
"libfuturize",
5251
"libfuturize.fixes",

src/future/backports/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from future.standard_library import import_top_level_modules
1111

1212

13-
if sys.version_info[0] == 3:
13+
if sys.version_info[0] >= 3:
1414
import_top_level_modules()
1515

1616

src/future/backports/email/message.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def set_boundary(self, boundary):
800800
# There was no Content-Type header, and we don't know what type
801801
# to set it to, so raise an exception.
802802
raise errors.HeaderParseError('No Content-Type header found')
803-
newparams = []
803+
newparams = list()
804804
foundp = False
805805
for pk, pv in params:
806806
if pk.lower() == 'boundary':
@@ -814,10 +814,10 @@ def set_boundary(self, boundary):
814814
# instead???
815815
newparams.append(('boundary', '"%s"' % boundary))
816816
# Replace the existing Content-Type header with the new value
817-
newheaders = []
817+
newheaders = list()
818818
for h, v in self._headers:
819819
if h.lower() == 'content-type':
820-
parts = []
820+
parts = list()
821821
for k, v in newparams:
822822
if v == '':
823823
parts.append(k)

src/future/backports/http/cookiejar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@
3333
from __future__ import division
3434
from __future__ import absolute_import
3535
from future.builtins import filter, int, map, open, str
36-
from future.utils import as_native_str
36+
from future.utils import as_native_str, PY2
3737

3838
__all__ = ['Cookie', 'CookieJar', 'CookiePolicy', 'DefaultCookiePolicy',
3939
'FileCookieJar', 'LWPCookieJar', 'LoadError', 'MozillaCookieJar']
4040

4141
import copy
4242
import datetime
4343
import re
44-
re.ASCII = 0
44+
if PY2:
45+
re.ASCII = 0
4546
import time
4647
from future.backports.urllib.parse import urlparse, urlsplit, quote
4748
from future.backports.http.client import HTTP_PORT

src/future/backports/http/cookies.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
# Import our required modules
139139
#
140140
import re
141-
re.ASCII = 0 # for py2 compatibility
141+
if PY2:
142+
re.ASCII = 0 # for py2 compatibility
142143
import string
143144

144145
__all__ = ["CookieError", "BaseCookie", "SimpleCookie"]

src/future/moves/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
__future_module__ = True
55
from future.standard_library import import_top_level_modules
66

7-
if sys.version_info[0] == 3:
7+
if sys.version_info[0] >= 3:
88
import_top_level_modules()

0 commit comments

Comments
 (0)