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

NXDRIVE-1224: Upgrade Python from 3.6.8 to 3.7.3 #988

Merged
merged 2 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
4 changes: 3 additions & 1 deletion docs/changes/4.1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Release date: `2019-xx-xx`

## Packaging / Build

- [NXDRIVE-](https://jira.nuxeo.com/browse/NXDRIVE-): ...
- [NXDRIVE-1224](https://jira.nuxeo.com/browse/NXDRIVE-1224): Upgrade from Python 3.6.8 to 3.7.3

## Tests

Expand All @@ -46,6 +46,8 @@ Release date: `2019-xx-xx`
## Minor Changes

- Packaging: Added `junitparser` 1.3.2
- Packaging: Added `requests` 2.2.0
- Packaging: Removed `dataclasses` 0.6
- Packaging: Updated `markdown` from 3.1 to 3.1.1
- Packaging: Updated `nuxeo` from 2.0.5 to 2.1.1
- Packaging: Updated `pre-commit` from 1.16.1 to 1.17.0
Expand Down
5 changes: 4 additions & 1 deletion docs/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ If you want to use the module version as a basic module for your own software, p

It may evolve quickly without notification as we are following the Python development cycle.

As of now, we are using the __Python 3.6.8__.
[//]: # (XXX_PYTHON)

As of now, we are using the __Python 3.7.3__.

History:

- `2019-06-17` (v4.1.4): dropped support for Python 3.6
- `2018-10-30` (v4.0.0): dropped support for Python 2.7
- `2014-??-??`: dropped support for Python 2.6

Expand Down
5 changes: 3 additions & 2 deletions nxdrive/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ def main() -> int:
ret = 0

try:
if sys.version_info < (3, 6):
raise RuntimeError(f"{APP_NAME} requires Python 3.6+")
# XXX_PYTHON
if sys.version_info < (3, 7):
raise RuntimeError(f"{APP_NAME} requires Python 3.7+")

if not check_executable_path():
return 1
Expand Down
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# nuitka==0.6.3; sys_platform == 'win32'
pyinstaller==3.4.0
# pyinstaller==3.5.0 or newer
# https://github.com/pyinstaller/pyinstaller/issues/3942
https://github.com/pyinstaller/pyinstaller/archive/9e1f05ba22ee797b6914d85ac11fe9dc425ad649.zip
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
appdirs==1.4.3
dataclasses==0.6
distro==1.4.0; sys_platform == 'linux'
https://github.com/GoodRx/universal-analytics-python/archive/77ce628c56de1ba51a9bf0774794fd687f785803.zip
https://github.com/gorakhargosh/watchdog/archive/8b94506c3156a3b66faef7aac9a139f603772506.zip
Expand All @@ -16,8 +15,10 @@ pypac==0.12.0
pypiwin32==223; sys_platform == 'win32'
# Ignore PyQt5 updates until NXDRIVE-1391 is done
PyQt5==5.11.2 # pyup: ignore
# NXDRIVE-1560: issue with codesign on macOS and sip > 4.19.13
PyQt5-sip==4.19.13
python-dateutil==2.8.0
requests==2.22.0
rfc3987==1.3.8
Send2Trash==1.5.0
sentry-sdk==0.9.0
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def _basename(path: str) -> str:
"""
Patch shutil._basename for pathlib compatibility.
TODO: remove when https://bugs.python.org/issue32689 is fixed (Python 3.7.3 or newer)
TODO: remove when https://bugs.python.org/issue32689 is fixed (Python 3.7.4 or newer)
"""
if isinstance(path, os.PathLike):
return path.name
Expand Down
10 changes: 9 additions & 1 deletion tools/osx/fix_app_qt_folder_names_for_codesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ def move_contents_to_resources(folder: Path) -> Generator[Path, None, None]:
yield from move_contents_to_resources(path)
else:
sibbling = Path(str(path).replace("MacOS", "Resources"))

# Create the parent if it does not exist yet
sibbling.parent.mkdir(parents=True, exist_ok=True)

# Make the move
shutil.move(path, sibbling)
yield sibbling

# Yield the DLL if it is one
if sibbling.name.endswith(".dylib"):
yield sibbling


def main(args: List[str]) -> int:
Expand Down
6 changes: 1 addition & 5 deletions tools/posix/deploy_jenkins_slave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ check_import() {
check_vars() {
# Check required variables
if [ "${PYTHON_DRIVE_VERSION:=unset}" = "unset" ]; then
export PYTHON_DRIVE_VERSION="3.6.8" # XXX_PYTHON
export PYTHON_DRIVE_VERSION="3.7.3" # XXX_PYTHON
fi
if [ "${WORKSPACE:=unset}" = "unset" ]; then
echo "WORKSPACE not defined. Aborting."
Expand Down Expand Up @@ -130,10 +130,6 @@ check_vars() {

install_deps() {
echo ">>> Installing requirements"
# Do not delete, it fixes "Could not import setuptools which is required to install from a source distribution."
${PIP} setuptools
# NXDRIVE-1521: pip 19.0.1 prevents PyInstaller installation
${PIP} pip==18.1
${PIP} -r requirements.txt
${PIP} -r requirements-dev.txt
if [ "${INSTALL_RELEASE_ARG:=0}" != "1" ]; then
Expand Down
2 changes: 1 addition & 1 deletion tools/windows/deploy_jenkins_slave.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function check_import($import) {
function check_vars {
# Check required variables
if (-Not ($Env:PYTHON_DRIVE_VERSION)) {
$Env:PYTHON_DRIVE_VERSION = '3.6.8' # XXX_PYTHON
$Env:PYTHON_DRIVE_VERSION = '3.7.3' # XXX_PYTHON
} elseif (-Not ($Env:WORKSPACE)) {
Write-Output ">>> WORKSPACE not defined. Aborting."
ExitWithCode 1
Expand Down