Opened 10 years ago

Last modified 4 weeks ago

#12419 needs_work defect

factorization of 0 in GF(p)[x,y] fails

Reported by: zimmerma Owned by: tbd
Priority: minor Milestone: sage-9.5
Component: factorization Keywords:
Cc: Merged in:
Authors: Paul Zimmermann Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: u/zimmerma/12419 (Commits, GitHub, GitLab) Commit: 1733915f770a73937280c86aecf5e76c544a785b
Dependencies: Stopgaps:

Status badges

Description

This was reported by Charles Bouillaguet.

sage: R.<x,y> = GF(2)[] 
sage: R(1).factor()    
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...

AttributeError: 'sage.rings.finite_rings.integer_mod.IntegerMod_int' object has no attribute 'factor'

Paul Zimmermann

Change History (21)

comment:1 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 6 weeks ago by chapoton

works now (sage 9.5.b0):

sage: R.<x,y> = GF(2)[]  
sage: R(1).factor()                                                       
1

comment:6 Changed 6 weeks ago by zimmerma

  • Status changed from new to needs_review

it works already in Sage 9.1. I propose to resolve as "fixed".

comment:7 Changed 6 weeks ago by chapoton

somebody(?) should add a doctest, no ?

comment:8 Changed 6 weeks ago by zimmerma

I can do it, but it's a long time I didn't contribute to Sage. Is there a howto somewhere?

comment:9 Changed 6 weeks ago by chapoton

humm, if you know git, this is simple. Otherwise, c'est moins simple.

there is the big developer manual, and in particular

https://doc.sagemath.org/html/en/developer/index.html#git-tricks-tips

in very short :

(1) clone the git repo and go to the develop branch

(2) set the remote to trac

(3) make a local branch on top of the develop branch

(4) push the branch to trac under u/your_trac_name/branch_name

(5) write that branch name in the ticket branch field

Last edited 6 weeks ago by chapoton (previous) (diff)

comment:10 Changed 5 weeks ago by zimmerma

thanks, I've added a doctest, now running sage -t -all

comment:11 Changed 5 weeks ago by chapoton

si la branche est prete, le patchbot peut se charger de lancer les tests.

comment:12 Changed 5 weeks ago by zimmerma

I get the following error while running the tests:

zimmerma@tomate:/tmp/sage$ ./sage -t -p 4 -all
...
Killing test src/sage/rings/valuation/augmented_valuation.py
Killing test src/sage/combinat/rigged_configurations/rc_infinity.py
Killing test src/sage/symbolic/integration/external.py
Killing test src/sage/coding/databases.py
----------------------------------------------------------------------
sage -t --long --warn-long 56.2 --random-seed=0 src/sage/functions/piecewise.py  # UnicodeEncodeError in doctesting framework
Doctests interrupted: 666/4346 files tested
----------------------------------------------------------------------
Total time for all tests: 2466.7 seconds
    cpu time: 6988.6 seconds
    cumulative wall time: 9651.5 seconds
Traceback (most recent call last):
  File "/tmp/sage/src/bin/sage-runtests", line 144, in <module>
    err = DC.run()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/control.py", line 1207, in run
    self.run_doctests()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/control.py", line 909, in run_doctests
    self.dispatcher.dispatch()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 2044, in dispatch
    self.parallel_dispatch()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 1965, in parallel_dispatch
    w.read_messages()
  File "/tmp/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 2255, in read_messages
    self.messages += bytes_to_str(s)
  File "sage/cpython/string.pxd", line 28, in sage.cpython.string.bytes_to_str (build/cythonized/sage/cpython/string.c:1588)
  File "sage/cpython/string.pxd", line 51, in sage.cpython.string.bytes_to_str (build/cythonized/sage/cpython/string.c:1466)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 1627: invalid start byte

comment:13 Changed 5 weeks ago by chapoton

merci de pousser la branche sur trac, et d'écrire son nom dans le champ "branch" ci-dessus. On fera faire les tests par un patchbot.

comment:14 Changed 5 weeks ago by zimmerma

it seems I don't have the right to push to trac (or I did the wrong command):

zimmerma@tomate:/tmp/sage$ git remote -v
origin  https://github.com/sagemath/sage.git (fetch)
origin  https://github.com/sagemath/sage.git (push)
trac    git@trac.sagemath.org:sage.git (fetch)
trac    git@trac.sagemath.org:sage.git (push)

zimmerma@tomate:/tmp/sage$ git push --set-upstream trac trac-12419
X11 forwarding request failed on channel 0
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 629 bytes | 629.00 KiB/s, done.
Total 7 (delta 6), reused 0 (delta 0), pack-reused 0
remote: FATAL: W refs/heads/trac-12419 sage zimmerma DENIED by fallthru
remote: error: hook declined to update refs/heads/trac-12419
To trac.sagemath.org:sage.git
 ! [remote rejected]       trac-12419 -> trac-12419 (hook declined)
error: failed to push some refs to 'trac.sagemath.org:sage.git'

comment:15 Changed 5 weeks ago by chapoton

my remote says

~/sage$ git remote -v
trac	ssh://git@trac.sagemath.org:22/sage.git (fetch)
trac	ssh://git@trac.sagemath.org:22/sage.git (push)

Tro to use simply

git push trac HEAD:u/zimmerma/12419

EDIT: should use zimmerma, your user name here

Last edited 5 weeks ago by chapoton (previous) (diff)

comment:16 Changed 5 weeks ago by chapoton

  • Milestone changed from sage-6.4 to sage-9.5

comment:17 Changed 5 weeks ago by zimmerma

  • Milestone changed from sage-9.5 to sage-6.4

thanks, it works! The branch is called u/zimmerma/12419.

For the record, what I did:

git clone ssh://git@trac.sagemath.org:22/sage.git
cd sage
git remote add trac ssh://git@trac.sagemath.org:22/sage.git -t master
git remote set-url --push trac ssh://git@trac.sagemath.org:22/sage.git
<edit files>
git commit -a
git push trac HEAD:u/zimmerma/12419

comment:18 Changed 5 weeks ago by chapoton

  • Authors set to Paul Zimmermann
  • Branch set to u/zimmerma/12419
  • Commit set to 1733915f770a73937280c86aecf5e76c544a785b
  • Milestone changed from sage-6.4 to sage-9.5

I have put the branch name in place


New commits:

1733915added doctect for trac #12419

comment:19 Changed 5 weeks ago by chapoton

branch looks good. A patchbot should come, if not I will launch mine when it becomes available.

comment:20 Changed 5 weeks ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

ok, green bot

comment:21 Changed 4 weeks ago by vbraun

  • Status changed from positive_review to needs_work

Merge conflict

Note: See TracTickets for help on using tickets.