Opened 11 years ago

Last modified 5 weeks ago

#12064 needs_work enhancement

Update residue fields to use dynamic classes

Reported by: roed Owned by: davidloeffler
Priority: major Milestone:
Component: number fields Keywords: residue fields, dynamic classes
Cc: Merged in:
Authors: David Roe Reviewers: Simon Spicer
Report Upstream: N/A Work issues:
Branch: u/saraedum/old_12064 (Commits, GitHub, GitLab) Commit: 3545bf42c0106f25e7acafd35d54a8235f3182ef
Dependencies: #12062 Stopgaps:

Status badges

Description

Changes sage.rings.residue_fields to use sage.structure.dynamic_class to make it easier to implement p-adic residue fields.

Attachments (2)

12064.patch (36.9 KB) - added by roed 10 years ago.
trac_12064_review.patch (52.5 KB) - added by saraedum 10 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 11 years ago by roed

Status: newneeds_review

comment:2 Changed 11 years ago by spice

Status: needs_reviewneeds_work

Is there another dependency? Patch fails to apply cleanly on a fresh copy of 4.8 on top of 12062:

mlungu@sage:~/sage-4.8/devel/sage$ hg qpush
applying 12062.patch
now at: 12062.patch
mlungu@sage:~/sage-4.8/devel/sage$ hg qpush
applying 12064.patch
patching file sage/rings/residue_field.pyx
Hunk #9 succeeded at 553 with fuzz 2 (offset -28 lines).
Hunk #12 FAILED at 743
1 out of 14 hunks FAILED -- saving rejects to file sage/rings/residue_field.pyx.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh 12064.patch

comment:3 Changed 11 years ago by spice

Reviewers: spice

comment:4 Changed 11 years ago by roed

Status: needs_workneeds_review

Updated against 5.0.beta1

comment:5 Changed 11 years ago by spice

Status: needs_reviewneeds_work

Looks like there's new trouble when trying to apply 12064 on top of 12062. 12062 has already been applied and Sage built in the output below:

sage@sagebox:~/sage/devel/sage$ hg qpush
applying 12064.patch
patching file sage/rings/finite_rings/finite_field_base.pyx
Hunk #1 succeeded at 90 with fuzz 2 (offset -2 lines).
patching file sage/rings/residue_field.pyx
Hunk #3 succeeded at 139 with fuzz 2 (offset 0 lines).
Hunk #8 succeeded at 435 with fuzz 2 (offset 0 lines).
now at: 12064.patch
sage@sagebox:~/sage/devel/sage$ sage -b

----------------------------------------------------------
sage: Building and installing modified Sage library files.


Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Building modified file sage/rings/residue_field.pyx.
Building modified file sage/rings/finite_rings/finite_field_base.pyx.
Executing 2 commands (using 1 thread)
python `which cython`  --old-style-globals --disable-function-redefinition --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I/Users/sage/sage-4.8/devel/sage-dev1 -o sage/rings/residue_field.c sage/rings/residue_field.pyx

Error compiling Cython file:
------------------------------------------------------------
...
            K = pring.fraction_field()
            intp = pring.base_ring().order()
            f = p.gen()
            deg = f.degree()
            q = intp**deg
            if k == 1 and intp.is_prime() and (impl is None or impl == 'modn'):
                ^
------------------------------------------------------------

sage/rings/residue_field.pyx:313:17: local variable 'k' referenced before assignment
python `which cython`  --old-style-globals --disable-function-redefinition --embed-positions --directive cdivision=True,autotestdict=False,fast_getattr=True -I/Users/sage/sage-4.8/devel/sage-dev1 -o sage/rings/finite_rings/finite_field_base.c sage/rings/finite_rings/finite_field_base.pyx
Error running command, failed with status 256.
sage: There was an error installing modified sage library code.

comment:6 Changed 11 years ago by kcrisman

Reviewers: spiceSimon Spicer

comment:7 Changed 10 years ago by roed

Status: needs_workneeds_review

Fixed. Sorry for the long delay.

Changed 10 years ago by roed

Attachment: 12064.patch added

Changed 10 years ago by saraedum

Attachment: trac_12064_review.patch added

comment:8 Changed 9 years ago by jdemeyer

Milestone: sage-5.11sage-5.12

comment:9 Changed 9 years ago by vbraun_spam

Milestone: sage-6.1sage-6.2

comment:10 Changed 9 years ago by vbraun_spam

Milestone: sage-6.2sage-6.3

comment:11 Changed 8 years ago by vbraun_spam

Milestone: sage-6.3sage-6.4

comment:12 Changed 8 years ago by jdemeyer

Status: needs_reviewneeds_work

comment:13 Changed 6 years ago by saraedum

Branch: u/saraedum/old_12064

comment:14 Changed 6 years ago by git

Commit: 6ec180c6186219d2c86de4fd05ad476c1fe4445c

Branch pushed to git repo; I updated commit sha1. New commits:

6ec180cMerge branch 'develop' into t/12064/old_12064

comment:15 Changed 6 years ago by git

Commit: 6ec180c6186219d2c86de4fd05ad476c1fe4445c7bb1bf360124703b999fddf934bd7e88193a6b97

Branch pushed to git repo; I updated commit sha1. New commits:

7bb1bf3Fix build errors

comment:16 Changed 6 years ago by git

Commit: 7bb1bf360124703b999fddf934bd7e88193a6b9755203628a7406f7d6ae6ec4dc0be5e8a971b0813

Branch pushed to git repo; I updated commit sha1. New commits:

5520362Normalize interface for finite field construction

comment:17 Changed 6 years ago by git

Commit: 55203628a7406f7d6ae6ec4dc0be5e8a971b0813ba525c796eeab599ee6a70e4a1e20803ad7f210c

Branch pushed to git repo; I updated commit sha1. New commits:

ba525c7Removed flaky type() tests

comment:18 Changed 6 years ago by saraedum

The residue_field.pyx file is now down to three doctests.


New commits:

ba525c7Removed flaky type() tests

New commits:

ba525c7Removed flaky type() tests

comment:19 Changed 12 months ago by git

Commit: ba525c796eeab599ee6a70e4a1e20803ad7f210c3545bf42c0106f25e7acafd35d54a8235f3182ef

Branch pushed to git repo; I updated commit sha1. New commits:

3545bf4Merge remote-tracking branch 'trac/develop' into HEAD

comment:20 Changed 5 weeks ago by mkoeppe

Milestone: sage-6.4
Note: See TracTickets for help on using tickets.