Update: devel/py-typing 3.6.4 -> 3.6.6

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Update: devel/py-typing 3.6.4 -> 3.6.6

Kurt Mosiejczuk-9
This is an update for py-typing to bring it from 3.6.4 to 3.6.6

py-typing backports the typing functionality from 3.6+ to python
versions before 3.5. Since we ship 3.6.8 now, there is no longer
a reason to have a python3 flavor. Installing a python3 version
does nothing at this point. So I removed the python3 flavor.

3.6.6 introduced one new test where they called "python" for the
test so it failed. I patched it to call python2 and now all tests
pass.

Since cvs diff doesn't like new subdirectories and the patches
directory is new with this update, I generated this diff with
diff -uNrp between the old version and new.

--Kurt

diff -uNrp /usr/ports/devel/py-typing/Makefile /usr/ports/mystuff/devel/py-typing/Makefile
--- /usr/ports/devel/py-typing/Makefile Fri Apr 27 11:14:47 2018
+++ /usr/ports/mystuff/devel/py-typing/Makefile Mon Feb 18 00:23:21 2019
@@ -2,7 +2,7 @@
 
 COMMENT = type hints for python
 
-MODPY_EGG_VERSION = 3.6.4
+MODPY_EGG_VERSION = 3.6.6
 DISTNAME = typing-${MODPY_EGG_VERSION}
 PKGNAME = py-${DISTNAME}
 
@@ -15,13 +15,7 @@ MODULES = lang/python
 MODPY_PI = Yes
 MODPY_SETUPTOOLS = Yes
 
-FLAVORS = python3
-FLAVOR ?=
-
-# python3 tests require py-flake8-* ports
-.if ! ${FLAVOR:Mpython3}
 do-test:
  cd ${WRKSRC} && ${MODPY_BIN} -m unittest discover python2
-.endif
 
 .include <bsd.port.mk>
diff -uNrp /usr/ports/devel/py-typing/distinfo /usr/ports/mystuff/devel/py-typing/distinfo
--- /usr/ports/devel/py-typing/distinfo Fri Apr 27 11:14:47 2018
+++ /usr/ports/mystuff/devel/py-typing/distinfo Mon Feb 18 00:23:30 2019
@@ -1,2 +1,2 @@
-SHA256 (typing-3.6.4.tar.gz) = 1ACpNEJUgDojaFM+RTOkIA0h63trcpwXO8OCAadNs/I=
-SIZE (typing-3.6.4.tar.gz) = 71347
+SHA256 (typing-3.6.6.tar.gz) = QCfF9hJ6YmekNSAZgboVbeka0NHZjp3cKqFzRTRTSS0=
+SIZE (typing-3.6.6.tar.gz) = 71799
diff -uNrp /usr/ports/devel/py-typing/patches/patch-python2_test_typing_py /usr/ports/mystuff/devel/py-typing/patches/patch-python2_test_typing_py
--- /usr/ports/devel/py-typing/patches/patch-python2_test_typing_py Wed Dec 31 19:00:00 1969
+++ /usr/ports/mystuff/devel/py-typing/patches/patch-python2_test_typing_py Mon Feb 18 00:38:27 2019
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: python2/test_typing.py
+--- python2/test_typing.py.orig
++++ python2/test_typing.py
+@@ -1972,7 +1972,7 @@ class AllTests(BaseTestCase):
+         file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                  'typing.py')
+         try:
+-            subprocess.check_output('python -OO {}'.format(file_path),
++            subprocess.check_output('python2 -OO {}'.format(file_path),
+                                     stderr=subprocess.STDOUT,
+                                     shell=True)
+         except subprocess.CalledProcessError:

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Kurt Mosiejczuk-9
On Mon, Feb 18, 2019 at 12:49:29AM -0500, Kurt Mosiejczuk wrote:

> py-typing backports the typing functionality from 3.6+ to python
> versions before 3.5. Since we ship 3.6.8 now, there is no longer a
> reason to have a python3 flavor. Installing a python3 version does
> nothing at this point. So I removed the python3 flavor.

An interesting side effect of this is that ports that depend on it
need to be tweaked *not* to depend on it for a Python 3 version. I've
sent out a patch for the py-aiodns port I maintain. I have a patch
for py-dnspython also, but many more things depend on py-dnspython,
including mailman, samba, and more.

That's a lot of dependencies to check to see if I am throwing a monkey
wrench into the works. Should I start testing all those ports and
flavors of samba? Realistically py-typing should do nothing for python3
so these changes *should* be a no-op. Should I maybe redo the update of
py-typing without killing the python3 flavor?

--Kurt

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Stuart Henderson
On 2019/02/18 02:00, Kurt Mosiejczuk wrote:

> On Mon, Feb 18, 2019 at 12:49:29AM -0500, Kurt Mosiejczuk wrote:
>
> > py-typing backports the typing functionality from 3.6+ to python
> > versions before 3.5. Since we ship 3.6.8 now, there is no longer a
> > reason to have a python3 flavor. Installing a python3 version does
> > nothing at this point. So I removed the python3 flavor.
>
> An interesting side effect of this is that ports that depend on it
> need to be tweaked *not* to depend on it for a Python 3 version. I've
> sent out a patch for the py-aiodns port I maintain. I have a patch
> for py-dnspython also, but many more things depend on py-dnspython,
> including mailman, samba, and more.
>
> That's a lot of dependencies to check to see if I am throwing a monkey
> wrench into the works. Should I start testing all those ports and
> flavors of samba? Realistically py-typing should do nothing for python3
> so these changes *should* be a no-op. Should I maybe redo the update of
> py-typing without killing the python3 flavor?
>
> --Kurt
>

my 2c: at this point in the release cycle, that's probably the safer way
to go, leaving an explanatory comment next to the flavour bits. After
we're done with 6.5 go through killing them (and for py-typing itself
add a comment explaining why there's no py3 flavour otherwise I expect
someone will try to re-add it later ;)

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Kurt Mosiejczuk-9
On Mon, Feb 18, 2019 at 11:02:48AM +0000, Stuart Henderson wrote:

> my 2c: at this point in the release cycle, that's probably the safer way
> to go, leaving an explanatory comment next to the flavour bits. After
> we're done with 6.5 go through killing them (and for py-typing itself
> add a comment explaining why there's no py3 flavour otherwise I expect
> someone will try to re-add it later ;)

Alright. I have redone the port without killing the python3 flavor for
now. I put a note above the flavor it should die post 6.5. While at it,
I'll grab maintainership since I know the mess that is coming with
removing that flavor.

tests on net/py-aiodns, net/py-dnspython, and security/py-M2crypto pass.
(Well, py-M2crypto mostly passes, but it fails the same number as before
this update).

Same caveat as originally, I've patched a new test so it will run,
no patches, diff generated by hand with diff-uNrp

--Kurt

diff -uNrp /usr/ports/devel/py-typing/Makefile /usr/ports/mystuff/devel/py-typing/Makefile
--- /usr/ports/devel/py-typing/Makefile Fri Apr 27 11:14:47 2018
+++ /usr/ports/mystuff/devel/py-typing/Makefile Mon Feb 18 08:01:28 2019
@@ -2,12 +2,14 @@
 
 COMMENT = type hints for python
 
-MODPY_EGG_VERSION = 3.6.4
+MODPY_EGG_VERSION = 3.6.6
 DISTNAME = typing-${MODPY_EGG_VERSION}
 PKGNAME = py-${DISTNAME}
 
 CATEGORIES = devel
 
+MAINTAINER = Kurt Mosiejczuk <[hidden email]>
+
 # PSF
 PERMIT_PACKAGE_CDROM = Yes
 
@@ -15,6 +17,7 @@ MODULES = lang/python
 MODPY_PI = Yes
 MODPY_SETUPTOOLS = Yes
 
+# python3 flavor does nothing for python 3.6+ - should be removed post 6.5
 FLAVORS = python3
 FLAVOR ?=
 
diff -uNrp /usr/ports/devel/py-typing/distinfo /usr/ports/mystuff/devel/py-typing/distinfo
--- /usr/ports/devel/py-typing/distinfo Fri Apr 27 11:14:47 2018
+++ /usr/ports/mystuff/devel/py-typing/distinfo Mon Feb 18 08:01:44 2019
@@ -1,2 +1,2 @@
-SHA256 (typing-3.6.4.tar.gz) = 1ACpNEJUgDojaFM+RTOkIA0h63trcpwXO8OCAadNs/I=
-SIZE (typing-3.6.4.tar.gz) = 71347
+SHA256 (typing-3.6.6.tar.gz) = QCfF9hJ6YmekNSAZgboVbeka0NHZjp3cKqFzRTRTSS0=
+SIZE (typing-3.6.6.tar.gz) = 71799
diff -uNrp /usr/ports/devel/py-typing/patches/patch-python2_test_typing_py /usr/ports/mystuff/devel/py-typing/patches/patch-python2_test_typing_py
--- /usr/ports/devel/py-typing/patches/patch-python2_test_typing_py Wed Dec 31 19:00:00 1969
+++ /usr/ports/mystuff/devel/py-typing/patches/patch-python2_test_typing_py Mon Feb 18 08:04:51 2019
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: python2/test_typing.py
+--- python2/test_typing.py.orig
++++ python2/test_typing.py
+@@ -1972,7 +1972,7 @@ class AllTests(BaseTestCase):
+         file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                  'typing.py')
+         try:
+-            subprocess.check_output('python -OO {}'.format(file_path),
++            subprocess.check_output('python2 -OO {}'.format(file_path),
+                                     stderr=subprocess.STDOUT,
+                                     shell=True)
+         except subprocess.CalledProcessError:

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Kurt Mosiejczuk-9
On Mon, Feb 18, 2019 at 08:30:00AM -0500, Kurt Mosiejczuk wrote:
> On Mon, Feb 18, 2019 at 11:02:48AM +0000, Stuart Henderson wrote:

> > my 2c: at this point in the release cycle, that's probably the safer way
> > to go, leaving an explanatory comment next to the flavour bits. After
> > we're done with 6.5 go through killing them (and for py-typing itself
> > add a comment explaining why there's no py3 flavour otherwise I expect
> > someone will try to re-add it later ;)

> Alright. I have redone the port without killing the python3 flavor for
> now. I put a note above the flavor it should die post 6.5. While at it,
> I'll grab maintainership since I know the mess that is coming with
> removing that flavor.

> tests on net/py-aiodns, net/py-dnspython, and security/py-M2crypto pass.
> (Well, py-M2crypto mostly passes, but it fails the same number as before
> this update).

> Same caveat as originally, I've patched a new test so it will run,
> no patches, diff generated by hand with diff-uNrp

ping.

I re-generated the patch using cvs diff, but it is the same patch.
Note that it adds a patches directory so that the tests pass.

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-typing/Makefile,v
retrieving revision 1.6
diff -u -p -r1.6 Makefile
--- Makefile 27 Apr 2018 15:14:47 -0000 1.6
+++ Makefile 19 Mar 2019 16:54:11 -0000
@@ -2,12 +2,14 @@
 
 COMMENT = type hints for python
 
-MODPY_EGG_VERSION = 3.6.4
+MODPY_EGG_VERSION = 3.6.6
 DISTNAME = typing-${MODPY_EGG_VERSION}
 PKGNAME = py-${DISTNAME}
 
 CATEGORIES = devel
 
+MAINTAINER = Kurt Mosiejczuk <[hidden email]>
+
 # PSF
 PERMIT_PACKAGE_CDROM = Yes
 
@@ -15,6 +17,7 @@ MODULES = lang/python
 MODPY_PI = Yes
 MODPY_SETUPTOOLS = Yes
 
+# python3 flavor does nothing for python 3.6+ - should be removed post 6.5
 FLAVORS = python3
 FLAVOR ?=
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/py-typing/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 27 Apr 2018 15:14:47 -0000 1.4
+++ distinfo 19 Mar 2019 16:54:11 -0000
@@ -1,2 +1,2 @@
-SHA256 (typing-3.6.4.tar.gz) = 1ACpNEJUgDojaFM+RTOkIA0h63trcpwXO8OCAadNs/I=
-SIZE (typing-3.6.4.tar.gz) = 71347
+SHA256 (typing-3.6.6.tar.gz) = QCfF9hJ6YmekNSAZgboVbeka0NHZjp3cKqFzRTRTSS0=
+SIZE (typing-3.6.6.tar.gz) = 71799
Index: patches/patch-python2_test_typing_py
===================================================================
RCS file: patches/patch-python2_test_typing_py
diff -N patches/patch-python2_test_typing_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-python2_test_typing_py 19 Mar 2019 16:54:11 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: python2/test_typing.py
+--- python2/test_typing.py.orig
++++ python2/test_typing.py
+@@ -1972,7 +1972,7 @@ class AllTests(BaseTestCase):
+         file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                  'typing.py')
+         try:
+-            subprocess.check_output('python -OO {}'.format(file_path),
++            subprocess.check_output('python2 -OO {}'.format(file_path),
+                                     stderr=subprocess.STDOUT,
+                                     shell=True)
+         except subprocess.CalledProcessError:

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Klemens Nanni-2
In reply to this post by Kurt Mosiejczuk-9
On Mon, Feb 18, 2019 at 12:49:29AM -0500, Kurt Mosiejczuk wrote:
> This is an update for py-typing to bring it from 3.6.4 to 3.6.6
>
> py-typing backports the typing functionality from 3.6+ to python
> versions before 3.5. Since we ship 3.6.8 now, there is no longer
> a reason to have a python3 flavor. Installing a python3 version
> does nothing at this point. So I removed the python3 flavor.
Makes sense to me, however the list of reverse dependencies is rather
big; did you check whether none of those usese the python3 flavor. that
is whether its dependency can be removed?

> 3.6.6 introduced one new test where they called "python" for the
> test so it failed. I patched it to call python2 and now all tests
> pass.
You could also create a symlink in ${WRKDIR}/bin to avoid the patch,
I think.

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Klemens Nanni-2
On Wed, Mar 20, 2019 at 11:37:27PM +0100, Klemens Nanni wrote:
> Makes sense to me, however the list of reverse dependencies is rather
> big; did you check whether none of those usese the python3 flavor. that
> is whether its dependency can be removed?
Nevermind; should've read the whole thread before replying.

Reply | Threaded
Open this post in threaded view
|

Re: Update: devel/py-typing 3.6.4 -> 3.6.6

Kurt Mosiejczuk-9
In reply to this post by Klemens Nanni-2
On Wed, Mar 20, 2019 at 11:37:27PM +0100, Klemens Nanni wrote:
> On Mon, Feb 18, 2019 at 12:49:29AM -0500, Kurt Mosiejczuk wrote:
>
> > This is an update for py-typing to bring it from 3.6.4 to 3.6.6

> > py-typing backports the typing functionality from 3.6+ to python
> > versions before 3.5. Since we ship 3.6.8 now, there is no longer a
> > reason to have a python3 flavor. Installing a python3 version does
> > nothing at this point. So I removed the python3 flavor.
>
> Makes sense to me, however the list of reverse dependencies is rather
> big; did you check whether none of those usese the python3 flavor.
> that is whether its dependency can be removed?

> > 3.6.6 introduced one new test where they called "python" for the
> > test so it failed. I patched it to call python2 and now all tests
> > pass.
>
> You could also create a symlink in ${WRKDIR}/bin to avoid the patch, I
> think.

You're hitting the beginning of the thread. sthen weighed in and said
we should probably wait until 6.5 releases. I sent another diff that
does the update but maintains the python3 flavor for now. I took
maintainership in that one too since I know the mess that will be
needing cleanup when I actually remove the python3 flavor on that one.

--Kurt