Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
88a2c0e605 | ||
|
3381470c02 | ||
|
7763f44a20 | ||
|
3e690c8211 | ||
|
4f065f5ed4 | ||
|
71280f32f3 | ||
|
048c8d73ca | ||
|
fcb231b125 | ||
|
6d85179678 | ||
|
5f0bd3ad05 | ||
|
d658964615 | ||
|
bae4cd93fd | ||
|
616546a49d | ||
|
5ae908bc2e | ||
|
7d0ab88403 | ||
|
5c8dccc6b9 | ||
|
1c463e3d34 | ||
|
425cf2eb63 | ||
|
bb14927ab1 | ||
|
ec111e130c | ||
|
606c7b8116 | ||
|
cfa85f0710 | ||
|
7a42270f10 | ||
|
b2f62e883e | ||
|
582c72b5e6 | ||
|
842b34e066 | ||
|
44e47def53 | ||
|
5623fe993a | ||
|
3f1cff4222 | ||
|
1100c72e8f | ||
|
9d494ccd6e | ||
|
2ea743a71a | ||
|
b5383fa6a2 | ||
|
8fbaae6d84 | ||
|
9c7f46b95b | ||
|
03641f599d | ||
|
d8e77b0d97 | ||
|
0c9be7ea2a | ||
|
ceefeb563e | ||
|
eac3ab0280 | ||
|
89f353e21a |
19
.gitignore
vendored
19
.gitignore
vendored
@ -26,3 +26,22 @@ Cython-0.12.1.tar.gz
|
|||||||
/Cython-0.27.3.tar.gz
|
/Cython-0.27.3.tar.gz
|
||||||
/Cython-0.28.1.tar.gz
|
/Cython-0.28.1.tar.gz
|
||||||
/Cython-0.28.4.tar.gz
|
/Cython-0.28.4.tar.gz
|
||||||
|
/Cython-0.28.5.tar.gz
|
||||||
|
/Cython-0.29~rc2.tar.gz
|
||||||
|
/Cython-0.29.tar.gz
|
||||||
|
/Cython-0.29.1.tar.gz
|
||||||
|
/Cython-0.29.3.tar.gz
|
||||||
|
/Cython-0.29.5.tar.gz
|
||||||
|
/Cython-0.29.6.tar.gz
|
||||||
|
/Cython-0.29.7.tar.gz
|
||||||
|
/Cython-0.29.9.tar.gz
|
||||||
|
/Cython-0.29.10.tar.gz
|
||||||
|
/Cython-0.29.11.tar.gz
|
||||||
|
/Cython-0.29.12.tar.gz
|
||||||
|
/Cython-0.29.13.tar.gz
|
||||||
|
/Cython-0.29.14.tar.gz
|
||||||
|
/Cython-0.29.15.tar.gz
|
||||||
|
/Cython-0.29.16.tar.gz
|
||||||
|
/Cython-0.29.17.tar.gz
|
||||||
|
/Cython-0.29.19.tar.gz
|
||||||
|
/Cython-0.29.21.tar.gz
|
||||||
|
214
Cython.spec
214
Cython.spec
@ -1,17 +1,26 @@
|
|||||||
%global srcname Cython
|
%global srcname Cython
|
||||||
%global upname cython
|
%global upname cython
|
||||||
|
|
||||||
# https://github.com/cython/cython/issues/1982
|
%bcond_without tests
|
||||||
%bcond_with tests
|
|
||||||
|
|
||||||
Name: Cython
|
Name: Cython
|
||||||
Version: 0.28.4
|
Version: 0.29.21
|
||||||
Release: 1%{?dist}
|
%global upver %{version_no_tilde %{nil}}
|
||||||
|
Release: 4%{?dist}
|
||||||
Summary: Language for writing Python extension modules
|
Summary: Language for writing Python extension modules
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://www.cython.org
|
URL: http://www.cython.org
|
||||||
Source: https://github.com/cython/cython/archive/%{version}/%{srcname}-%{version}.tar.gz
|
Source: https://github.com/cython/cython/archive/%{upver}/%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Partially work around issues with class and static methods
|
||||||
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1788506
|
||||||
|
# Mostly backported from upstream: https://github.com/cython/cython/pull/3106
|
||||||
|
# This also:
|
||||||
|
# - Removes staticmethod optimizations for normal functions
|
||||||
|
# - Removes failing test for staticmethod fused functions, which still fail
|
||||||
|
# See also: https://github.com/cython/cython/issues/3614
|
||||||
|
Patch3106: class-static-method-workaround.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -24,89 +33,197 @@ for writing Python extension modules.
|
|||||||
|
|
||||||
%description %{_description}
|
%description %{_description}
|
||||||
|
|
||||||
%package -n python2-%{srcname}
|
|
||||||
Summary: %{summary}
|
|
||||||
%{?python_provide:%python_provide python2-%{srcname}}
|
|
||||||
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
||||||
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
||||||
Obsoletes: Cython < %{?epoch:%{epoch}:}%{version}-%{release}
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: python2-coverage
|
|
||||||
BuildRequires: python2-numpy
|
|
||||||
BuildRequires: python2-jedi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n python2-%{srcname} %{_description}
|
|
||||||
|
|
||||||
Python 2 version.
|
|
||||||
|
|
||||||
%package -n python3-%{srcname}
|
%package -n python3-%{srcname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python3-%{srcname}}
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
Conflicts: python2-%{srcname} < 0.28.4-2
|
||||||
|
Provides: Cython = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
Provides: Cython%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
Obsoletes: Cython < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: python3-coverage
|
|
||||||
BuildRequires: python3-numpy
|
BuildRequires: python3-numpy
|
||||||
BuildRequires: python3-jedi
|
BuildRequires: python3-jedi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# A small templating library is bundled in Cython/Tempita
|
||||||
|
# Upstream version 0.5.2 is available from https://pypi.org/project/Tempita
|
||||||
|
# but the bundled copy is patched and reorganized.
|
||||||
|
# Upstream homepage is inaccessible.
|
||||||
|
Provides: bundled(python3dist(tempita))
|
||||||
|
|
||||||
%description -n python3-%{srcname} %{_description}
|
%description -n python3-%{srcname} %{_description}
|
||||||
|
|
||||||
Python 3 version.
|
Python 3 version.
|
||||||
|
|
||||||
|
%package -n emacs-cython-mode
|
||||||
|
Summary: A major mode for editing Cython source files in Emacs
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: emacs
|
||||||
|
Requires: emacs(bin) >= %{_emacs_version}
|
||||||
|
|
||||||
|
%description -n emacs-cython-mode
|
||||||
|
cython-mode is an Emacs major mode for editing Cython source files.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{upname}-%{version} -p1
|
%autosetup -n %{upname}-%{upver} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
|
# emacs-cython-mode build
|
||||||
|
echo ";;
|
||||||
|
(require 'cython-mode)" > cython-mode-init.el
|
||||||
|
cp -p Tools/cython-mode.el .
|
||||||
|
%{_emacs_bytecompile} *.el
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Must do the python3 install first because the scripts in /usr/bin are
|
|
||||||
# overwritten with every setup.py install (and we want the python2 version
|
|
||||||
# to be the default for now).
|
|
||||||
%py3_install
|
%py3_install
|
||||||
for bin in cython cythonize cygdb; do
|
|
||||||
mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/${bin}3
|
|
||||||
done
|
|
||||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||||
|
|
||||||
%py2_install
|
# emacs-cython-mode install
|
||||||
rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
mkdir -p %{buildroot}%{_emacs_sitelispdir}/
|
||||||
|
cp -p cython-mode.el cython-mode.elc %{buildroot}%{_emacs_sitelispdir}/
|
||||||
|
mkdir -p %{buildroot}%{_emacs_sitestartdir}/
|
||||||
|
cp -p cython-mode-init.el cython-mode-init.elc %{buildroot}%{_emacs_sitestartdir}/
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
%{__python2} runtests.py -vv
|
%{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \
|
||||||
%{__python3} runtests.py -vv
|
%ifarch %{ix86}
|
||||||
|
--exclude run.parallel # https://github.com/cython/cython/issues/2807
|
||||||
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python2-%{srcname}
|
%files -n python3-%{srcname}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc *.txt Demos Doc Tools
|
%doc *.txt Demos Doc Tools
|
||||||
%{_bindir}/cython
|
%{_bindir}/cython
|
||||||
%{_bindir}/cygdb
|
%{_bindir}/cygdb
|
||||||
%{_bindir}/cythonize
|
%{_bindir}/cythonize
|
||||||
%{python2_sitearch}/%{srcname}-*.egg-info/
|
|
||||||
%{python2_sitearch}/%{srcname}/
|
|
||||||
%{python2_sitearch}/pyximport/
|
|
||||||
%{python2_sitearch}/%{upname}.py*
|
|
||||||
|
|
||||||
%files -n python3-%{srcname}
|
|
||||||
%license LICENSE.txt
|
|
||||||
%doc *.txt Demos Doc Tools
|
|
||||||
%{_bindir}/cython3
|
|
||||||
%{_bindir}/cythonize3
|
|
||||||
%{_bindir}/cygdb3
|
|
||||||
%{python3_sitearch}/%{srcname}-*.egg-info/
|
%{python3_sitearch}/%{srcname}-*.egg-info/
|
||||||
%{python3_sitearch}/%{srcname}/
|
%{python3_sitearch}/%{srcname}/
|
||||||
%{python3_sitearch}/pyximport/
|
%{python3_sitearch}/pyximport/
|
||||||
%{python3_sitearch}/%{upname}.py
|
%{python3_sitearch}/%{upname}.py
|
||||||
%{python3_sitearch}/__pycache__/%{upname}.*
|
%{python3_sitearch}/__pycache__/%{upname}.*
|
||||||
|
|
||||||
|
%files -n emacs-cython-mode
|
||||||
|
%license LICENSE.txt
|
||||||
|
%{_emacs_sitelispdir}/cython*.el*
|
||||||
|
%{_emacs_sitestartdir}/cython*.el*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.21-4
|
||||||
|
- Drop build dependency on coverage
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.21-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.29.21-2
|
||||||
|
- Re-enable tests.
|
||||||
|
|
||||||
|
* Wed Jul 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.29.21-1
|
||||||
|
- 0.29.21
|
||||||
|
|
||||||
|
* Wed May 27 2020 sguelton@redhat.com - 0.29.19-1
|
||||||
|
- Update to 0.29.19
|
||||||
|
|
||||||
|
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.17-4
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.17-3
|
||||||
|
- Bootstrap for Python 3.9
|
||||||
|
|
||||||
|
* Wed May 13 2020 Petr Viktorin <pviktori@redhat.com> - 0.29.17-2
|
||||||
|
- Backport classmethod fixes
|
||||||
|
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1788506
|
||||||
|
|
||||||
|
* Tue Apr 28 2020 Marcel Plch <mplch@redhat.com> - 0.29.17-1
|
||||||
|
- Update to 0.29.17
|
||||||
|
|
||||||
|
* Wed Mar 25 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.16-1
|
||||||
|
- Update to 0.29.16 (#1816785)
|
||||||
|
|
||||||
|
* Sat Feb 08 2020 Miro Hrončok <mhroncok@redhat.com> - 0.29.15-1
|
||||||
|
- Update to 0.29.15 (#1800158)
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.14-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Nov 04 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.14-1
|
||||||
|
- Update to 0.29.14 (#1768034)
|
||||||
|
- Python 2 subpackage has been removed
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-5
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-4
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.13-3
|
||||||
|
- Bootstrap for Python 3.8
|
||||||
|
|
||||||
|
* Thu Aug 01 2019 Gwyn Ciesla <gwync@protonmail.com> 0.29.13-2
|
||||||
|
- Rebuild with new numpy.
|
||||||
|
|
||||||
|
* Sat Jul 27 11:58:51 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.13-1
|
||||||
|
- Update to 0.29.13
|
||||||
|
|
||||||
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.12-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 22 2019 Petr Viktorin <pviktori@redhat.com> - 0.29.12-2
|
||||||
|
- Remove non-essential Python 2 test dependencies
|
||||||
|
|
||||||
|
* Thu Jul 11 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.12-1
|
||||||
|
- Update to 0.29.12 (#1727580)
|
||||||
|
|
||||||
|
* Mon Jul 01 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.11-1
|
||||||
|
- Update to 0.29.11 (#1725361)
|
||||||
|
|
||||||
|
* Sun Jun 02 2019 Charalampos Stratakis <cstratak@redhat.com> - 0.29.10-1
|
||||||
|
- Update to 0.29.10 (#1716146)
|
||||||
|
|
||||||
|
* Thu May 30 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.9-1
|
||||||
|
- Update to 0.29.9 (#1714365)
|
||||||
|
|
||||||
|
* Mon May 13 07:10:35 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.7-1
|
||||||
|
- Update to 0.29.7
|
||||||
|
|
||||||
|
* Wed Feb 27 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.6-1
|
||||||
|
- Update to 0.29.6 (#1683661)
|
||||||
|
|
||||||
|
* Fri Feb 08 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.5-1
|
||||||
|
- Update to 0.29.5 (#1667643)
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.29.3-1
|
||||||
|
- Update to 0.29.3 (#1667643)
|
||||||
|
|
||||||
|
* Tue Jan 08 2019 Alex Cobb <alex.cobb@smart.mit.edu> - 0.29.1-2
|
||||||
|
- Added emacs-cython-mode subpackage
|
||||||
|
|
||||||
|
* Mon Dec 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29.1-1
|
||||||
|
- Update to 0.29.1
|
||||||
|
|
||||||
|
* Mon Dec 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29-1
|
||||||
|
- Update to 0.29
|
||||||
|
|
||||||
|
* Wed Oct 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.29~rc2-1
|
||||||
|
- Update to 0.29~rc2
|
||||||
|
|
||||||
|
* Sat Aug 11 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.5-1
|
||||||
|
- Update to 0.28.5
|
||||||
|
|
||||||
|
* Sun Aug 05 2018 Miro Hrončok <mhroncok@redhat.com> - 0.28.4-3
|
||||||
|
- Only have one /usr/bin/cython
|
||||||
|
|
||||||
* Sun Jul 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.4-1
|
* Sun Jul 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.28.4-1
|
||||||
- Update to 0.28.4
|
- Update to 0.28.4
|
||||||
|
|
||||||
@ -372,4 +489,3 @@ rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
|||||||
|
|
||||||
* Tue Feb 26 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.12-1
|
* Tue Feb 26 2008 Neal Becker <ndbecker2@gmail.com> - 0.9.6.12-1
|
||||||
- Initial version
|
- Initial version
|
||||||
|
|
||||||
|
114
class-static-method-workaround.patch
Normal file
114
class-static-method-workaround.patch
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
diff -U3 -r cython-0.29.17.orig/Cython/Compiler/ExprNodes.py cython-0.29.17/Cython/Compiler/ExprNodes.py
|
||||||
|
--- cython-0.29.17.orig/Cython/Compiler/ExprNodes.py 2020-04-26 13:48:48.000000000 +0200
|
||||||
|
+++ cython-0.29.17/Cython/Compiler/ExprNodes.py 2020-05-15 17:44:55.157172257 +0200
|
||||||
|
@@ -2295,8 +2295,10 @@
|
||||||
|
setter = 'PyDict_SetItem'
|
||||||
|
namespace = Naming.moddict_cname
|
||||||
|
elif entry.is_pyclass_attr:
|
||||||
|
- code.globalstate.use_utility_code(UtilityCode.load_cached("SetNameInClass", "ObjectHandling.c"))
|
||||||
|
- setter = '__Pyx_SetNameInClass'
|
||||||
|
+ # Special-case setting __new__
|
||||||
|
+ n = "SetNewInClass" if self.name == "__new__" else "SetNameInClass"
|
||||||
|
+ code.globalstate.use_utility_code(UtilityCode.load_cached(n, "ObjectHandling.c"))
|
||||||
|
+ setter = '__Pyx_' + n
|
||||||
|
else:
|
||||||
|
assert False, repr(entry)
|
||||||
|
code.put_error_if_neg(
|
||||||
|
diff -U3 -r cython-0.29.17.orig/Cython/Compiler/Nodes.py cython-0.29.17/Cython/Compiler/Nodes.py
|
||||||
|
--- cython-0.29.17.orig/Cython/Compiler/Nodes.py 2020-04-26 13:48:48.000000000 +0200
|
||||||
|
+++ cython-0.29.17/Cython/Compiler/Nodes.py 2020-05-15 17:44:55.159172253 +0200
|
||||||
|
@@ -2872,7 +2872,6 @@
|
||||||
|
func = decorator.decorator
|
||||||
|
if func.is_name:
|
||||||
|
self.is_classmethod |= func.name == 'classmethod'
|
||||||
|
- self.is_staticmethod |= func.name == 'staticmethod'
|
||||||
|
|
||||||
|
if self.is_classmethod and env.lookup_here('classmethod'):
|
||||||
|
# classmethod() was overridden - not much we can do here ...
|
||||||
|
diff -U3 -r cython-0.29.17.orig/Cython/Utility/ObjectHandling.c cython-0.29.17/Cython/Utility/ObjectHandling.c
|
||||||
|
--- cython-0.29.17.orig/Cython/Utility/ObjectHandling.c 2020-04-26 13:48:48.000000000 +0200
|
||||||
|
+++ cython-0.29.17/Cython/Utility/ObjectHandling.c 2020-05-15 17:44:55.160172251 +0200
|
||||||
|
@@ -1163,6 +1163,30 @@
|
||||||
|
#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/////////////// SetNewInClass.proto ///////////////
|
||||||
|
+
|
||||||
|
+static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value);
|
||||||
|
+
|
||||||
|
+/////////////// SetNewInClass ///////////////
|
||||||
|
+//@requires: SetNameInClass
|
||||||
|
+
|
||||||
|
+// Special-case setting __new__: if it's a Cython function, wrap it in a
|
||||||
|
+// staticmethod. This is similar to what Python does for a Python function
|
||||||
|
+// called __new__.
|
||||||
|
+static int __Pyx_SetNewInClass(PyObject *ns, PyObject *name, PyObject *value) {
|
||||||
|
+#ifdef __Pyx_CyFunction_USED
|
||||||
|
+ int ret;
|
||||||
|
+ if (__Pyx_CyFunction_Check(value)) {
|
||||||
|
+ PyObject *staticnew = PyStaticMethod_New(value);
|
||||||
|
+ if (unlikely(!staticnew)) return -1;
|
||||||
|
+ ret = __Pyx_SetNameInClass(ns, name, staticnew);
|
||||||
|
+ Py_DECREF(staticnew);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+ return __Pyx_SetNameInClass(ns, name, value);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
|
||||||
|
/////////////// GetModuleGlobalName.proto ///////////////
|
||||||
|
//@requires: PyDictVersioning
|
||||||
|
Only in cython-0.29.17.orig: cython-0.29.17
|
||||||
|
diff -U3 -r cython-0.29.17.orig/tests/run/cyfunction.pyx cython-0.29.17/tests/run/cyfunction.pyx
|
||||||
|
--- cython-0.29.17.orig/tests/run/cyfunction.pyx 2020-04-26 13:48:48.000000000 +0200
|
||||||
|
+++ cython-0.29.17/tests/run/cyfunction.pyx 2020-05-15 17:44:55.160172251 +0200
|
||||||
|
@@ -376,6 +376,18 @@
|
||||||
|
def meth(self): pass
|
||||||
|
|
||||||
|
|
||||||
|
+class TestStaticmethod(object):
|
||||||
|
+ """
|
||||||
|
+ >>> x = TestStaticmethod()
|
||||||
|
+ >>> x.staticmeth(42)
|
||||||
|
+ 42
|
||||||
|
+ >>> x.staticmeth.__get__(42)()
|
||||||
|
+ 42
|
||||||
|
+ """
|
||||||
|
+ @staticmethod
|
||||||
|
+ def staticmeth(arg): return arg
|
||||||
|
+
|
||||||
|
+
|
||||||
|
cdef class TestOptimisedBuiltinMethod:
|
||||||
|
"""
|
||||||
|
>>> obj = TestOptimisedBuiltinMethod()
|
||||||
|
diff -U3 -r cython-0.29.17.orig/tests/run/fused_def.pyx cython-0.29.17/tests/run/fused_def.pyx
|
||||||
|
--- cython-0.29.17.orig/tests/run/fused_def.pyx 2020-04-26 13:48:48.000000000 +0200
|
||||||
|
+++ cython-0.29.17/tests/run/fused_def.pyx 2020-05-15 18:03:39.436752174 +0200
|
||||||
|
@@ -268,14 +268,6 @@
|
||||||
|
def test_fused_def_super():
|
||||||
|
"""
|
||||||
|
>>> test_fused_def_super()
|
||||||
|
- long 10
|
||||||
|
- long 11
|
||||||
|
- long 11
|
||||||
|
- long 12
|
||||||
|
- short 12
|
||||||
|
- long 13
|
||||||
|
- short 13
|
||||||
|
- long 14
|
||||||
|
<class 'fused_def.SubClass'> long 14
|
||||||
|
<class 'fused_def.SubClass'> long 15
|
||||||
|
<class 'fused_def.SubClass'> long 15
|
||||||
|
@@ -296,11 +288,6 @@
|
||||||
|
obj = SubClass()
|
||||||
|
cls = SubClass
|
||||||
|
|
||||||
|
- obj.mystaticmethod(obj, 10)
|
||||||
|
- cls.mystaticmethod(obj, 11)
|
||||||
|
- obj.mystaticmethod[cy.short](obj, 12)
|
||||||
|
- cls.mystaticmethod[cy.short](obj, 13)
|
||||||
|
-
|
||||||
|
obj.myclassmethod(14)
|
||||||
|
cls.myclassmethod(15)
|
||||||
|
obj.myclassmethod[cy.short](16)
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (Cython-0.28.4.tar.gz) = 72d12ce4ba443e6b1fc59b70be828882a714d186b894ff18bde2c337a9d11c8ee2a8f6c1d21d127b918825fb299099db079116087fc4fee8cf0e5cd773c5b967
|
SHA512 (Cython-0.29.21.tar.gz) = 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679
|
||||||
|
Loading…
Reference in New Issue
Block a user