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

[WIP][python3] Upgrade to 3.8.6 #4287

Closed
wants to merge 20 commits into from

Conversation

smaarn
Copy link
Contributor

@smaarn smaarn commented Dec 5, 2020

Motivation: Upgrade python version to 3.8 (since it's now the oldest "stable" version)
Linked issues: #4284

Checklist

  • Build rule all-supported completed successfully
  • beets: Package upgrade completed successfully
  • beets: New installation of package completed successfully
  • borgbackup: Package upgrade completed successfully
  • borgbackup: New installation of package completed successfully
  • domoticz: Package upgrade completed successfully
  • domoticz: New installation of package completed successfully
  • ffsync: Package upgrade completed successfully
  • ffsync: New installation of package completed successfully
  • flexget: Package upgrade completed successfully
  • flexget: New installation of package completed successfully
  • homeassistant: Package upgrade completed successfully
  • homeassistant: New installation of package completed successfully
  • python: Package upgrade completed successfully
  • python: New installation of package completed successfully
  • python3: Package upgrade completed successfully
  • python3: New installation of package completed successfully
  • rdiff-backup: Package upgrade completed successfully
  • rdiff-backup: New installation of package completed successfully
  • sabnzbd: Package upgrade completed successfully
  • sabnzbd: New installation of package completed successfully
  • salt-minion: Package upgrade completed successfully
  • salt-minion: New installation of package completed successfully
  • vim: Package upgrade completed successfully
  • vim: New installation of package completed successfully
  • znc: Package upgrade completed successfully
  • znc: New installation of package completed successfully

Followups

@smaarn smaarn force-pushed the feat/python3/upgrade-3.8 branch 2 times, most recently from 45f2212 to 2c45e2c Compare December 10, 2020 21:04
@smaarn smaarn force-pushed the feat/python3/upgrade-3.8 branch 2 times, most recently from ebfff1c to 77ab8fb Compare December 13, 2020 23:42
@hgy59
Copy link
Contributor

hgy59 commented Dec 16, 2020

@smaarn can you please rebase to head@master to include the update of cross/libffi to version 3.3?

@hgy59
Copy link
Contributor

hgy59 commented Dec 16, 2020

@smaarn as a learned on the home assistant update with #4149 there is an issue with cffi 1.14.4, so older compilers fail to build it.
The original bug has been fixed already in cffi:
https://foss.heptapod.net/pypy/cffi/-/commit/4855f749ad397f79867d214b2b516664bec14019)
But this fix is not yet released, so we still use cffi 1.14.1.
We should use cffi 1.14.1 here too, until a fixed version is released (will fix one kind of homeassistant build failures).

affected files

  • native/python3/Makefile
  • cross/cffi/Makefile

@smaarn smaarn force-pushed the feat/python3/upgrade-3.8 branch 3 times, most recently from 05ac415 to b617a70 Compare December 19, 2020 14:05
@smaarn smaarn changed the title [python3] Upgrade to 3.8.6 [python3][WIP] Upgrade to 3.8.6 Dec 19, 2020
@smaarn smaarn changed the title [python3][WIP] Upgrade to 3.8.6 [WIP][python3] Upgrade to 3.8.6 Dec 19, 2020
@smaarn smaarn force-pushed the feat/python3/upgrade-3.8 branch 3 times, most recently from e98e83c to 8e1fbe8 Compare December 21, 2020 22:35
@@ -1,12 +1,11 @@
PKG_NAME = PyNaCl
PKG_VERS = 1.3.0
PKG_VERS = 1.4.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

PyNaCl version 1.4.0 introduces support for Python 3.8.

Copy link
Contributor

Choose a reason for hiding this comment

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

but homeassistant requires this in version 1.3.0
If we really need v1.4.0 for pythion 3.8 we must add cross/PyNaCl_1.3 and let homeassistant depend on it.

@@ -13,14 +13,4 @@ LICENSE = MIT

PLIST_TRANSFORM = sed -e 's%@PYTHON_SITE_PACKAGES@%$(PYTHON_LIB_DIR)/site-packages%' -e 's%@PYTHON_VERSION@%$(SPK_SHORT_VERS)%'

POST_INSTALL_TARGET = install_into_cross_env
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This didn't seem to be really needed. So I removed it.

@@ -0,0 +1,67 @@
From e9bd383ceb63db7cfe8a284014f0cdf8c2bfe4f0 Mon Sep 17 00:00:00 2001
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When upgrading domoticz this shouldn't be necessary anymore.

@@ -0,0 +1,27 @@
From b2752bc4a5e867e5fdfba7fab66ead49efe4de5a Mon Sep 17 00:00:00 2001
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found this in a forked repository of domoticz. It didn't seem to go through a patch or anything of that kind in the domoticz repository, not too sure about what to make of it.

@@ -14,9 +14,11 @@ LICENSE = MIT

INSTALL_TARGET = gevent_install

ENV += EMBED=false LIBEV_EMBED=false CARES_EMBED=false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turns out that it was always trying to build libenv and cares. Which was actually a terrible idea since

  1. It's already "cross compiled"
  2. Didn't work very well

@@ -6,13 +6,10 @@ lnk:bin/pydoc3
rsc:bin/pydoc@PKG_SHORT_VERS@
lnk:bin/python3
bin:bin/python@PKG_SHORT_VERS@
bin:bin/python@PKG_SHORT_VERS@m
lnk:bin/pyvenv
rsc:bin/pyvenv-@PKG_SHORT_VERS@
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was deprecated. It has been removed.

@@ -63,9 +63,9 @@ build_wheel_target: $(PRE_WHEEL_TARGET)
if [ ! -z "$(CROSS_COMPILE_WHEELS)" ] ; then \
$(MSG) "Force cross-compile" ; \
if [ -z "$(CROSSENV)" ]; then \
$(RUN) _PYTHON_HOST_PLATFORM="$(TC_TARGET)" CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $(WHEELS_CFLAGS)" LDFLAGS="$(LDFLAGS) $(WHEELS_LDFLAGS)" $(PIP_WHEEL) ; \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turnsout that using -I wasn't appreciated in some cases (more specifically gevent) where it was failing, indicating that it should go through CPPFLAGS instead.

@@ -40,6 +40,7 @@ include ../../mk/spksrc.spk.mk
ffsync_extra_install:
install -m 755 -d $(STAGING_DIR)/var
install -m 644 src/ffsync.ini $(STAGING_DIR)/var/
install -m 644 src/requirements.txt $(STAGING_DIR)/share/wheelhouse/requirements.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise the sed operation below was failing. To be honest it's either we remove that line and the below line (the sed one). Or we keep that line or at least I need to know where that requirements.txt file would be supposed to be coming from.

@@ -92,11 +92,11 @@ repoze.lru==0.6
#requests==2.4.3
simplejson==3.6.5
six==1.8
testfixtures==4.1.0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was failing building. But since it's related to testing I figured we could dismiss it, right ?

tokenlib==0.3.1
translationstring==1.1
umemcache==1.6.3
unittest2==0.6
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was failing building. But since it's related to testing I figured we could dismiss it, right ?

@smaarn
Copy link
Contributor Author

smaarn commented Dec 27, 2020

Corresponding binaries have been published here: https://github.com/smaarn/spksrc/releases/tag/python-3.8.6-RC1

@smaarn smaarn marked this pull request as ready for review December 31, 2020 10:04
@hgy59
Copy link
Contributor

hgy59 commented Dec 31, 2020

@smaarn please wait with the update of homeassistant package as I am currently creating v0.118.5-11 with fixes for some integrations (and with python 3.7.7), see #4345.

@smaarn
Copy link
Contributor Author

smaarn commented Dec 31, 2020

@smaarn please wait with the update of homeassistant package as I am currently creating v0.118.5-11 with fixes for some integrations (and with python 3.7.7), see #4345.

Don't worry I still need to try all the updated packages before pretending that this is ready to be merged.

@smaarn smaarn force-pushed the feat/python3/upgrade-3.8 branch 2 times, most recently from c931093 to a90e04d Compare January 3, 2021 20:16
@smaarn
Copy link
Contributor Author

smaarn commented Jan 6, 2021

Updated binaries can now be found here: https://github.com/smaarn/spksrc/releases/tag/python-3.8.6-RC2

Squashed icu commits and reorganized commits.

@hgy59
Copy link
Contributor

hgy59 commented Jan 7, 2021

Squashed icu commits and reorganized commits.

@smaarn please avoid unnecessairy force-pushes as it always breaks local clones from fast-forwarding.

@hgy59
Copy link
Contributor

hgy59 commented Jan 7, 2021

@ymartin59 @smaarn and all py3 contirbutors here
As update of python 3.x to 3.(x+1) breaks all python3 packages installed with 3.x, we should consider to build different packages for 3.7 and 3.8.
If we start this versioning here we will leave python3 untouched and introduce python38 with it's own revision numbering (i.e. this would lead to python38-*-3.8.6-1.spk.

Benefits:

  • do not break packages that do not support python 3.8 yet
  • avoid the need of updating all py3 packages now
  • do not break installed python3 packages at installation of python 3.8
  • allow to create and publish python39 without retiring python38

I am not a python guru but all seems to depend on the virtual environments that are linked to installed Python-Major.Minor.

@smaarn
Copy link
Contributor Author

smaarn commented Jan 7, 2021

@ymartin59 @smaarn and all py3 contirbutors here

As update of python 3.x to 3.(x+1) breaks all python3 packages installed with 3.x, we should consider to build different packages for 3.7 and 3.8.

If we start this versioning here we will leave python3 untouched and introduce python38 with it's own revision numbering (i.e. this would lead to python38-*-3.8.6-1.spk.

Benefits:

  • do not break packages that do not support python 3.8 yet

  • avoid the need of updating all py3 packages now

  • do not break installed python3 packages at installation of python 3.8

  • allow to create and publish python39 without retiring python38

I am not a python guru but all seems to depend on the virtual environments that are linked to installed Python-Major.Minor.

I would tend to agree with you here. Unfortunately I'm not an expert either here.
Another point to take into consideration is that other cross packages could need the same kind of approach (packages which no longer support python2 for example)

@smaarn
Copy link
Contributor Author

smaarn commented Jan 7, 2021

@hgy59 with your previous point in my mind I would propose to:

  1. Create separate PRs for fixes included in this PR (znc, homeassistant and so on)
  2. Create in another PR a new python38 package and let package owners perform their migration when they see fit (I already have a pending package which I could use as guinea pig)

What do you think?

@iandarbey
Copy link

Any ideas when this will be merged? Some home assistant integrations rely on 3.8 or higher python (ikea in particular).

@smaarn
Copy link
Contributor Author

smaarn commented Jan 29, 2021

Superseeded by #4413

@smaarn smaarn closed this Jan 29, 2021
@smaarn smaarn deleted the feat/python3/upgrade-3.8 branch January 29, 2021 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants