Skip to content

Commit 925039a

Browse files
authored
Merge branch 'master' into fix-importlib-deprecation
2 parents dbd3cd0 + cd717be commit 925039a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+960
-426
lines changed

.github/SECURITY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security updates are applied only to the latest release.
6+
7+
## Reporting a Vulnerability
8+
9+
If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
10+
11+
Please disclose it at [security advisory](https://github.com/PythonCharmers/python-future/security/advisories/new).
12+
13+
This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
concurrency:
8+
group: ${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
versions:
17+
- python: "2.6"
18+
- python: "2.7"
19+
- python: "3.3"
20+
- python: "3.4"
21+
- python: "3.5"
22+
- python: "3.6"
23+
- python: "3.7"
24+
- python: "3.8"
25+
- python: "3.9"
26+
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- if: ${{ matrix.versions.python != '2.6' }}
31+
run: |
32+
docker build \
33+
. \
34+
--build-arg PYTHON_VERSION=${{ matrix.versions.python }} \
35+
-t jmadler/python-future-builder:${{ matrix.versions.python }}
36+
- if: ${{ matrix.versions.python == '2.6' }}
37+
run: |
38+
docker build \
39+
. \
40+
-f 2.6.Dockerfile \
41+
-t jmadler/python-future-builder:${{ matrix.versions.python }}
42+
- run: |
43+
docker run \
44+
-e PYTHON_VERSION=${{ matrix.versions.python }} \
45+
jmadler/python-future-builder:${{ matrix.versions.python }} \
46+
/root/python-future/test.sh

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ develop-eggs
2121
.installed.cfg
2222
lib
2323
lib64
24+
MANIFEST
25+
MANIFEST.in
2426

2527
# Backup files
2628
*.bak

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

2.6.Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM mrupgrade/deadsnakes:2.6
2+
3+
RUN mkdir -p ~/.pip/ && echo '[global] \n\
4+
trusted-host = pypi.python.org\n\
5+
pypi.org\n\
6+
files.pythonhosted.org\n\
7+
' >> ~/.pip/pip.conf
8+
9+
RUN apt-get update && \
10+
apt-get install -y curl
11+
12+
RUN mkdir -p /root/pip && \
13+
cd /root/pip && \
14+
curl -O https://files.pythonhosted.org/packages/8a/e9/8468cd68b582b06ef554be0b96b59f59779627131aad48f8a5bce4b13450/wheel-0.29.0-py2.py3-none-any.whl && \
15+
curl -O https://files.pythonhosted.org/packages/31/77/3781f65cafe55480b56914def99022a5d2965a4bb269655c89ef2f1de3cd/importlib-1.0.4.zip && \
16+
curl -O https://files.pythonhosted.org/packages/ef/41/d8a61f1b2ba308e96b36106e95024977e30129355fd12087f23e4b9852a1/pytest-3.2.5-py2.py3-none-any.whl && \
17+
curl -O https://files.pythonhosted.org/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl && \
18+
curl -O https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl && \
19+
curl -O https://files.pythonhosted.org/packages/53/67/9620edf7803ab867b175e4fd23c7b8bd8eba11cb761514dcd2e726ef07da/py-1.4.34-py2.py3-none-any.whl && \
20+
curl -O https://files.pythonhosted.org/packages/53/25/ef88e8e45db141faa9598fbf7ad0062df8f50f881a36ed6a0073e1572126/ordereddict-1.1.tar.gz && \
21+
curl -O https://files.pythonhosted.org/packages/17/0a/6ac05a3723017a967193456a2efa0aa9ac4b51456891af1e2353bb9de21e/traceback2-1.4.0-py2.py3-none-any.whl && \
22+
curl -O https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl && \
23+
curl -O https://files.pythonhosted.org/packages/c7/a3/c5da2a44c85bfbb6eebcfc1dde24933f8704441b98fdde6528f4831757a6/linecache2-1.0.0-py2.py3-none-any.whl
24+
25+
WORKDIR /root/python-future
26+
ADD . /root/python-future

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ARG PYTHON_VERSION
2+
FROM python:${PYTHON_VERSION}-slim
3+
4+
ENV LC_ALL=C.UTF-8
5+
6+
WORKDIR /root/python-future
7+
ADD . /root/python-future

README.rst

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

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
8+
9+
.. image:: https://readthedocs.org/projects/python-future/badge/?version=latest
10+
:target: https://python-future.readthedocs.io/en/latest/?badge=latest
11+
612
``python-future`` is the missing compatibility layer between Python 2 and
713
Python 3. It allows you to use a single, clean Python 3.x-compatible
814
codebase to support both Python 2 and Python 3 with minimal overhead.
@@ -22,9 +28,6 @@ are `Mezzanine <http://mezzanine.jupo.org/>`_ and `ObsPy
2228
Features
2329
--------
2430

25-
.. image:: https://travis-ci.org/PythonCharmers/python-future.svg?branch=master
26-
:target: https://travis-ci.org/PythonCharmers/python-future
27-
2831
- ``future.builtins`` package (also available as ``builtins`` on Py2) provides
2932
backports and remappings for 20 builtins with different semantics on Py3
3033
versus Py2

TESTING.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
Currently the tests are passing on OS X and Linux on Python 2.7 and 3.4.
1+
A docker image, python-future-builder, is used to do testing and building. The test suite can be run with:
22

3-
The test suite can be run with:
4-
5-
$ tox
3+
$ bash build.sh
64

75
which tests the module under a number of different python versions, where available, or with:
86

97
$ py.test
108

119
To execute a single test:
1210

13-
$ pytest -k test_chained_exceptions_stacktrace
11+
$ pytest -k test_chained_exceptions_stacktrace

docs/3rd-party-py3k-compat-code/jinja2_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def encode_filename(filename):
8585

8686
def with_metaclass(meta, *bases):
8787
# This requires a bit of explanation: the basic idea is to make a
88-
# dummy metaclass for one level of class instanciation that replaces
88+
# dummy metaclass for one level of class instantiation that replaces
8989
# itself with the actual metaclass. Because of internal type checks
9090
# we also need to make sure that we downgrade the custom metaclass
9191
# for one level to something closer to type (that's why __call__ and

docs/notebooks/object special methods (next, bool, ...).ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"collapsed": false,
6464
"input": [
6565
"# Py3-style iterators written as new-style classes (subclasses of\n",
66-
"# future.builtins.object) are backward compatibile with Py2:\n",
66+
"# future.builtins.object) are backward compatible with Py2:\n",
6767
"class Upper(object):\n",
6868
" def __init__(self, iterable):\n",
6969
" self._iter = iter(iterable)\n",

0 commit comments

Comments
 (0)