Skip to content

python-asn1crypto: bump to version 1.3.0 + rework#10952

Merged
hnyman merged 1 commit into
openwrt:masterfrom
commodo:asn1crypto-update
Jan 6, 2020
Merged

python-asn1crypto: bump to version 1.3.0 + rework#10952
hnyman merged 1 commit into
openwrt:masterfrom
commodo:asn1crypto-update

Conversation

@commodo

@commodo commodo commented Jan 6, 2020

Copy link
Copy Markdown
Contributor

Maintainer: me
Compile tested: openwrt/openwrt@99dd270 x86
Run tested: openwrt/openwrt@99dd270 x86


This change:

  • bumps the version 1.3.0
  • switches to pypi.org download
  • removes the python2 variant

Signed-off-by: Alexandru Ardelean ardeleanalex@gmail.com

This change:
* bumps the version 1.3.0
* switches to pypi.org download
* removes the python2 variant

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@hnyman hnyman merged commit 88690c8 into openwrt:master Jan 6, 2020
@jefferyto

Copy link
Copy Markdown
Member

@commodo What happened to keeping Python 2 packages around until end of March? 😂

@commodo commodo deleted the asn1crypto-update branch January 7, 2020 07:53
@commodo

commodo commented Jan 7, 2020

Copy link
Copy Markdown
Contributor Author

Oh crap....
That completely missed me this time.
Many apologies.

Shall we bring it back?
[Personally, I would take this mistake as-is, and keep in mind later, but I am fine to also bring it back].

The scope of the problem with end-of-March is a bit larger, because, currently with Seafile I am stuck and cannot upgrade some Python package (gunicorn, openpyxl & pillow).
So, I'm kind of undecided what to do.

asn1crypto was a mistake on my part; I just noticed that there isn't any other package depending on it, so I inertially went for it.

For pillow the error is:

if [ "" == "HOST" ]; then export PYTHONPATH="/home/sandu/work/openwrt/django-update/staging_dir/hostpkg/lib/python2.7:/home/sandu/work/openwrt/django-update/staging_dir/hostpkg/lib/python2.7/site-packages"; export PYTHONDONTWRITEBYTECODE=0; else export PYTHONPATH="/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl/usr/lib/python2.7:/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl//usr/lib/python2.7/site-packages:/home/sandu/work/openwrt/django-update/build_dir/target-i386_pentium4_musl/pypi/pillow-python/Pillow-7.0.0/ipkg-install//usr/lib/python2.7/site-packages"; export PYTHONDONTWRITEBYTECODE=1; export _python_sysroot="/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl"; export _python_prefix="/usr"; export _python_exec_prefix="/usr"; fi; export PYTHONOPTIMIZE="";   cd /home/sandu/work/openwrt/django-update/build_dir/target-i386_pentium4_musl/pypi/pillow-python/Pillow-7.0.0/; CC="i486-openwrt-linux-musl-gcc" CCSHARED="i486-openwrt-linux-musl-gcc -fpic" CXX="i486-openwrt-linux-musl-g++" LD="i486-openwrt-linux-musl-gcc" LDSHARED="i486-openwrt-linux-musl-gcc -shared" CFLAGS="-Os -pipe -march=pentium4 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -ffile-prefix-map=/home/sandu/work/openwrt/django-update/build_dir/target-i386_pentium4_musl/pypi/pillow-python/Pillow-7.0.0=Pillow-7.0.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CPPFLAGS="-I/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl/usr/include -I/home/sandu/work/openwrt/django-update/staging_dir/toolchain-i386_pentium4_gcc-8.3.0_musl/usr/include -I/home/sandu/work/openwrt/django-update/staging_dir/toolchain-i386_pentium4_gcc-8.3.0_musl/include/fortify -I/home/sandu/work/openwrt/django-update/staging_dir/toolchain-i386_pentium4_gcc-8.3.0_musl/include -I/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl/usr/include/python2.7" LDFLAGS="-L/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl/usr/lib -L/home/sandu/work/openwrt/django-update/staging_dir/target-i386_pentium4_musl/lib -L/home/sandu/work/openwrt/django-update/staging_dir/toolchain-i386_pentium4_gcc-8.3.0_musl/usr/lib -L/home/sandu/work/openwrt/django-update/staging_dir/toolchain-i386_pentium4_gcc-8.3.0_musl/lib -znow -zrelro -lpython2.7" _PYTHON_HOST_PLATFORM=linux2 __PYVENV_LAUNCHER__="/usr/bin/python2.7"      /home/sandu/work/openwrt/django-update/staging_dir/hostpkg/bin/python2.7   ./setup.py  build_ext --enable-zlib --enable-jpeg --enable-tiff --enable-freetype --disable-lcms --disable-webp --disable-webpmux --disable-jpeg2000 --disable-imagequant --disable-platform-guessing install --prefix="/usr" --root="/home/sandu/work/openwrt/django-update/build_dir/target-i386_pentium4_musl/pypi/pillow-python/Pillow-7.0.0/ipkg-install" --single-version-externally-managed ;
  File "./setup.py", line 304
    yield from self.features

SyntaxError: invalid syntax

Something similar is for gunicorn, and I forgot what it was for openpyxl.
Typically these show up in bytecode compilation.

For gunicorn 19.0.0, I think I patched something to make it skip the file. For 20.0.0 [to be upgraded] I think I would need to patch/skipped another file. And for Pillow I would also need to patch/skip.

So, now, I feel like I have one of 2 options:

  1. Defer a lot of Python package upgrades until later [end-of-March or whenever]
  2. Continue upgrading and drop some Py2 variants where possible/needed/the-case

I prefer 2, but that also brings a whole chain of deps, so it's not always easy what to skip/upgrade or not.

Also, Seafile now has released version 7.1.1, which kind of support Py3;

  • it looks like the 2to3 tool was run on some libs, and that broke some Py2 compatibility;
  • so, it looks like Seafile 7.1.1 needs to be switched to Py3
    • which also needs python-django1 to become python3-django1 [no idea if it it's worth adding a temp python3-django1 alongside python-django1
    • this also means that all Django packages [compressor, appconf, etc] ,need to drop Py2 variants; well, we could keep them, but if only Seafile needs them I am not sure about keeping them

In any case, I have this branch WIP https://github.com/commodo/packages/commits/seafile-update3
I'll see about maybe splitting some commits or just having them as they are there, no idea.....

@jefferyto

Copy link
Copy Markdown
Member

Apologies for the late reply - I think we can leave asn1crypto as-is for now.

I haven't have time to study the situation with seafile and its dependencies yet, will try to in the next few days.

@jefferyto

Copy link
Copy Markdown
Member

Ok I think I understand the situation enough to comment 😂

I think it's obvious my preference would be to keep Py2 packages around until March, mainly for two reasons. One, if we make a package available to users in the past, I would prefer to continue having it available unless there is a good reason to remove it (that is not only developer convenience).

Two, I think it's too complicated for a large project like this to both add and remove things at the same time. It would be very easy to accidentally break something.

My rough thinking on the transition is:

  1. Move all Py2 programs to Py3, adding packages as necessary
  2. Remove all Py2 packages and leftover Py2 programs (after March)

In theory, all programs during this process will continue to function correctly, either as Py2 or Py3 versions. (Things may still break during step 2 if step 1 isn't completed correctly but that's unavoidable.) But if we mix the two steps then the chances of things breaking increase.

(If something goes wrong during step 1 and we need to revert a program from Py3 to Py2, having the Py2 dependencies still in-tree also makes it easier.)

So for gunicorn, openpyxl and pillow, I would prefer to patch/skip files to maintain their Py2 versions. For seafile, I'm in favour of adding python3-django1 and other Py3 packages (then removing the Py2 versions later).

Let me know if there are any tricky packages I can help with 😄

@commodo

commodo commented Jan 13, 2020

Copy link
Copy Markdown
Contributor Author

Let me see what I can do about all this :)
Thanks for the bump/update.

I'll see about maybe splitting stuff into some PRs.
Otherwise the seafile update branch just keeps growing.

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.

3 participants