Skip to content

Commit 788be07

Browse files
committed
Intermediate changes
1 parent b3463ec commit 788be07

File tree

25 files changed

+138
-81
lines changed

25 files changed

+138
-81
lines changed

contrib/python/future/py2/.dist-info/METADATA

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Metadata-Version: 2.1
22
Name: future
3-
Version: 0.18.3
3+
Version: 1.0.0
44
Summary: Clean single-source support for Python 3 and 2
55
Home-page: https://python-future.org
66
Author: Ed Schofield
77
Author-email: [email protected]
88
License: MIT
9+
Project-URL: Source, https://github.com/PythonCharmers/python-future
910
Keywords: future past python3 migration futurize backport six 2to3 modernize pasteurize 3to2
10-
Platform: UNKNOWN
1111
Classifier: Programming Language :: Python
1212
Classifier: Programming Language :: Python :: 2
1313
Classifier: Programming Language :: Python :: 2.6
@@ -18,11 +18,17 @@ Classifier: Programming Language :: Python :: 3.4
1818
Classifier: Programming Language :: Python :: 3.5
1919
Classifier: Programming Language :: Python :: 3.6
2020
Classifier: Programming Language :: Python :: 3.7
21+
Classifier: Programming Language :: Python :: 3.8
22+
Classifier: Programming Language :: Python :: 3.9
23+
Classifier: Programming Language :: Python :: 3.10
24+
Classifier: Programming Language :: Python :: 3.11
25+
Classifier: Programming Language :: Python :: 3.12
2126
Classifier: License :: OSI Approved
2227
Classifier: License :: OSI Approved :: MIT License
23-
Classifier: Development Status :: 4 - Beta
28+
Classifier: Development Status :: 6 - Mature
2429
Classifier: Intended Audience :: Developers
2530
Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*
31+
License-File: LICENSE.txt
2632

2733

2834
future: Easy, safe support for Python 2/3 compatibility
@@ -78,7 +84,7 @@ Automatic conversion
7884
--------------------
7985

8086
An included script called `futurize
81-
<http://python-future.org/automatic_conversion.html>`_ aids in converting
87+
<https://python-future.org/automatic_conversion.html>`_ aids in converting
8288
code (from either Python 2 or Python 3) to code compatible with both
8389
platforms. It is similar to ``python-modernize`` but goes further in
8490
providing Python 3 compatibility through the use of the backported types
@@ -88,22 +94,19 @@ and builtin functions in ``future``.
8894
Documentation
8995
-------------
9096

91-
See: http://python-future.org
97+
See: https://python-future.org
9298

9399

94100
Credits
95101
-------
96102

97103
:Author: Ed Schofield, Jordan M. Adler, et al
98-
:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
99-
Ltd, Singapore. http://pythoncharmers.com
100-
:Others: See docs/credits.rst or http://python-future.org/credits.html
104+
:Sponsor: Python Charmers: https://pythoncharmers.com
105+
:Others: See docs/credits.rst or https://python-future.org/credits.html
101106

102107

103108
Licensing
104109
---------
105-
Copyright 2013-2019 Python Charmers Pty Ltd, Australia.
110+
Copyright 2013-2024 Python Charmers, Australia.
106111
The software is distributed under an MIT licence. See LICENSE.txt.
107112

108-
109-
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[console_scripts]
22
futurize = libfuturize.main:main
33
pasteurize = libpasteurize.main:main
4-

contrib/python/future/py2/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013-2019 Python Charmers Pty Ltd, Australia
1+
Copyright (c) 2013-2024 Python Charmers, Australia
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

contrib/python/future/py2/README.rst

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@
33
Overview: Easy, clean, reliable Python 2/3 compatibility
44
========================================================
55

6-
.. image:: https://travis-ci.org/PythonCharmers/python-future.svg?branch=master
7-
:target: https://travis-ci.org/PythonCharmers/python-future
8-
9-
.. image:: https://readthedocs.org/projects/python-future/badge/?version=latest
10-
:target: https://python-future.readthedocs.io/en/latest/?badge=latest
6+
.. image:: https://github.com/PythonCharmers/python-future/actions/workflows/ci.yml/badge.svg?branch=master
7+
:target: https://github.com/PythonCharmers/python-future/actions/workflows/ci.yml?query=branch%3Amaster
118

129
``python-future`` is the missing compatibility layer between Python 2 and
1310
Python 3. It allows you to use a single, clean Python 3.x-compatible
@@ -19,9 +16,21 @@ ports of features from Python 3 and 2. It also comes with ``futurize`` and
1916
either Py2 or Py3 code easily to support both Python 2 and 3 in a single
2017
clean Py3-style codebase, module by module.
2118

22-
Notable projects that use ``python-future`` for Python 2/3 compatibility
23-
are `Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy
24-
<http://obspy.org>`_.
19+
The ``python-future`` project has been downloaded over 1.7 billion times.
20+
21+
.. _status
22+
23+
Status
24+
------
25+
26+
The ``python-future`` project was created in 2013 to attempt to save Python from
27+
the schism of version incompatibility that was threatening to tear apart the
28+
language (as Perl 6 contributed to the death of Perl).
29+
30+
That time is now past. Thanks to a huge porting effort across the Python
31+
community, Python 3 eventually thrived. Python 2 reached its end of life in
32+
2020 and the ``python-future`` package should no longer be necessary. Use it to
33+
help with porting legacy code to Python 3 but don't depend on it for new code.
2534

2635
.. _features:
2736

@@ -223,11 +232,14 @@ into this code which runs on both Py2 and Py3:
223232
name = input()
224233
greet(name)
225234
235+
The first four lines have no effect under Python 3 and can be removed from
236+
the codebase when Python 2 compatibility is no longer required.
237+
226238
See :ref:`forwards-conversion` and :ref:`backwards-conversion` for more details.
227239

228240

229241
Automatic translation
230-
---------------------
242+
~~~~~~~~~~~~~~~~~~~~~
231243

232244
The ``past`` package can automatically translate some simple Python 2
233245
modules to Python 3 upon import. The goal is to support the "long tail" of
@@ -264,10 +276,9 @@ properly to a Python 2/3 compatible codebase using a tool like
264276
Note: the auto-translation feature is still in alpha; it needs more testing and
265277
development, and will likely never be perfect.
266278

267-
For more info, see :ref:`translation`.
268279

269280
Pre-commit hooks
270-
----------------
281+
~~~~~~~~~~~~~~~~
271282

272283
`Pre-commit <https://pre-commit.com/>`_ is a framework for managing and maintaining
273284
multi-language pre-commit hooks.
@@ -304,23 +315,25 @@ Licensing
304315

305316
:Author: Ed Schofield, Jordan M. Adler, et al
306317

307-
:Copyright: 2013-2019 Python Charmers Pty Ltd, Australia.
318+
:Copyright: 2013-2024 Python Charmers, Australia.
308319

309-
:Sponsors: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
310-
Ltd, Singapore. http://pythoncharmers.com
320+
:Sponsors: Python Charmers: https://pythoncharmers.com
311321

312-
Pinterest https://opensource.pinterest.com/
322+
Pinterest https://opensource.pinterest.com
313323

314-
:Licence: MIT. See ``LICENSE.txt`` or `here <http://python-future.org/credits.html>`_.
324+
:Licence: MIT. See ``LICENSE.txt`` or `here <https://python-future.org/credits.html>`_.
315325

316-
:Other credits: See `here <http://python-future.org/credits.html>`_.
326+
:Other credits: See `here <https://python-future.org/credits.html>`_.
317327

328+
Docs
329+
----
330+
See the docs `here <https://python-future.org>`_.
318331

319332
Next steps
320333
----------
321334

322335
If you are new to Python-Future, check out the `Quickstart Guide
323-
<http://python-future.org/quickstart.html>`_.
336+
<https://python-future.org/quickstart.html>`_.
324337

325338
For an update on changes in the latest version, see the `What's New
326-
<http://python-future.org/whatsnew.html>`_ page.
339+
<https://python-future.org/whatsnew.html>`_ page.

contrib/python/future/py2/future/__init__.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
--------------------
5353
5454
An included script called `futurize
55-
<http://python-future.org/automatic_conversion.html>`_ aids in converting
55+
<https://python-future.org/automatic_conversion.html>`_ aids in converting
5656
code (from either Python 2 or Python 3) to code compatible with both
5757
platforms. It is similar to ``python-modernize`` but goes further in
5858
providing Python 3 compatibility through the use of the backported types
@@ -62,32 +62,31 @@
6262
Documentation
6363
-------------
6464
65-
See: http://python-future.org
65+
See: https://python-future.org
6666
6767
6868
Credits
6969
-------
7070
7171
:Author: Ed Schofield, Jordan M. Adler, et al
72-
:Sponsor: Python Charmers Pty Ltd, Australia, and Python Charmers Pte
73-
Ltd, Singapore. http://pythoncharmers.com
74-
:Others: See docs/credits.rst or http://python-future.org/credits.html
72+
:Sponsor: Python Charmers: https://pythoncharmers.com
73+
:Others: See docs/credits.rst or https://python-future.org/credits.html
7574
7675
7776
Licensing
7877
---------
79-
Copyright 2013-2019 Python Charmers Pty Ltd, Australia.
78+
Copyright 2013-2024 Python Charmers, Australia.
8079
The software is distributed under an MIT licence. See LICENSE.txt.
8180
8281
"""
8382

8483
__title__ = 'future'
8584
__author__ = 'Ed Schofield'
8685
__license__ = 'MIT'
87-
__copyright__ = 'Copyright 2013-2019 Python Charmers Pty Ltd'
88-
__ver_major__ = 0
89-
__ver_minor__ = 18
90-
__ver_patch__ = 3
86+
__copyright__ = 'Copyright 2013-2024 Python Charmers (https://pythoncharmers.com)'
87+
__ver_major__ = 1
88+
__ver_minor__ = 0
89+
__ver_patch__ = 0
9190
__ver_sub__ = ''
9291
__version__ = "%d.%d.%d%s" % (__ver_major__, __ver_minor__,
9392
__ver_patch__, __ver_sub__)

contrib/python/future/py2/future/backports/datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def today(cls):
689689

690690
@classmethod
691691
def fromordinal(cls, n):
692-
"""Contruct a date from a proleptic Gregorian ordinal.
692+
"""Construct a date from a proleptic Gregorian ordinal.
693693
694694
January 1 of year 1 is day 1. Only the year, month and day are
695695
non-zero in the result.

contrib/python/future/py2/future/backports/email/_header_value_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2867,7 +2867,7 @@ def parse_content_type_header(value):
28672867
_find_mime_parameters(ctype, value)
28682868
return ctype
28692869
ctype.append(token)
2870-
# XXX: If we really want to follow the formal grammer we should make
2870+
# XXX: If we really want to follow the formal grammar we should make
28712871
# mantype and subtype specialized TokenLists here. Probably not worth it.
28722872
if not value or value[0] != '/':
28732873
ctype.defects.append(errors.InvalidHeaderDefect(

contrib/python/future/py2/future/backports/email/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(self, _class=Message, **_3to2kwargs):
2626
textual representation of the message.
2727
2828
The string must be formatted as a block of RFC 2822 headers and header
29-
continuation lines, optionally preceeded by a `Unix-from' header. The
29+
continuation lines, optionally preceded by a `Unix-from' header. The
3030
header block is terminated either by the end of the string or by a
3131
blank line.
3232
@@ -92,7 +92,7 @@ def __init__(self, *args, **kw):
9292
textual representation of the message.
9393
9494
The input must be formatted as a block of RFC 2822 headers and header
95-
continuation lines, optionally preceeded by a `Unix-from' header. The
95+
continuation lines, optionally preceded by a `Unix-from' header. The
9696
header block is terminated either by the end of the input or by a
9797
blank line.
9898

contrib/python/future/py2/future/backports/http/cookiejar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ def lwp_cookie_str(cookie):
18511851
class LWPCookieJar(FileCookieJar):
18521852
"""
18531853
The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
1854-
"Set-Cookie3" is the format used by the libwww-perl libary, not known
1854+
"Set-Cookie3" is the format used by the libwww-perl library, not known
18551855
to be compatible with any browser, but which is easy to read and
18561856
doesn't lose information about RFC 2965 cookies.
18571857

contrib/python/future/py2/future/backports/xmlrpc/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@
134134
from future.builtins import bytes, dict, int, range, str
135135

136136
import base64
137-
# Py2.7 compatibility hack
138-
base64.encodebytes = base64.encodestring
139-
base64.decodebytes = base64.decodestring
140137
import sys
138+
if sys.version_info < (3, 9):
139+
# Py2.7 compatibility hack
140+
base64.encodebytes = base64.encodestring
141+
base64.decodebytes = base64.decodestring
141142
import time
142143
from datetime import datetime
143144
from future.backports.http import client as http_client
@@ -1254,7 +1255,7 @@ def close(self):
12541255
# Send HTTP request.
12551256
#
12561257
# @param host Host descriptor (URL or (URL, x509 info) tuple).
1257-
# @param handler Targer RPC handler (a path relative to host)
1258+
# @param handler Target RPC handler (a path relative to host)
12581259
# @param request_body The XML-RPC request body
12591260
# @param debug Enable debugging if debug is true.
12601261
# @return An HTTPConnection.

contrib/python/future/py2/future/builtins/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
A module that brings in equivalents of the new and modified Python 3
33
builtins into Py2. Has no effect on Py3.
44
5-
See the docs `here <http://python-future.org/what-else.html>`_
5+
See the docs `here <https://python-future.org/what-else.html>`_
66
(``docs/what-else.rst``) for more information.
77
88
"""
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
from __future__ import absolute_import
2-
from future.utils import PY3
2+
from future.utils import PY3, PY39_PLUS
33

4-
if PY3:
5-
from _dummy_thread import *
4+
5+
if PY39_PLUS:
6+
# _dummy_thread and dummy_threading modules were both deprecated in
7+
# Python 3.7 and removed in Python 3.9
8+
from _thread import *
9+
elif PY3:
10+
from _dummy_thread import *
611
else:
712
__future_module__ = True
813
from dummy_thread import *
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from __future__ import absolute_import
2+
from future.utils import PY3
3+
4+
from multiprocessing import *
5+
if not PY3:
6+
__future_module__ = True
7+
from multiprocessing.queues import SimpleQueue

contrib/python/future/py2/future/standard_library/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import socketserver
1818
import winreg # on Windows only
1919
import test.support
20-
import html, html.parser, html.entites
20+
import html, html.parser, html.entities
2121
import http, http.client, http.server
2222
import http.cookies, http.cookiejar
2323
import urllib.parse, urllib.request, urllib.response, urllib.error, urllib.robotparser
@@ -33,6 +33,7 @@
3333
from collections import OrderedDict, Counter, ChainMap # even on Py2.6
3434
from subprocess import getoutput, getstatusoutput
3535
from subprocess import check_output # even on Py2.6
36+
from multiprocessing import SimpleQueue
3637
3738
(The renamed modules and functions are still available under their old
3839
names on Python 2.)
@@ -62,9 +63,12 @@
6263

6364
import sys
6465
import logging
65-
import imp
66+
# imp was deprecated in python 3.6
67+
if sys.version_info >= (3, 6):
68+
import importlib as imp
69+
else:
70+
import imp
6671
import contextlib
67-
import types
6872
import copy
6973
import os
7074

@@ -108,6 +112,7 @@
108112
'future.moves.socketserver': 'socketserver',
109113
'ConfigParser': 'configparser',
110114
'repr': 'reprlib',
115+
'multiprocessing.queues': 'multiprocessing',
111116
# 'FileDialog': 'tkinter.filedialog',
112117
# 'tkFileDialog': 'tkinter.filedialog',
113118
# 'SimpleDialog': 'tkinter.simpledialog',
@@ -125,7 +130,7 @@
125130
# 'Tkinter': 'tkinter',
126131
'_winreg': 'winreg',
127132
'thread': '_thread',
128-
'dummy_thread': '_dummy_thread',
133+
'dummy_thread': '_dummy_thread' if sys.version_info < (3, 9) else '_thread',
129134
# 'anydbm': 'dbm', # causes infinite import loop
130135
# 'whichdb': 'dbm', # causes infinite import loop
131136
# anydbm and whichdb are handled by fix_imports2
@@ -184,6 +189,7 @@
184189
('itertools', 'filterfalse','itertools', 'ifilterfalse'),
185190
('itertools', 'zip_longest','itertools', 'izip_longest'),
186191
('sys', 'intern','__builtin__', 'intern'),
192+
('multiprocessing', 'SimpleQueue', 'multiprocessing.queues', 'SimpleQueue'),
187193
# The re module has no ASCII flag in Py2, but this is the default.
188194
# Set re.ASCII to a zero constant. stat.ST_MODE just happens to be one
189195
# (and it exists on Py2.6+).

0 commit comments

Comments
 (0)