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
Upgrade networkx to 2.2, add self tests, and update random seed format #26326
Comments
This comment has been minimized.
This comment has been minimized.
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
There are issues with random graphs provided by networkx:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:8
Erik, there is an issue about the nature of random seeds provided by |
comment:9
I see; the relevant code in networkx is here: https://github.com/networkx/networkx/blob/3466b800ef241cdfe76bae875fac50ac1ab54e02/networkx/utils/misc.py#L373 What I don't quite understand is why you changed this to I could offer a workaround, but first I want to make sure it's really necessary to make this change in Sage, because it doesn't seem like it should be necessary. The release notes you linked to are unclear about what they thing the best practice should be. |
comment:10
Replying to @embray:
The problem is that
However it likes instances of Maybe should i use I guess that they do not support long because they are going to support Python 3 only.
|
comment:13
So what's the status of this ticket now? Does this need review again or do you still want to change something here embray? |
comment:14
With this patch I'm getting lots of test suite errors on Arch: ValueError: <sage.cpython._py2_random.Random object at 0x561e012e8f50> cannot be used to generate a random.Random instance Running the test code directly in Sage works fine. Using c_random() instead of python_random() makes the tests pass. |
comment:15
Replying to @antonio-rojas:
Actually no, there are still some (fewer) failures
Again, running the code inside a Sage session works fine |
comment:16
I'm getting the same errors as Antonio on nix. |
comment:17
That doesn't really make sense given that the Python 3 int type is the Python 2 long type. Probably more likely it needs to be modulo |
comment:19
I would have preferred to rely on |
comment:20
I'm still getting:
|
comment:32
lets give it a try |
comment:33
on python3:
EDIT: sys.maxsize is the correct replacement, I think https://stackoverflow.com/questions/13795758/what-is-sys-maxint-in-python-3 |
comment:34
that's right, sys.maxsize works for py3 and py2. Who's going to update this? |
New commits:
|
Changed author from Thierry Monteil to Thierry Monteil, Dima Pasechnik |
Changed branch from u/tmonteil/upgrade_networkx_to_2_2_and_add_self_tests to u/dimpase/packages/networkx22 |
Changed reviewer from Volker Braun to Volker Braun, Dima Pasechnik |
comment:36
tests pass on py2. On py3 there are 6 different formatting/ordering-induced test failures in |
Changed branch from u/dimpase/packages/networkx22 to |
comment:38
This breaks building with |
Changed commit from |
SageMath version 8.6, Release Date: 2019-01-15 * tag '8.6': (15673 commits) Updated SageMath version to 8.6 Updated SageMath version to 8.6.rc1 maxint -> maxsize, for py2/3 compatibility sagemath#26326 : 32-bit vs 64-bit doctests sagemath#26326 : reorder creation of random graphs to avoid creating an empty one by bad luck on 32-bit systems. Updated SageMath version to 8.6.rc0 trac sagemath#26994: fix doctest in sql_db trivial cleanup force a UTF-8 locale on GAP in these tests allow setting additional environment variables when starting a Gap interface instance p_group_cohomology: Avoid conflict with a new global variable name in Gap Updated SageMath version to 8.6.beta1 25501: adding missing optional tags Fix tox testsuite for sage_bootstrap trac 26980 fix script for python3 trac 26978 remove module finite_class from doc a little firework of typos remove FiniteCombinatorialClass after sagemath#13552 remove some deprecated thing in combinat/partition remove deprecated things in combinat/integer_vector ...
Note that self tests require
nose
which is optional only.Also, the random seeds are not passed as integers, but as
random.Random
instances, see https://networkx.github.io/documentation/stable/release/release_2.2.html#improvementsZipball: https://files.pythonhosted.org/packages/f3/f4/7e20ef40b118478191cec0b58c3192f822cace858c19505c7670961b76b2/networkx-2.2.zip
CC: @embray @kiwifb @timokau
Component: packages: standard
Author: Thierry Monteil, Dima Pasechnik
Branch:
8d125d0
Reviewer: Volker Braun, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/26326
The text was updated successfully, but these errors were encountered: