Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1770543

Summary: Cython update needed for update pyproj
Product: Red Hat Enterprise Linux 8 Reporter: Jos de Kloe <josdekloe>
Component: CythonAssignee: Python Maintainers <python-maint>
Status: CLOSED NOTABUG QA Contact: RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: mhroncok, pviktori
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-25 14:26:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1762666    

Description Jos de Kloe 2019-11-10 11:28:47 UTC
Description of problem:

I am looking in to providing pyproj for epel8, but encounter the fact the the latest version does not conpile with the current Cython version 0.28 as provided by EL8.

Therefore could Cython be upgraded to version 0.29?

Comment 1 Miro Hrončok 2019-11-10 12:37:49 UTC
Note that in RHEL, we usually backport things instead of rebasing to a new version.

What particular feature/fix is needed here?

Comment 2 Jos de Kloe 2019-11-10 17:08:09 UTC
I know what RHEL policy is, although I had hoped that for EPEL8, since it is so new, there would be some options to move forward.

There is no specific feature that I need, but the pyproj upstream has been strongly developing the last few months (after proj moved to version 6.x). I packaged version 2.2.1 from June now, but had to exclude some of the unit testing because it contains failures, and that makes me feel very uneasy. I would much rather be able to have a version where all unit tests work as intended.

Comment 3 Miro Hrončok 2019-11-10 22:47:00 UTC
To clarify. With RHEL 8 version of Cython (0.28), it compiles, but some unit tests of pyproj fail. With 0.29, it compiles and all unit tests of pyproj pass?

Comment 4 Jos de Kloe 2019-11-11 19:20:52 UTC
Current situation is:

pyproj v2.4.1 does not compile for RHEL8 due to too old cython version v0.28.
It does compile on Fedora 30 and Fedora 31, since both have cython v0.29. On that platform all unit tests pass for all architectures except i686.

pyproj v2.3.1 does compile on EPEL8, but the unit tests fail due to missing dependency python3-shapely.

pyproj v2.2.1 does compile on EPEL8, and one single unit test case fails for all architectures. In the current spec file I excluded running the module that holds this one test case using the " --ignore test/test_transformer.py" option. This means that the other 42 test cases in this module are also skipped.

A more fine grained exclude of only this one test case is not easily possible, since the pytest-3 for EPEL8 is too old and does not include the "--deselect" option.
But of course if it turns out the only option is to use pyproj v2.2.1, then I will patch this test module to disable this one test if I must (or if possible back port a fixed version for this test from a higher version).

Comment 5 Miro Hrončok 2019-11-11 19:43:18 UTC
> pyproj v2.4.1 does not compile for RHEL8 due to too old cython version v0.28.

Could you please share the error you get?

> A more fine grained exclude of only this one test case is not easily
> possible, since the pytest-3 for EPEL8 is too old and does not include the
> "--deselect" option.

Would the -k option help?

Comment 6 Jos de Kloe 2019-11-11 20:07:20 UTC
This is a typical error that cython 0.28 produces for pyproj 2.4.1:

------------------------------------------------------------
Error compiling Cython file:
------------------------------------------------------------
...
                    projlonlatin.uv.u = lonsdata[iii]
                    projlonlatin.uv.v = latsdata[iii]
                projxyout = proj_trans(self.projobj, PJ_FWD, projlonlatin)
                errno = proj_errno(self.projobj)
                if errcheck and errno:
                    raise ProjError("proj error: {}".format(
                   ^
------------------------------------------------------------
pyproj/_proj.pyx:98:20: Raising exception not allowed without gil
Error compiling Cython file:
------------------------------------------------------------

and this is exactly one of the items stated in the release notes for v0.29. In 0.28 raising an error is not allowed in "nogil" mode, while in 0.29 cython automatically steps back to "gil" mode and allows this.

For the full list of errors see the build log for this scatch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=38862916


As for the "-k" option for pytest, this is as I understand it an option to select or include testcases,
but since it accepts any "python evaluatable expression" I guess something could be done, yes. Have not tried that yet.

Comment 7 Miro Hrončok 2019-11-11 20:14:15 UTC
So if we end up backporting the feature, it would be https://github.com/cython/cython/commit/4f4841aa6e4e542f0bfc622cfa4d09dfc863a74d

Comment 9 Jos de Kloe 2019-11-11 20:18:25 UTC
small correction:

> pyproj v2.4.1 does not compile for RHEL8 due to too old cython version v0.28.
> It does compile on Fedora 30 and Fedora 31, since both have cython v0.29. On that platform all unit tests pass for all architectures except i686.

this should be: It does compile on Fedora 32(rawhide).

On fedora 30 and 31 the proj version is v5.2.0 which is too old, pyproj 2.4.1 requires proj v6.2.0.

Comment 10 Jos de Kloe 2019-11-11 21:12:44 UTC
< So if we end up backporting the feature, it would be https://github.com/cython/cython/commit/4f4841aa6e4e542f0bfc622cfa4d09dfc863a74d

correct.
Although for myself I am not convinced yet that this backporting is a good idea. It will create a cython version that differs from the 0.28 release, so it may no longer match the online documentation users may find for that cython version. That could be very confusing.

Comment 12 Petr Viktorin (pviktori) 2020-02-11 14:20:02 UTC
python38-cython in RHEL 8.2 (now in Beta) is at version 0.29.14.

You can install it using `sudo yum install python38-cython` and run using `python3.8 -m cython`. It will bring in the Python 3.8 stack, but I hope the extra size is OK for building. The new Cython's output should be usable even for Python 3.6.

Comment 13 Petr Viktorin (pviktori) 2020-02-25 14:26:14 UTC
Closing as "not a bug", as we don't generally update RHEL software to newer versions. The way to get fresher content is through the new module.

Please re-open if this is a problem or you want to discuss further.