-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump version to 0.5.0 #84
Conversation
Potentially we want to fix #74 before updating the version, but I don't have a good idea how to fix this myself. |
README.md
Outdated
- gh-63: The `roots` method of `arb_poly`, and `nmod_poly` is no longer supported. Use `acb_roots(p).roots()` to get the old behaviour of returning the roots as `acb`. Note that the `roots` method of `fmpz_poly` and `fmpq_poly` currently returns the complex roots of the polynomial. | ||
- gh-72: The roots method of `arb_poly` is not supported. Use either the `complex_roots` method or `acb_roots(p).roots()` to get the old behaviour of returning the complex roots. The `roots` method on `fmpz_poly` and `fmpq_poly` now return integer and rational roots respectively. To access complex roots on these types, use the `complex_roots` method. For `acb_poly`, both `roots` and `complex_roots` behave the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add notes for other PRs here.
- Add fmpz mod #83
- Bump to Flint version 3 #80
- Minor fixes for nmod #78 fix(nmod): ZeroDivisionError instead of coredump #79
Big refactor across several versions:
- Mod experiment #75 Parserst #77 Refactor functions into submodule #67 Introduce submodules into python-flint #61
For 0.4.4 there should be
- Include files in sdist and bump version to 0.4.4 #71 (adds Cython files again in sdist
For 0.4.3
- Bump version to 0.4.3 #69 (adds OSX arm64 wheels)
We should get better at adding release notes here. It is important for people to see these so that they can see that development is happening. Also I think that each note should list the names of the authors. It is informative for anyone who wants to understand the project to see that there are multiple people working on things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#63 was for 0.4.3 not 0.5.0
For 0.4.2
- Fix typo #57 (Adds manylinux wheels)
For 0.4.1
- Add tests for installing on Linux #48 Removes Linux wheels, updates instructions for building from source.
For 0.4.0
- Bump version to 0.4.0 #45 Adds wheels for Windows, OSX and manylinux but the Linux wheels are broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 0.4.3 #74 should be noted.
The Windows tests failed:
That is because of #80. Note that my original PR for #80 noted this: #43 (comment) although somehow the tests passed. It is good that we spotted this before release: we can't use flint 3-alpha1 because of the Windows Flint bug that was fixed in flintlib/flint#1416 |
So we either revert #80 or wait for a new (pre-)release of Flint 3 before making a new release of python-flint. |
Do we have a timeline on the next pre-release? I guess that determines the best thing to do. I will find time today to address the comments above and do a more detailed change log for all these PR. For "authors" how would you like to do it? I'm happy with whatever |
I don't know really. Maybe just linking to the PRs is fine. |
For progress, I want to try and do fmpz_mod_poly, maybe if I finish this and the 3.0 bug remains we can revert #80 and if it's fixed by then it's all OK? I doubt the small addition for fmpz_mod will really help anyone right now. |
We can consider reverting #80 at some point if it takes a while for a new release of Flint. for now I don't think it is urgent. Especially if we expect that many new features might be added in a relatively short time there is no rush to get a release out for each one. |
Rerun CI after gh-94 was merged |
Some new Windows problem:
Further investigation needed... |
Twice now this pull request has picked up Windows problems that do not seem to show up elsewhere in CI. The changes here should not affect anything significant so I don't understand why that happens. |
Is it always the discrete log tests which crash? The only thought is there’s a bug either in Flint3 which means windows can’t do something in this instance or there’s a memory issue in the python-flint which is causing issues. It’s mysterious…
I’ll have some time next week I hope to look into it.
|
I can reproduce the problem on Windows locally with master so it is not this PR that causes the problem but there is a bug that causes a crash on Windows. It is always the discrete log test that crashes and specifically it crashes here: python-flint/src/flint/test/test.py Lines 1831 to 1837 in e6c0078
The crash happens in x = g.discrete_log(a) for the 1st iteration of the inner loop on the 2nd or 3rd iteration of the outer loop.
I think that this is most likely a memory bug in python-flint. The memory management for python-flint/src/flint/types/fmpz_mod.pxd Lines 8 to 19 in e6c0078
I think this is something to do with either L or x_g which will be initialised on a 1st call to g.discrete_log(a) for a given g .
|
Here when an fmpz_mod is created x_g is set to NULL and when it is deallocated a test python-flint/src/flint/types/fmpz_mod.pyx Lines 236 to 244 in e6c0078
I think firstly that the test should be if self.x_g is NULL although it is not clear if that is the problem.
A call to discrete_log will initialise this: python-flint/src/flint/types/fmpz_mod.pyx Lines 360 to 376 in e6c0078
Again I think is NULL should be tested.
We also have: python-flint/src/flint/types/fmpz_mod.pyx Lines 140 to 151 in e6c0078
I think firstly that it would be better to avoid the use of malloc/free wherever possible in favour of using CPython-style memory management. |
This all seems to be working with flint 3.0.0-rc1 now after gh-95. I've tested locally on Windows that everything seems to be working. |
Rerun after #98 with Flint 3.0.0 final. |
All tests have passed. Previously this PR strangely seemed to flag up errors but I don't see any now. I think that |
I went to do this just now, but looks like you beat me to it! |
It is expected that the build from PyPI job will fail because it is trying to build in an environment that has Flint 3 and does not have Arb (as a separate library). Until the PyPI sdist is updated that job should fail with the changes here. Previously it was passing because it was installing the binary wheel but I have just added |
Okay I think this is ready for a 0.5.0 release. |
Yeah I agree. |
Okay, let's do it! |
@fredrik-johansson the docs for python-flint have not been updated sine 0.3.0 (5 years ago). As of 0.5.0 there are some significant new sections in the docs for Ideally docs updates would be handled automatically in CI along with pushing to PyPI but for now at least I am pushing manually to PyPI. The docs are hosted on your website fredrikj.net though so I don't know if you would prefer to push the updates there yourself manually. Alternatively we could designate a repo somewhere for hosting the built docs that could be pulled automatically by fredrikj.net or something. |
Maybe host the docs on readthedocs or somesuch? We could do something automatic on my server but I'm not too eager to set that up right now. |
I'll have a look at setting up read the docs. I have finally managed to upload the release files to PyPI: https://pypi.org/project/python-flint/#files It took 3 hours with a lot restarting twine to get those files up there. Maybe there is a better way to do the uploading. I need to go do other things now but I'll put out announcements later. |
Version bump to show new type added. Removed a TODO from the README and another message in the change log to discuss the integer roots from #72