tueda / donuts-python Goto Github PK
View Code? Open in Web Editor NEWPython binding to Donuts: ๐ฉ ร ๐
License: MIT License
Python binding to Donuts: ๐ฉ ร ๐
License: MIT License
Python 3.11.0 has been released.
Issues at first look (CI failures):
In complicated systems, it is often the case that fixing your bug causes a new bug for others. The latest CPython bugfix releases have introduced a breaking change in conversions between large integers and strings. So far, no alternate API has been provided except for changing global settings (which is not appropriate for libraries).
There are at least 3 places in this library affected by this change.
Line 74 in 5791d9c
python -c 'import donuts; donuts.Polynomial(10**4300)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/poly.py", line 74, in __init__
self._raw = _RawPolynomial(str(value))
ValueError: Exceeds the limit (4300) for integer string conversion
Line 266 in 5791d9c
python -c 'import donuts; (donuts.Polynomial(10)**4300).as_integer'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/poly.py", line 266, in as_integer
return int(str(self))
ValueError: Exceeds the limit (4300) for integer string conversion: value has 4301 digits
Line 64 in 5791d9c
python -c 'import donuts; donuts.RationalFunction(10**4300)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/rat.py", line 64, in __init__
self._raw = _RawRationalFunction(str(numerator))
ValueError: Exceeds the limit (4300) for integer string conversion
Currently, the package info is both in setup.py
and pyproject.toml
. Remove setup.py
when universal wheels with build scripts in Poetry becomes available. See:
We can also replace README.rst
with README.md
.
As far as I can see, upgrading donuts
to 0.0.5 (which uses Gradle 8.5) must do the job, but the CI somehow failed: https://github.com/tueda/donuts-python/actions/runs/7355273433.
* What went wrong:
Execution failed for task ':donuts-python:compileJava'.
> java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'
The error looks like the already-fixed Lombok bug:
but donuts
0.0.5 uses Lombok 1.18.30, so it must not occur...
Locally it seems to work (except lint
due to csachs/pyproject-flake8#30), but the CI failed: https://github.com/tueda/donuts-python/actions/runs/7347713849.
py312: commands[0]> pytest --benchmark-disable
ImportError while loading conftest '/home/runner/work/donuts-python/donuts-python/tests/conftest.py'.
tests/conftest.py:8: in <module>
from donuts import Polynomial, RationalFunction
.tox/py312/lib/python3.12/site-packages/donuts/__init__.py:5: in <module>
from .poly import Polynomial, gcd, lcm, product
.tox/py312/lib/python3.12/site-packages/donuts/poly.py:20: in <module>
from .array import _create_raw_int_array, _create_raw_poly_array, _create_raw_var_array
.tox/py312/lib/python3.12/site-packages/donuts/array.py:7: in <module>
from .jvm import jvm
.tox/py312/lib/python3.12/site-packages/donuts/jvm.py:6: in <module>
import pkg_resources
E ModuleNotFoundError: No module named 'pkg_resources'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.