Opened 9 years ago

Last modified 4 years ago

#12064 needs_work enhancement

Update residue fields to use dynamic classes

Reported by: roed Owned by: davidloeffler
Priority: major Milestone: sage-6.4
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: ba525c796eeab599ee6a70e4a1e20803ad7f210c
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 8 years ago.
trac_12064_review.patch (52.5 KB) - added by saraedum 8 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 9 years ago by roed

  • Status changed from new to needs_review

comment:2 Changed 9 years ago by spice

  • Status changed from needs_review to needs_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 9 years ago by spice

  • Reviewers set to spice

comment:4 Changed 9 years ago by roed

  • Status changed from needs_work to needs_review

Updated against 5.0.beta1

comment:5 Changed 9 years ago by spice

  • Status changed from needs_review to needs_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 9 years ago by kcrisman

  • Reviewers changed from spice to Simon Spicer

comment:7 Changed 8 years ago by roed

  • Status changed from needs_work to needs_review

Fixed. Sorry for the long delay.

Changed 8 years ago by roed

Changed 8 years ago by saraedum

comment:8 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:9 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:10 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:11 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:12 Changed 7 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:13 Changed 4 years ago by saraedum

  • Branch set to u/saraedum/old_12064

comment:14 Changed 4 years ago by git

  • Commit set to 6ec180c6186219d2c86de4fd05ad476c1fe4445c

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

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

comment:15 Changed 4 years ago by git

  • Commit changed from 6ec180c6186219d2c86de4fd05ad476c1fe4445c to 7bb1bf360124703b999fddf934bd7e88193a6b97

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

7bb1bf3Fix build errors

comment:16 Changed 4 years ago by git

  • Commit changed from 7bb1bf360124703b999fddf934bd7e88193a6b97 to 55203628a7406f7d6ae6ec4dc0be5e8a971b0813

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

5520362Normalize interface for finite field construction

comment:17 Changed 4 years ago by git

  • Commit changed from 55203628a7406f7d6ae6ec4dc0be5e8a971b0813 to ba525c796eeab599ee6a70e4a1e20803ad7f210c

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

ba525c7Removed flaky type() tests

comment:18 Changed 4 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
Note: See TracTickets for help on using tickets.