Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710384 - dev-python/m2crypto-0.35.2 should conditionally depend on dev-python/typing
Summary: dev-python/m2crypto-0.35.2 should conditionally depend on dev-python/typing
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-02-21 10:38 UTC by Jason Chan
Modified: 2020-02-21 14:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-python/typing emerged with 3.7, m2crypto failed with 3.8 (m2crypto_withpy38.log,6.15 KB, text/x-log)
2020-02-21 12:55 UTC, Jason Chan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Chan 2020-02-21 10:38:11 UTC
https://docs.python.org/3/library/typing.html

Python 3.8's built in typing module causes m2crypto to fail to build. It will pull in dev-python/typing and virtual/python-typing (if not emerged), which conflicts with 3.8's built in typing.


Suggested revision:

--- m2crypto-0.35.2.ebuild      2020-02-21 02:23:03.473398580 -0800
+++ m2crypto-0.35.2-r1.ebuild   2020-02-21 02:26:42.903396892 -0800
@@ -21,7 +21,7 @@ IUSE="libressl"
 RDEPEND="
        !libressl? ( dev-libs/openssl:0= )
        libressl? ( dev-libs/libressl:0= )
-       virtual/python-typing[${PYTHON_USEDEP}]
+       python_targets_python2_7? ( virtual/python-typing[${PYTHON_USEDEP}] )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="



Reproducible: Always




This is not the only package affected.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 12:01:06 UTC
I fail to see how your patch is supposed to help.  It just inlines the conditional that is already present in virtual.
Comment 2 Jason Chan 2020-02-21 12:43:30 UTC
(In reply to Michał Górny from comment #1)
> I fail to see how your patch is supposed to help.  It just inlines the
> conditional that is already present in virtual.

When running emerge -avuDU @world, virtual/python-typing is still pulled as a dependency but I do not have it on. This is the same case for dev-python/flake8-3.7.9.

# emerge -pv virtual/python-typing

These are the packages that would be merged, in order:

Calculating dependencies                      ... done!      
[ebuild  N     ] virtual/python-typing-0-r1::gentoo  PYTHON_TARGETS="python3_7 python3_8 -pypy3 -python2_7 -python3_6" 0 KiB
Comment 3 Jason Chan 2020-02-21 12:54:34 UTC
To clarify, the problem is that it isn't possible to emerge packages that use virtual/python-typing with Python 3.8 as the interpreter. 

When I tried to emerge dev-python/typing with Python 3.8:

Traceback (most recent call last):
  File "/usr/lib/portage/python3.8/ebuild-ipc.py", line 48, in <module>
    from portage.util._eventloop.global_event_loop import global_event_loop
  File "/usr/lib/python3.8/site-packages/portage/util/_eventloop/global_event_loop.py", line 7, in <module>
    from .EventLoop import EventLoop
  File "/usr/lib/python3.8/site-packages/portage/util/_eventloop/EventLoop.py", line 17, in <module>
    import asyncio as _real_asyncio
  File "/usr/lib/python3.8/asyncio/__init__.py", line 8, in <module>
    from .base_events import *
  File "/usr/lib/python3.8/asyncio/base_events.py", line 45, in <module>
    from . import staggered
  File "/usr/lib/python3.8/asyncio/staggered.py", line 6, in <module>
    import typing
  File "/usr/lib/python3.8/site-packages/typing.py", line 1357, in <module>
    class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
  File "/usr/lib/python3.8/site-packages/typing.py", line 1005, in __new__
    self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
 * The ebuild phase 'die_hooks' has exited unexpectedly. This type of
 * behavior is known to be triggered by things such as failed variable
 * assignments (bug #190128) or bad substitution errors (bug #200313).
 * Normally, before exiting, bash should have displayed an error message
 * above. If bash did not produce an error message above, it's possible
 * that the ebuild has called `exit` when it should have called `die`
 * instead. This behavior may also be triggered by a corrupt bash binary or
 * a hardware problem such as memory or cpu malfunction. If the problem is
 * not reproducible or it appears to occur randomly, then it is likely to
 * be triggered by a hardware problem. If you suspect a hardware problem
 * then you should try some basic hardware diagnostics such as memtest.
 * Please do not report this as a bug unless it is consistently
 * reproducible and you are sure that your bash binary and hardware are
 * functioning properly.
 * FAILED postinst: 1
Comment 4 Jason Chan 2020-02-21 12:55:25 UTC
Created attachment 614820 [details]
dev-python/typing emerged with 3.7, m2crypto failed with 3.8
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 13:44:12 UTC
But dev-python/typing covers only py2.7:

# gpy-showimpls dev-python/typing
dev-python/typing:0
        3.6.2-r1: S     2.7
        3.6.4-r1: ~   # 2.7
         3.7.4.1: ~     2.7
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-21 13:44:52 UTC
My guess would be that you're using a broken overlay.  However, you haven't attached 'emerge --info' as you're supposed to, so I can't know for sure.
Comment 7 Jason Chan 2020-02-21 14:44:18 UTC
(In reply to Michał Górny from comment #6)
> My guess would be that you're using a broken overlay.  However, you haven't
> attached 'emerge --info' as you're supposed to, so I can't know for sure.

That you are correct. It was in a broken overlay. Sorry for the incorrect report.