Skip to content

Commit 45d6c64

Browse files
committed
2 parents 64b8603 + 0c347ff commit 45d6c64

21 files changed

+47
-38
lines changed

build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
#!/bin/sh
12
# XXX: TODO: we should make this include -e once tests pass
2-
set -xuo pipefail
3+
set -xu
34

45
DOCKER_IMAGE=jmadler/python-future-builder
56
# XXX: TODO: Perhaps this version shouldn't be hardcoded
67
version=0.18.4
78

8-
docker build . -t $DOCKER_IMAGE
9-
#docker push $DOCKER_IMAGE:latest
9+
docker build . -t "$DOCKER_IMAGE"
10+
#docker push "$DOCKER_IMAGE:latest"
1011

1112
for i in cp27-cp27m cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39; do
12-
docker run -ti -v $(realpath dist):/root/python-future/dist $DOCKER_IMAGE /root/python-future/setup.sh $version $(basename $i)
13+
docker run -ti -v "$(realpath dist)":/root/python-future/dist "$DOCKER_IMAGE" /root/python-future/setup.sh "$version" $(basename $i)
1314
done
1415

1516
python setup.py sdist

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",

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sphinx==3.2.1
22
sphinx_bootstrap_theme==0.7.1
3+
setuptools==0.18.2

docs/standard_library_imports.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ As of version 0.14, the ``future`` package comes with top-level packages for
1515
Python 2.x that provide access to the reorganized standard library modules
1616
under their Python 3.x names.
1717

18-
Direct imports are the preferred mechanism for accesing the renamed standard
18+
Direct imports are the preferred mechanism for accessing the renamed standard
1919
library modules in Python 2/3 compatible code. For example, the following clean
2020
Python 3 code runs unchanged on Python 2 after installing ``future``::
2121

docs/whatsnew.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ This is a major bug-fix and feature release, including:
9696
- Fix an issue with copyreg import under Py3 that results in unexposed stdlib functionality
9797
- Export and document types in future.utils
9898
- Update behavior of newstr.__eq__() to match str.__eq__() as per reference docs
99-
- Fix raising and the raising fixer to handle cases where the syntax is ambigious
99+
- Fix raising and the raising fixer to handle cases where the syntax is ambiguous
100100
- Allow "default" parameter in min() and max() (Issue #334)
101101
- Implement __hash__() in newstr (Issue #454)
102102
- Future proof some version checks to handle the fact that Py4 won't be a major breaking release
@@ -128,7 +128,7 @@ This is a major bug-fix release, including:
128128
- Fix ``past.translation`` on read-only file systems
129129
- Fix Tkinter import bug introduced in Python 2.7.4 (issue #262)
130130
- Correct TypeError to ValueError in a specific edge case for newrange
131-
- Support inequality tests betwen newstrs and newbytes
131+
- Support inequality tests between newstrs and newbytes
132132
- Add type check to __get__ in newsuper
133133
- Fix fix_divsion_safe to support better conversion of complex expressions, and
134134
skip obvious float division.

lint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
# TODO: Run under Python 2.7 and 3.7
23
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics || true
34
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true

setup.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

3-
set -exo pipefail
3+
set -ex
44

55
version=$1
6-
pyabitag=$2
7-
8-
py="/opt/python/${pyabitag}/bin/python"
9-
pytag=${pyabitag%-*}
10-
pytag="${pytag//cp/py}"
11-
$py -m pip install pytest unittest2
12-
$py setup.py bdist_wheel --python-tag=$pytag
13-
$py -m pip install dist/future-$version-$pytag-none-any.whl
6+
pytag=$2
7+
8+
if [ "$pytag" = 'py33' ]; then
9+
pip3 install virtualenv==16.2.0
10+
fi
11+
12+
. /root/"$pytag"/bin/activate
13+
14+
if [ "$pytag" = 'py26' ]; then
15+
pip install importlib
16+
fi
17+
pip install pytest unittest2
18+
python setup.py bdist_wheel --python-tag="$pytag"
19+
pip install "dist/future-$version-$pytag-none-any.whl"
1420
# Ignore test failures for now
15-
$py -m pytest tests/ || true
21+
pytest tests/ || true

src/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.

src/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(

0 commit comments

Comments
 (0)