Skip to contentSkip to conversation

python-more-itertools: downgrade 7.2.0 -> 5.0.0

PATCH In review Hongxu Jia 4 participants 15 messages Nov 6, 2019 – Nov 11, 2019

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

PATCH 1/8 python-more-itertools: downgrade 7.2.0 -> 5.0.0

Python 2.7 is no longer supported. The 5.0.0 release will be the last version targeting Python 2.7. [1]

[1] https://github.com/erikrose/more-itertools/commit/560b045b430e8292c18cf5283de4fdc3e13e56f7

---
 meta-python/recipes-devtools/python/python-more-itertools.inc  | 3 ---
 ...-more-itertools_7.2.0.bb => python-more-itertools_5.0.0.bb} | 3 +++
 .../recipes-devtools/python/python3-more-itertools_7.2.0.bb    | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)
 rename meta-python/recipes-devtools/python/{python-more-itertools_7.2.0.bb => python-more-itertools_5.0.0.bb} (29%)
meta-python/recipes-devtools/python/python-more-itertools.inc +0 -3
index 8d814a6f0..33095b3d3 100644
@@ -2,6 +2,3 @@ DESCRIPTION = "More routines for operating on iterables, beyond itertools"
 HOMEPAGE = "https://github.com/erikrose/more-itertools"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3396ea30f9d21389d7857719816f83b5"
-
-SRC_URI[md5sum] = "f647bfd27243a7bebe53b5ddb6a3b1c4"
-SRC_URI[sha256sum] = "409cd48d4db7052af495b09dec721011634af3753ae1ef92d2b32f73a745f832"
meta-python/recipes-devtools/python/python-more-itertools_5.0.0.bb renamed from meta-python/recipes-devtools/python/python-more-itertools_7.2.0.bb +3 -0
similarity index 29%
rename from meta-python/recipes-devtools/python/python-more-itertools_7.2.0.bb
rename to meta-python/recipes-devtools/python/python-more-itertools_5.0.0.bb
index 0702aad4e..c66e55cac 100644
@@ -1,2 +1,5 @@
 inherit pypi setuptools
 require python-more-itertools.inc
+
+SRC_URI[md5sum] = "f2ea58aa336ce6c13b7b225b3bbe305d"
+SRC_URI[sha256sum] = "38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"
meta-python/recipes-devtools/python/python3-more-itertools_7.2.0.bb +3 -0
index 28ddf88fb..06d45ce54 100644
@@ -1,2 +1,5 @@
 inherit pypi setuptools3
 require python-more-itertools.inc
+
+SRC_URI[md5sum] = "f647bfd27243a7bebe53b5ddb6a3b1c4"
+SRC_URI[sha256sum] = "409cd48d4db7052af495b09dec721011634af3753ae1ef92d2b32f73a745f832"
Signature · 1 line
2.21.0
author
#1 lore raw

PATCH 2/8 python-importlib-metadata: add missing runtime depends

From setup.cfg:
...
20 install_requires =

 21     zipp>=0.5
 22     pathlib2; python_version=='3.4.*' or python_version < '3'
 23     contextlib2; python_version < '3'
 24     configparser>=3.5; python_version < '3'

...

Add missing runtime depends while python version < '3'

---
 .../recipes-devtools/python/python-importlib-metadata_0.23.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python-importlib-metadata_0.23.bb +4 -0
index 5c213004c..dd95cf360 100644
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-importlib-metadata.inc
+RDEPENDS_${PN} += "python-configparser \
+                   python-contextlib2 \
+                   python-pathlib2 \
+"
Signature · 1 line
2.21.0
author
#2 lore raw

PATCH 3/8 python-pathlib2: add python-scandir and python-misc to runtime depends

In reply to Hongxu Jia

...

$ >>> python
$ >>> import pathlib2 as pathlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/pathlib2/__init__.py", line 52, in <module>
    from scandir import scandir as os_scandir
ImportError: No module named scandir
$ >>> import pathlib2 as pathlib
ceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pathlib2/__init__.py", line 9, in <module>
    import ntpath
ImportError: No module named ntpath
...

Module scandir comes from python-scandir and ntpath comes from python-misc

---
 meta-python/recipes-devtools/python/python-pathlib2_2.3.5.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python-pathlib2_2.3.5.bb +4 -0
index e4bf78913..6317e1c16 100644
@@ -1,2 +1,6 @@
 inherit pypi setuptools
 require python-pathlib2.inc
+
+RDEPENDS_${PN} += "python-scandir \
+                   python-misc \
+"
Signature · 1 line
2.21.0
author
#3 lore raw

PATCH 4/8 python-scandir: add version 1.10.0

In reply to Hongxu Jia

It is required by python-pathlib2.

The recipe refers the duplicated one in meta-iot-cloud

---
 .../recipes-devtools/python/python-scandir_1.10.0.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-scandir_1.10.0.bb
meta-python/recipes-devtools/python/python-scandir_1.10.0.bb new file +12 -0
new file mode 100644
index 000000000..253c2342b
@@ -0,0 +1,12 @@
+SUMMARY = "A better directory iterator and faster os.walk()"
+HOMEPAGE = "https://github.com/benhoyt/scandir"
+AUTHOR = "Ben Hoyt"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=482ee62da51806409d432a80eed4e3ea"
+
+SRC_URI = "git://github.com/benhoyt/scandir.git"
+SRCREV = "982e6ba60e7165ef965567eacd7138149c9ce292"
+
+S = "${WORKDIR}/git"
+
+inherit setuptools
Signature · 1 line
2.21.0
author
#4 lore raw

PATCH 5/8 python-contextlib2/python3-contextlib2: add version 0.6.0

In reply to Hongxu Jia

The python-contextlib2 is required by python-importlib-metadata, the newly added recipes refers the one in meta-cloud-services

---
 .../recipes-devtools/python/python-contextlib2.inc        | 8 ++++++++
 .../recipes-devtools/python/python-contextlib2_0.6.0.bb   | 3 +++
 .../recipes-devtools/python/python3-contextlib2_0.6.0.bb  | 3 +++
 3 files changed, 14 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python-contextlib2.inc
 create mode 100644 meta-python/recipes-devtools/python/python-contextlib2_0.6.0.bb
 create mode 100644 meta-python/recipes-devtools/python/python3-contextlib2_0.6.0.bb
meta-python/recipes-devtools/python/python-contextlib2.inc new file +8 -0
new file mode 100644
index 000000000..50c93e943
@@ -0,0 +1,8 @@
+DESCRIPTION = "Backports and enhancements for the contextlib module"
+HOMEPAGE = "http://contextlib2.readthedocs.org/"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=43d1c7827e8fad6454b553caf0e1d734"
+
+SRC_URI[md5sum] = "d03a631073b40073b5c41364ad8f5979"
+SRC_URI[sha256sum] = "7197aa736777caac513dbd800944c209a49765bf1979b12b037dce0277077ed3"
meta-python/recipes-devtools/python/python-contextlib2_0.6.0.bb new file +3 -0
new file mode 100644
index 000000000..87cffb98f
@@ -0,0 +1,3 @@
+inherit pypi setuptools
+require python-contextlib2.inc
+
meta-python/recipes-devtools/python/python3-contextlib2_0.6.0.bb new file +3 -0
new file mode 100644
index 000000000..1c0b560b4
@@ -0,0 +1,3 @@
+inherit pypi setuptools3
+require python-contextlib2.inc
+
Signature · 1 line
2.21.0
author
#5 lore raw

PATCH 6/8 python3-importlib-metadata: add python3-misc to runtime depends

In reply to Hongxu Jia

...

$ python3
$ >>> import importlib_metadata
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 15, in <module>
    from ._compat import (
  File "/usr/lib/python3.7/site-packages/importlib_metadata/_compat.py", line 28, in <module>
    import pathlib
ModuleNotFoundError: No module named 'pathlib'
...

Module pathlib comes from python3-misc

---
 .../recipes-devtools/python/python3-importlib-metadata_0.23.bb  | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-importlib-metadata_0.23.bb +2 -0
index d71c45b5f..4c53d5fbb 100644
@@ -1,2 +1,4 @@
 inherit pypi setuptools3
 require python-importlib-metadata.inc
+
+RDEPENDS_${PN} += "python3-misc"
Signature · 1 line
2.21.0
author
#6 lore raw

PATCH 7/8 python-importlib-metadata: add python-compression to runtime depends

In reply to Hongxu Jia

...

$ python
$ >>> import importlib_metadata
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/importlib_metadata/__init__.py", line 9, in <module>
    import zipp
  File "/usr/lib/python2.7/site-packages/zipp.py", line 8, in <module>
    import zipfile
ImportError: No module named zipfile
...

Module zipfile comes from python-compression

---
 .../recipes-devtools/python/python-importlib-metadata_0.23.bb    | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python-importlib-metadata_0.23.bb +1 -0
index dd95cf360..09c5700db 100644
@@ -3,4 +3,5 @@ require python-importlib-metadata.inc
 RDEPENDS_${PN} += "python-configparser \
                    python-contextlib2 \
                    python-pathlib2 \
+                   python-compression \
 "
Signature · 1 line
2.21.0
author
#7 lore raw

PATCH 8/8 python-configparser: add python-pkgutil to runtime depends

In reply to Hongxu Jia

...

$ python
$ >>> import backports
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/backports/__init__.py", line 4, in <module>
    from pkgutil import extend_path
ImportError: No module named pkgutil
...

Modeule pkgutil comes from python-pkgutil

---
 meta-python/recipes-devtools/python/python-configparser_3.8.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta-python/recipes-devtools/python/python-configparser_3.8.1.bb +1 -0
index 69f045dba..a8ed1e91b 100644
@@ -1,2 +1,3 @@
 inherit setuptools
 require python-configparser.inc
+RDEPENDS_${PN} += "python-pkgutil"
Signature · 1 line
2.21.0
author
#9 lore raw
Quoted 9 lines · Andreas Müller
Quoted 6 lines · Hongxu Jia

Python 2.7 is no longer supported. The 5.0.0 release will be the last version targeting Python 2.7. [1]

[1] https://github.com/erikrose/more-itertools/commit/560b045b430e8292c18cf5283de4fdc3e13e56f7

* Version going backwards
* Such a patch at times python2 is eol - really?

All these patches just make python2 module work.

Should we clarify that we do not support python2? If yes, we could clean up them.

In this case, if we do not support python2 more-itertools, we should also

clean up these python2 recipes (python-pytest,python-pluggy,python-zipp)

that runtime depends on more-itertools.

As above upstream commits [1] said, the old version 5.0.0 is the last version

to support python2. Two choice: going backwards or cleaning up, it is impossible

to patch latest more-itertools to support python2

//Hongxu

Quoted 1 line

Andreas

#10 lore raw
Quoted 8 lines · Hongxu Jia

...
Should we clarify that we do not support python2? If yes, we could clean up them.

In this case, if we do not support python2 more-itertools, we should also

clean up these python2 recipes (python-pytest,python-pluggy,python-zipp)

Quoted 8 lines

that runtime depends on more-itertools.

As above upstream commits [1] said, the old version 5.0.0 is the last version

to support python2. Two choice: going backwards or cleaning up,
...

python-more-itertools was added to master less than 2 months ago, and the inital add was version 7.2.0.

What you write implies that the Python2 version was never working, and should be removed with all reverse dependencies from both master and zeus.

Quoted 1 line

//Hongxu

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
author
#11 lore raw
Quoted 15 lines · Adrian Bunk
Quoted 14 lines · Hongxu Jia

...
Should we clarify that we do not support python2? If yes, we could clean up them.

In this case, if we do not support python2 more-itertools, we should also

clean up these python2 recipes (python-pytest,python-pluggy,python-zipp)

that runtime depends on more-itertools.

As above upstream commits [1] said, the old version 5.0.0 is the last version

Quoted 8 lines
Quoted 2 lines

to support python2. Two choice: going backwards or cleaning up,
...

python-more-itertools was added to master less than 2 months ago, and the inital add was version 7.2.0.

What you write implies that the Python2 version was never working, and should be removed with all reverse dependencies from both master and zeus.

A lots of recipe should be clean up, with a simple search,

a serial of dependencies should be affected

meta-python/recipes-devtools/python/python-pytest.inc:19: ${PYTHON_PN}-pluggy \

meta-python/recipes-devtools/python/python-inflection.inc:12:RDEPENDS_${PN} += "${PYTHON_PN}-pytest"

meta-python/recipes-devtools/python/python-importlib-metadata.inc:12:RDEPENDS_${PN} += "${PYTHON_PN}-zipp ${PYTHON_PN}-pathlib2"

I think the original purpose to add python-more-itertools is to fix the

missing dependency issue, but the contributor does not test on python2

...

commit 5b98315d1955adcaf30c6d8589d6f39692e45a69
Author: Yuan Chao <[email protected]>
Date:   Thu Sep 19 12:23:01 2019 +0900

    python-more-itertools: new recipe

    Add new recipe python-more-itertools as it is RDEPEND of python-zipp and python-pytest.

...

//Hongxu

Quoted 4 lines
Quoted 1 line

//Hongxu

cu
Adrian

#12 lore raw
Quoted 10 lines · Hongxu Jia

...
a serial of dependencies should be affected

meta-python/recipes-devtools/python/python-pytest.inc:19:
${PYTHON_PN}-pluggy \
...
I think the original purpose to add python-more-itertools is to fix the

missing dependency issue, but the contributor does not test on python2
...

Thanks, I missed that this was done to add a missing dependency.

Quoted 1 line

//Hongxu

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#13 lore raw
In reply to Hongxu Jia
Quoted 8 lines · Hongxu Jia
Quoted 6 lines · Andreas Müller
Quoted 5 lines · Hongxu Jia

Python 2.7 is no longer supported. The 5.0.0 release will be the last version targeting Python 2.7. [1]

[1] https://github.com/erikrose/more-itertools/commit/560b045b430e8292c18cf5283de4fdc3e13e56f7

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

* Version going backwards
* Such a patch at times python2 is eol - really?

All these patches just make python2 module work.

Should we clarify that we do not support python2? If yes, we could clean up them.

as long as we have python2 in OE-core, IMO we should not drop the support.

Quoted 8 lines

In this case, if we do not support python2 more-itertools, we should also

clean up these python2 recipes (python-pytest,python-pluggy,python-zipp)

that runtime depends on more-itertools.

Quoted 7 lines

As above upstream commits [1] said, the old version 5.0.0 is the last version

to support python2. Two choice: going backwards or cleaning up, it is impossible

to patch latest more-itertools to support python2

this recipe was just added in last release ( zeus ) so I think its fine to downgrade
since I dont think we have folks with feeds from previous releases that will have to
maintain upgradable feeds.

But I think we should also apply these changes to zeus more importantly.

Quoted 7 lines

//Hongxu

Quoted 1 line

Andreas

author
#14 lore raw
Quoted 8 lines · Khem Raj
Quoted 7 lines · Hongxu Jia
Quoted 6 lines · Andreas Müller
Quoted 5 lines · Hongxu Jia

Python 2.7 is no longer supported. The 5.0.0 release will be the last version targeting Python 2.7. [1]

[1] https://github.com/erikrose/more-itertools/commit/560b045b430e8292c18cf5283de4fdc3e13e56f7

Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

* Version going backwards
* Such a patch at times python2 is eol - really?

All these patches just make python2 module work.

Should we clarify that we do not support python2? If yes, we could clean up them.

as long as we have python2 in OE-core, IMO we should not drop the support.

Agree

Quoted 13 lines
Quoted 13 lines

In this case, if we do not support python2 more-itertools, we should also

clean up these python2 recipes (python-pytest,python-pluggy,python-zipp)

that runtime depends on more-itertools.

As above upstream commits [1] said, the old version 5.0.0 is the last version

to support python2. Two choice: going backwards or cleaning up, it is impossible

Quoted 9 lines
Quoted 1 line

to patch latest more-itertools to support python2

this recipe was just added in last release ( zeus ) so I think its fine to downgrade
since I dont think we have folks with feeds from previous releases that will have to
maintain upgradable feeds.

But I think we should also apply these changes to zeus more importantly.

Agree

//Hongxu

Quoted 5 lines
Quoted 5 lines

//Hongxu

Quoted 1 line

Andreas