Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.9 build testing #1018

Merged
merged 19 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d936cf2
First stab at adding Python 3.9 dev Travis builds
micahellison Aug 2, 2020
7807ced
Dynamically replace Python max version for Python 3.9 beta builds
micahellison Aug 2, 2020
6343f28
Fix allow_failures (3.9-dev, not 3.9) and fix Windows find-and-replac…
micahellison Aug 3, 2020
baaf2be
Fix allow_failures to allow all three Python 3.9 builds to fail
micahellison Aug 8, 2020
9fb47e5
Use platform-independent Python script to allow all Python versions f…
micahellison Aug 8, 2020
040007f
Format changes and changing before_install to script for 3.9 builds
micahellison Aug 8, 2020
b025fa6
Install toml module to make it possible to run version-changing scrip…
micahellison Aug 8, 2020
576d8c1
Properly populate before_install step with Mac and Windows Python 3.9…
micahellison Aug 8, 2020
d62c6a1
Add refreshenv to get python3 path included in WIndows
micahellison Aug 8, 2020
7933a52
Ensure MacOS pyenv is up to date and attempt to reference Windows pyt…
micahellison Aug 8, 2020
468312c
Use bash-friendly paths in Windows and check to see exactly what the …
micahellison Aug 8, 2020
0b1785d
Confirm Python version in Windows and attempt to get pip a different way
micahellison Aug 8, 2020
26f9da8
Fiddling with Windows python references
micahellison Aug 8, 2020
450db4f
Remove Python3.6 references and check for Python directory in root di…
micahellison Aug 15, 2020
fbe1347
Add Python 3.9 path to Windows build
micahellison Aug 15, 2020
0224295
Remove pip steps that should be unnecessary
micahellison Aug 15, 2020
99545dc
Add upgrade pip to Windows Python 3.9 build
micahellison Aug 15, 2020
4b91e28
Attempt to resolve "access denied" error when upgrading pip on Windows
micahellison Aug 15, 2020
74b82cf
Use allow_all_python_version TOML script in nightly build instead of sed
micahellison Aug 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .build/allow_all_python_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import toml

pyproject = toml.load("pyproject.toml")

pyproject["tool"]["poetry"]["dependencies"]["python"] = "*"

with open("pyproject.toml", "w") as toml_file:
toml.dump(pyproject, toml_file)
41 changes: 38 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ aliases:
os: windows
language: shell
env: &env_windows
PATH: /c/Python36:/c/Python36/Scripts:/c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:$PATH
PATH: /c/Python37:/c/Python37/Scripts:/c/Python38:/c/Python38/Scripts:/c/Python39:/c/Python39/Scripts:$PATH
PYTHONIOENCODING: UTF-8
cache:
directories:
- /c/Python36
- /c/Python37
- /c/Python38
- /c/Python39
- /c/ProgramData/chocolatey/lib
- /c/ProgramData/chocolatey/bin
- /c/Users/travis/AppData/Local/pypoetry/Cache
Expand All @@ -62,6 +62,9 @@ aliases:
jobs:
fast_finish: true
allow_failures:
- name: Python 3.9 on Windows
- name: Python 3.9 on Linux
- name: Python 3.9 on MacOS
- python: nightly

include:
Expand Down Expand Up @@ -105,10 +108,42 @@ jobs:
<<: *env_windows
JRNL_PYTHON_VERSION: 3.8.2

# Python 3.9 Dev Tests
- name: Python 3.9 on Linux
before_install:
- pip install toml
- python .build/allow_all_python_version.py
python: 3.9-dev
- <<: *test_mac
name: Python 3.9 on MacOS
before_install:
- brew upgrade pyenv
- eval "$(pyenv init -)"
- pyenv install -s $JRNL_PYTHON_VERSION
- pyenv global $JRNL_PYTHON_VERSION
- pip install --upgrade pip
- pip --version
- pip install toml
- python .build/allow_all_python_version.py
env:
JRNL_PYTHON_VERSION: 3.9.0b5
- <<: *test_windows
name: Python 3.9 on Windows
before_install:
- choco install python --pre
- python --version
- python -m pip install --upgrade pip
- pip --version
- pip install toml
- python .build/allow_all_python_version.py
env:
<<: *env_windows
JRNL_PYTHON_VERSION: 3.9.0b5

# ... and beyond!
- name: Python nightly on Linux
before_install:
- sed -i 's/^python = ">=3\.6\.0.*"$/python = "*"/' pyproject.toml
- sed -i 's/^python = ">=3\.7\.0.*"$/python = "*"/' pyproject.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this use your new script ( .build/allow_all_python_version.py)?

python: nightly

# Specialty tests
Expand Down