[Cython] Fedora failures with Cython 3.0a5

2020-05-29 Thread Marcel Plch
In Fedora, we rebuilt 152 packages against Cython 3.0a5 we have found
some breakages that might be relevant to you. We are not entirely sure
whether these issues are caused by the individual projects' wrong usage
of Cython, or if Cython broke them unintentionally. Do any of the
failures look like Cython bugs to you? We can provide moredetail if one
looks interesting.  Some expected problems, like python2
syntax/semantics, were taken into account and noted below as issues of
the individual projects.

The linked logs will be garbage-collected in about 2 weeks; let us know
if this happens and we can rebuild the packages.


# Missing .pxd files
Four packages were broken by being unable to locate .pxd files to compile.
Packages broken by this:
- mlpack 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01409078-mlpack/builder-live.log.gz
- MDAnalysis 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01409419-python-MDAnalysis/builder-live.log.gz
- pplpy 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01411510-python-pplpy/builder-live.log.gz
- bintrees 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01409724-python-bintrees/builder-live.log.gz

Can this be caused by different import semantics of Python 3?


# GIL issues
In three packages, problems with the GIL occurred. Some operations
requiring the gil were executed when gil wasn't being held and vice
versa.
Packages broken by this:
- tables 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01408091-python-tables/builder-live.log.gz
- scikit-image 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01412046-python-scikit-image/builder-live.log.gz
- ssh2-python 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01412227-python-ssh2-python/builder-live.log.gz


# AttributeError in Cython
One package might have revealed a bug inside of Cython. It triggers a
scope inside of ExprNodes.py that seems to have a missing attribute that
should be there. See the log for more info.
Package broken by this:
- giacpy 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01410600-python-giacpy/builder-live.log.gz


# Some imports fail to be executed
This might be related to some of the previous problems, or a bug in
cimport. Two packages failed tests on importing a module from the the
same package. In fisx, the import was done from  a Cython generated
file. In cytoolz, a cythonized module was partially initialized,
possibly due to cyclic import.
Package broken by this:
- fisx 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01410439-python-fisx/builder-live.log.gz
- cytoolz 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01410135-python-cytoolz/builder-live.log.gz


# Assignment to a read-only property
One package broke on error stating attempts to assign to a read only properties.
Package broken by this: Pandas 
https://download.copr.fedorainfracloud.org/results/dormouse/py38cy30a5/fedora-rawhide-x86_64/01408020-python-pandas/builder-live.log.gz


Some problems were expected/unrelated:
- 9 packages use python 2 syntax and don't set the default
- 2 packages were affected by the -fno-common default in GCC 10

-- 
Marcel Plch

* IRC:
  * Freenode: dormouse

()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments



signature.asc
Description: PGP signature
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


[Cython] Support for C++ scoped enums (PR #1603)

2020-05-29 Thread Ashwin Srinath
Hello Cython Developers,

I just opened PR https://github.com/cython/cython/pull/3640, which
adds support for C++ scoped enumerations.

Feedback on the high-level approach used here is greatly welcome and
appreciated.  In general, I used the advice in
https://groups.google.com/forum/#!topic/cython-users/OdvjbZ1_YKU as a
starting point.

One problem I haven't been to solve is coercing Python objects to and
from the enum class correctly. Currently the following utility
function does the conversion from C++->Python (CppConvert.pyx):

   enum.to_py 
  cdef extern from "" namespace "std":
  cdef cppclass underlying_type_t[T]:
  pass

  @cname("{{cname}}")
  cdef object {{cname}}(const {{TYPE}}& x):
   return (x)

As you can see, the conversion goes
C++->underlying_type_t->int->Python, where ideally I'd like to
eliminate the conversion to `int` before obtaining a Python object.

Any ideas for how to solve this? If you prefer that this discussion
happen more broadly on GitHub, I'm happy to move it there.

Best,
Ashwin
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel