Opened 14 years ago

Closed 13 years ago

#6186 closed defect (fixed)

two probably-easy-to-fix scope bugs

Reported by: was Owned by: cwitty
Priority: major Milestone: sage-4.5.2
Component: misc Keywords:
Cc: roed Merged in: sage-4.5.2.alpha1
Authors: Craig Citro Reviewers: Carl Witty
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue


sage: version()
'Sage Version 4.0, Release Date: 2009-05-29'

sage: G =  Algebras(CC); G.category()
NameError                                 Traceback (most recent call

/Users/jeromelefebvre/.sage/temp/Jerome.local/57209/ in <module>()

category.pyc in category(self)
   173     def category(self):
--> 174         return Objects()
   176 def is_Category(x):

NameError: global name 'Objects' is not defined

An other;

sage: k = Qp(13);f.<a> = k.extension(x^2+1)
NameError                                 Traceback (most recent call

/Users/jeromelefebvre/.sage/temp/Jerome.local/57209/ in <module>()

padic_generic.pyc in extension(self, modulus, prec, names, print_mode,
halt, **kwds)
   463                     else:
   464                         print_mode[option] = self._printer.dict
--> 465         return ExtensionFactory(base=self, premodulus=modulus,
prec=prec, halt=halt, names=names, check = True, **print_mode)
   467 def local_print_mode(obj, print_options, pos = None, ram_name
= None):

/Applications/sage/local/lib/python2.5/site-packages/sage/structure/ in sage.structure.factory.UniqueFactory.__call__ (sage/

factory.pyc in create_key_and_extra_args(self, base, premodulus, prec,
print_mode, halt, names, var_name, res_name, unram_name, ram_name,
print_pos, print_sep, print_alphabet, print_max_ram_terms,
print_max_unram_terms, print_max_terse_terms, check, unram)
  2261             key = (polytype, base, premodulus, modulus, names,
prec, halt, print_mode, print_pos, print_sep, tuple(print_alphabet),
print_max_ram_terms, print_max_unram_terms, print_max_terse_terms)
  2262         else:
-> 2263             upoly, epoly, prec = split(modulus, prec)
  2264             key = (polytype, base, premodulus, upoly, epoly,
names, prec, halt, print_mode, print_pos, print_sep, tuple
(print_alphabet), print_max_ram_terms, print_max_unram_terms,
  2265         return key, {'shift_seed': shift_seed}

NameError: global name 'split' is not defined

Attachments (1)

trac-6186.patch (2.5 KB) - added by craigcitro 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 14 years ago by nthiery

The first one is readily fixed by the category patches #5891. Please don't fix it separately so as not to create a conflict!

comment:2 Changed 14 years ago by was

Please don't fix it separately so as not to create a conflict!

I really hope categories gets in ASAP. Last time you told me not to fix something because it would conflict with that patch, was almost two months ago (I'm glad I didn't listen). This time I will listen though...


comment:3 Changed 13 years ago by craigcitro

Authors: Craig Citro
Cc: roed added
Report Upstream: N/A
Status: newneeds_review

I'm attaching a fix for the second error above -- the split function was in the file, but commented out. I confirmed with David Roe that it should, indeed, be uncommented still (because we still don't have an implementation of Round4 in Sage).

Amusingly, this was debugged during our Math 480 class -- successfully, though saying "oh, it's going to raise a different error" was probably a little unsatisfying.

The other error in the description is indeed fixed.

Changed 13 years ago by craigcitro

Attachment: trac-6186.patch added

comment:4 Changed 13 years ago by cwitty

Reviewers: Carl Witty
Status: needs_reviewpositive_review

Positive review. Patch applies, doctests pass.

Note that this ticket has two separate bug reports; the first bug was already fixed (presumably, as nthiery promised, by the category patches). trac-6186.patch fixes the second.

comment:5 Changed 13 years ago by ddrake

Merged in: sage-4.5.2.alpha1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.