From e108841338568d5bc8f2034aa70722d9b221c982 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 17 Feb 2025 15:33:22 -0600 Subject: [PATCH 1/2] Drop python 3.8 --- .github/workflows/ci.yml | 18 +++++++++--------- appveyor.yml | 2 +- setup.py | 8 ++++---- symengine/lib/symengine_wrapper.in.pyx | 6 ------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2763750c..ec7dc82a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,13 +37,13 @@ jobs: CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_MPFR: yes INTEGER_CLASS: gmpxx WITH_NUMPY: no @@ -51,14 +51,14 @@ jobs: CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_MPC: yes OS: ubuntu-20.04 CC: gcc - BUILD_TYPE: Release WITH_MPFR: yes - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' OS: ubuntu-20.04 CC: gcc @@ -84,14 +84,14 @@ jobs: # CC: gcc - BUILD_TYPE: Debug - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_BFD: yes BUILD_SHARED_LIBS: yes OS: ubuntu-20.04 CC: clang - BUILD_TYPE: Release - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_NUMPY: yes OS: ubuntu-20.04 CC: clang @@ -108,7 +108,7 @@ jobs: EXTRA_APT_PACKAGES: 'llvm-14' - BUILD_TYPE: Debug - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_SCIPY: yes WITH_LLVM: 5.0 OS: macos-13 @@ -121,13 +121,13 @@ jobs: CC: clang - BUILD_TYPE: Debug - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' WITH_NUMPY: no OS: macos-13 CC: gcc - BUILD_TYPE: Release - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.13' OS: macos-13 CC: gcc diff --git a/appveyor.yml b/appveyor.yml index f21df0ae..1f02ccd7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ environment: - BUILD_TYPE: "Release" COMPILER: MSVC15 PLATFORM: "x64" - PYTHON_VERSION: 38-x64 + PYTHON_VERSION: 312-x64 CONDA_INSTALL_LOCN: C:\\Miniconda38-x64 - BUILD_TYPE: "Release" COMPILER: MSVC15 diff --git a/setup.py b/setup.py index 035471db..f76c5a0d 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ import platform # Make sure the system has the right Python version. -if sys.version_info[:2] < (3, 8): - print("SymEngine requires Python 3.8 or newer. " +if sys.version_info[:2] < (3, 9): + print("SymEngine requires Python 3.9 or newer. " "Python %d.%d detected" % sys.version_info[:2]) sys.exit(-1) @@ -230,7 +230,7 @@ def finalize_options(self): author_email="symengine@googlegroups.com", license="MIT", url="https://github.com/symengine/symengine.py", - python_requires='>=3.8,<4', + python_requires='>=3.9,<4', zip_safe=False, packages=['symengine', 'symengine.lib', 'symengine.tests'], cmdclass = cmdclass, @@ -241,10 +241,10 @@ def finalize_options(self): 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Mathematics', 'Topic :: Scientific/Engineering :: Physics', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', ] ) diff --git a/symengine/lib/symengine_wrapper.in.pyx b/symengine/lib/symengine_wrapper.in.pyx index 26c31ad8..6fe0ffa5 100644 --- a/symengine/lib/symengine_wrapper.in.pyx +++ b/symengine/lib/symengine_wrapper.in.pyx @@ -1213,9 +1213,6 @@ cdef class Basic(object): def __int__(self): return int(float(self)) - def __long__(self): - return int(float(self)) - def __complex__(self): f = self.n(real=False) if not isinstance(f, (ComplexDouble, RealDouble)): @@ -1523,9 +1520,6 @@ cdef class BooleanTrue(BooleanAtom): def _sage_(self): return True - def __nonzero__(self): - return True - def __bool__(self): return True From ff2150db3aefd458b851387eedfa56a80c11d572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ingvar=20Dahlgren?= Date: Tue, 18 Feb 2025 10:34:46 +0100 Subject: [PATCH 2/2] Try to add pyproject.toml to please CI --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..24af46ba --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[build-system] +requires = [ + "setuptools<=72.1.0", # <=72.1.0, see https://github.com/pypa/setuptools/issues/4748 + "wheel", + "numpy", + "cython", +]