[issue532631] Confusions in formatfloat

2009-02-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: nnorwitz -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: Matthias, can you confirm the test passes now on your side, so I close this issue. Thanks ___ Python tracker ___ ___

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: I'll change add_defaults() so it includes package_data. I don't think though, that MANIFEST.in is an ugly hack. Imho the best practice is an explicit MANIFEST.in (and not use the .svn browsing setuptools do) -- priority: -> high resolution: -> accepted

[issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir

2009-02-13 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-02-13 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: -> normal versions: +Python 3.1 -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue2624] swig support in distutils should use the build and temp dirs

2009-02-13 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5158] Document distutils 'depends' option for extensions

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: Added in r69566, thanks for the contribution ! -- status: open -> closed ___ Python tracker ___ ___ Py

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
New submission from Jiafei Peng : eval() function in List Comprehension doesn't work. please see the under codes: canBusType = 'CANdiag' result = [eval('canBusType') for i in range(3)] NameError: name 'canBusType' is not defined It did work in Python2.5 or 2.6. The expected result is ['CANdiag

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Hagen Fürstenau
Hagen Fürstenau added the comment: I can't reproduce this. For me it works as expected. -- nosy: +hagen ___ Python tracker ___ ___ Pyt

[issue5243] Missing dependency in distutils build

2009-02-13 Thread Patrick Gerken
New submission from Patrick Gerken : When running the command install_lib, the command build_clib is not run. If a package contains clibs they can be dependencies for extension libs, at least that is stated in the module docstring of build_clib. In real life you can see it when trying to run the

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Miller
Mark Miller added the comment: This still occurs in the latest SVN checkout, and is preventing Python from building on ARMV4L and ARMV5L OABI, dying during the test_float.py compilation. The patch appears to solve this problem, however I have not run a full suite of tests to ensure it doesn't ha

[issue5243] Missing dependency in distutils build

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: be careful to write your test in distutils (setuptools is not part of Python) ___ Python tracker ___ ___ Python-

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: I can't reproduce it either, tested with Py3 (on Linux and Windows) and with Py2.[456], it worked fine everywhere. Does your eval() work properly outside listcomps? -- nosy: +ezio.melotti ___ Python tracker

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
Jiafei Peng added the comment: Hallo Mr. Fürstenau, thank you for the quick response. Have you tried it with Python 3.0 The Error report is truely: NameError: name 'canBusType' is not defined Someone else reported the same problem in internet too. Best regards, mit freundlichen Grüßen, Jiaf

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'), eval( 'canBusType')] result3 = [eval('canBusType') for i in range(3)

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Ezio: this happens inside a function, like this: def f(): canBusType = 'CANdiag' result = [eval('canBusType') for i in range(3)] This is expected, and won't easily fix. The reason is that list comprehensions in 3.x use a function namespace "under the ho

[issue5244] Python 3.0 eval() function in List Comprehension doesn't work

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Please don't open duplicates. -- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> eval() function in List Comprehension doesn't work ___ Python tracker

[issue4894] Docs for urllib.request.HTTPRedirectHandler.redirect_request missing "hdrs" paramether

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied in r69570, r69571. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue3734] subclassing complex

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied doc patch in r69573. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-13 Thread David Jones
David Jones added the comment: On 12 Feb 2009, at 09:00, David Jones wrote: > > David Jones added the comment: > > The following program does a very basic do-i-get-back-what-i-wrote > test. > sunau can't cope; I am investigating. I see. sunau uses mu-law compression by default which makes

[issue3613] base64.encodestring does not actually accept strings

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied the patch in r69575. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5244] Python 3.0 eval() function in List Comprehension doesn't work

2009-02-13 Thread Jiafei Peng
New submission from Jiafei Peng : Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'), eval( 'canBusType')] result3 = [e

[issue1537445] urllib2 httplib _read_chunked timeout

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: I agree. -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-b

[issue1661108] base64.urlsafe_b64encode() shouldn't use the = character

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Added a short note in r69576. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue3694] Undetected error in _struct.pack_into

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Applied in r69577, r69578. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs

2009-02-13 Thread Georg Brandl
Georg Brandl added the comment: Why is that ambiguous? Can you come up with a better short form? ___ Python tracker ___ ___ Python-bugs-list ma

[issue5208] urllib2.build_opener(

2009-02-13 Thread Senthil
Senthil added the comment: And that is how it is at all others places too. Optionals are placed inside []. -- nosy: +orsenthil title: urllib2.build_opener([handler, ...]) incorrect signature in docs -> urllib2.build_opener( ___ Python tracker

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for the general idea from me too, assuming that all the details can be worked out in a sane manner. Is it worth opening a discussion about this on comp.lang.python? -- nosy: +marketdickinson ___ Python tracker <

[issue3694] Undetected error in _struct.pack_into

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: > BTW, there's a warning in _struct.c:180 -> warning: ‘get_ulong’ > defined but not used, should I open a new issue? Sure. Please could you add me to the nosy list if you do. In my opinion, the struct module *really* needs an overhaul, especially for py3k; th

[issue5245] PyRun_SimpleStringFlags() documentation

2009-02-13 Thread Rogi
New submission from Rogi : From teh docs: http://docs.python.org/c-api/veryhigh.html int PyRun_SimpleStringFlags(const char *command, PyCompilerFlags *flags)¶ Executes the Python source code from command in the __main__ module according to the flags argument. If __main__ does not already exi

[issue5214] Add KOI8-RU as a known encoding

2009-02-13 Thread Dwayne Bailey
Dwayne Bailey added the comment: @haypo: The encoding works and doesn't throw and error, my guess is that aliases should be updated to cover the variant namings of -R and -U. I also found glibc points to this reference http://cad.ntu-kpi.kiev.ua/multiling/koi8-ru/ which seems to have disappeare

[issue3992] removed custom log from distutils

2009-02-13 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue3985] removed string module from distutils [patch]

2009-02-13 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5227] Py_Main() does not return on sys.exit()

2009-02-13 Thread Rogi
Changes by Rogi : -- assignee: -> georg.brandl components: +Documentation -None nosy: +georg.brandl ___ Python tracker ___ ___ Python-

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: I'll take a look at this, provided Tim doesn't mind me stealing his issue. (Please steal it back if so.) Mark, could you please post the output from test_float? -- assignee: tim_one -> marketdickinson nosy: +marketdickinson __

[issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir

2009-02-13 Thread Matthias Klose
Matthias Klose added the comment: no, still seen on the branches. I'll have a look at backporting these changes to the 2.6 branch before 2.6.2. -- versions: -Python 2.7, Python 3.1 ___ Python tracker _

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12978/time_object_hash.py ___ Python tracker ___ ___ Python-bugs-list mail

[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: By quick observation, I found this problem goes away if following change is applied. Index: Lib/_strptime.py === --- Lib/_strptime.py(revision 69496) +++ Lib/_strptime.py(working copy) @

[issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: can you tell where xxmodule.c is in your installation ? (in 'builddir' ?) ___ Python tracker ___ ___ Python-bug

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Tim Gordon
Tim Gordon added the comment: If you know what variable you are going to be eval-ing, or at least, have a list of those that might be eval-ed, you can get around this issue by making sure they are explicitly referenced in the inner scope (i.e., in the list comprehension). For example, even t

[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: I think you have found the problem, strptime probably uses \s with the re.ASCII flag and fails to match all the Unicode whitespaces: >>> l ['\x1c', '\x1d', '\x1e', '\x1f', '%', '\x85', '\xa0', '\u1680', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Eric Smith
Eric Smith added the comment: The attached file is a mostly working version that inherits from string.Formatter. It has the following shortcomings, which would all be addressed if we go forward: - Doesn't handle escaping '{' or '}' - Doesn't handle conversion specifiers, like '!s' These are al

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: > Apart from the misindentation Apologies. My fault for editing Python files while at work, with a substandard editor configuration... > have you run the benchmark script with it? I have now. See attached file for 3 sets of results (original, xor version,

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file13069/pointer_hash5_xor.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file13070/pointer_hash5_rotate.patch ___ Python tracker ___ ___ Python-bugs-list

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file13054/pointer_hash5.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Miller
Mark Miller added the comment: The following is where it fails un-patched: Compiling /usr/local/lib/python2.6/test/test_float.py ... Traceback (most recent call last): File "/usr/local/lib/python2.6/compileall.py", line 156, in exit_status = int(not main()) File "/usr/local/lib/python2

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, so the rotate version is really significantly faster (and, as Adam pointed out, it's also theoretically better). ___ Python tracker ___ _

[issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3)

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: OK, I'll close this entry as duplicated. -- resolution: -> duplicate status: open -> closed superseder: -> time.strptime("2009", "%Y") raises a value error ___ Python tracker

[issue5246] test.test_hashlib.HashLibTestCase fails on darwin

2009-02-13 Thread Tarek Ziadé
New submission from Tarek Ziadé : The check_no_unicode('md5') fails under darwin (in the trunk) (Pdb) hashlib.md5(u'spam') <--- suppose to raise a TypeError here (Pdb) hashlib.md5('spam') traceback : == FAIL: test_no

[issue5242] eval() function in List Comprehension doesn't work

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: eval() is probably already an hack, there's no need to add another hack to make it work. It's better to just get rid of eval() and find a better way to do what you want to do. ___ Python tracker

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Antoine, please check in a patch of your choice. I think we've beaten this issue to death already. :-) ___ Python tracker ___ __

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

=?utf-8?q?[issue5239]_time.strptime("=EF=BC=92=EF=BC=90=EF=BC=90=EF=BC=99", _"%Y")_raises_a_value_error?=

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This patch comes from issue5240. I think testcase is needed. I'll try if I can. -- dependencies: +re.IGNORECASE not Unicode-ready keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file13071/remove_ascii_flag.patch ___

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- title: time.strptime("2009", "%Y") raises a value error -> Change time.strptime() to make it work with Unicode chars ___ Python tracker ___ _

[issue2834] re.IGNORECASE not Unicode-ready

2009-02-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue5246] test.test_hashlib.HashLibTestCase fails on darwin

2009-02-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ebfe, gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: pointer_hash5_rotate.patch has been committed to trunk and py3k. Thanks! ___ Python tracker ___ ___ Python-bu

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Unfortunately, `'{d}{s}{f}'.format(3, 'foo', 3.14)` can't work as you expect it to, because it already means "display the keyword arguments named `d`, `s` and `f`. (I agree that the syntax for format() strings is exceedingly tedious) On the other hand, `'{:d}{

[issue5247] Unhelpful error message with str.format()

2009-02-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : >>> "{0:f}".format(2.5) '2.50' >>> "{0:f}".format("spam") Traceback (most recent call last): File "", line 1, in ValueError: Unknown conversion type f The error message should mention the type of the argument that doesn't support the given conversion t

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Hmm, this fails on python2 too. Maybe re.ASCII is added for backward compatibility? Again, I'm not familiar with unicode, so I won't call remove_ascii_flag.patch as *fix*. -- nosy: +pitrou ___ Python tracker

[issue5246] test.test_hashlib.HashLibTestCase fails on darwin

2009-02-13 Thread Lukas Lueg
Lukas Lueg added the comment: test_case_md5_0 (__main__.HashLibTestCase) ... ok test_case_md5_1 (__main__.HashLibTestCase) ... ok test_case_md5_2 (__main__.HashLibTestCase) ... ok test_case_md5_huge (__main__.HashLibTestCase) ... ok test_case_md5_uintmax (__main__.HashLibTestCase) ... ok test_ca

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hmm, this fails on python2 too. Maybe re.ASCII is added for backward > compatibility? Again, I'm not familiar with unicode, so I won't call > remove_ascii_flag.patch as *fix*. re.ASCII was added to many stdlib modules because I wanted to minimize the potentia

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread David W. Lambert
David W. Lambert added the comment: Answering first question msg81873. Without colon separator, this might be considered confusing: >>> ( ... '{d}{s}{f}{f}'.format(3, 'foo', 3.14, 2.72), ... '{d}{s}{f}{f}'.format(d=3, s='foo', f=3.14) ... ) ('3foo3.142.72', '3foo3.143.14') ___

[issue5246] test.test_hashlib.HashLibTestCase fails on darwin

2009-02-13 Thread Tarek Ziadé
Tarek Ziadé added the comment: I have rebuilt a fresh trunk from scratch and it is not reproductible anymore. It was my environment with no doubt. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue5246] test.test_hashlib.HashLibTestCase fails on darwin

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps it's because of missing dependencies in the Makefile? (just trying to guess) -- nosy: +pitrou ___ Python tracker ___ ___

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: I think Py3 with re.ASCII is the same as Py2 without re.UNICODE (and Py3 without re.ASCII is the same as Py2 with re.UNICODE). It's probably a good idea to have a coherent behavior between Py2 and Py3, so if we remove re.ASCII from Py3 we should add re.UNICODE to

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le vendredi 13 février 2009 à 14:44 +, Ezio Melotti a écrit : > It's probably a good idea to have a coherent behavior between Py2 and > Py3, so if we remove re.ASCII from Py3 we should add re.UNICODE to Py2. Removing re.ASCII in py3k is a no-brainer, becaus

[issue5247] Unhelpful error message with str.format()

2009-02-13 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: > Removing re.ASCII in py3k is a no-brainer, because unicode is how > strings work by default. I meant from the line 265 of _strptime.py, not from Python :P ___ Python tracker __

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Removing re.ASCII in py3k is a no-brainer, because unicode is how > > strings work by default. > > I meant from the line 265 of _strptime.py, not from Python :P That's what I understood. ___ Python tracker

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Lisandro Dalcin
New submission from Lisandro Dalcin : structmember.h lacks a 'T_SIZET' define in order to properly support struct fields of type 'size_t' within PyMemberDef. If this feature request is accepted, I can provide the patches. For 2.7, It would be nice to do: #define T_SIZET 20 /* size_

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Mark. A few comments: - The patch seems incomplete. There are other places in the source tree that care about endianness. I haven't done a thorough search, but the native endianness support in the struct module comes to mind. There are also some

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do we really want size_t or rather Py_ssize_t? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bu

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: > native endianness support in the struct module comes to mind Sorry: ignore that. The patch already covers this, since the struct module just uses _PyFloat_{Unp,P}ack8. ___ Python tracker

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : On windows, format string should be encoded as mbcs. Otherwise, result of strftime would be broken. Here is the patch. -- components: Extension Modules, Windows files: fix_strftime_on_windows.patch keywords: patch messages: 81946 nosy: ocean-city s

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Eric Smith
Eric Smith added the comment: Right. The colon would be required if there's a format specifier. Or an exclamation if there's just a conversion specifier: "{!r}{:f}{!s:^10}".format('foo', 3, 10) would give: "'foo'3.0010" I've attached a new version that includes format specifiers.

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Ezio Melotti
Ezio Melotti added the comment: Sorry, I misunderstood the meaning of "no-brainer". If we add re.UNICODE on Py2, strptime should work fine with unicode strings, but it could fail somehow with normal strings. Is it more important to provide a way to use Unicode chars that works only with unicode

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I added test. But this requires issue5249 fix to be passed on windows. (I used "\u3000" instead of "\xa0" because "\xa0" cannot be decoded on windows mbcs) -- dependencies: +Fix strftime on windows. Added file: http://bugs.python.org/file13074/remov

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13071/remove_ascii_flag.patch ___ Python tracker ___ ___ Python-bugs-li

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2009-02-13 Thread Mark Dickinson
Mark Dickinson added the comment: We still need to fix the compile failure somehow, though... Mark, is there any way you can isolate the test(s) in test_float that are causing compile failure? I'm suspicious of test_inf_as_str and test_nan_as_str. Does test_float compile if you remove these

[issue5249] Fix strftime on windows.

2009-02-13 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- priority: -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: All I am requesting is that '{} {} {}'.format(3, 'pi', 3.14) work as >>> '%s %s %s' % (3, 'pi', 3.14) '3 pi 3.14' >>> '{0} {1} {2}'.format(3, 'pi', 3.14) '3 pi 3.14' do today (3.0). I should note that the difference between typing {}, which is easy, and {1},

[issue5239] Change time.strptime() to make it work with Unicode chars

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If we add re.UNICODE on Py2, strptime should work fine with unicode > strings, but it could fail somehow with normal strings. Is it more > important to provide a way to use Unicode chars that works only with > unicode strings or to have a coherent behavior bet

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: In 2.6 and 3.0, we already have 'Py_ssize_t', see 'T_PYSSIZET' definition on Include/structmember.h. I'm asking for 'size_t' support. ___ Python tracker ___

[issue5148] gzip.open breaks with 'U' flag

2009-02-13 Thread Radek
Radek added the comment: Same bug in 2.5, I don't know if the patch applies to 2.5 -- nosy: +radek768 ___ Python tracker ___ ___ Pytho

[issue5249] Fix strftime on windows.

2009-02-13 Thread Kevin Watters
Changes by Kevin Watters : -- nosy: +kevinwatters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message

2009-02-13 Thread Guilherme Polo
Changes by Guilherme Polo : Removed file: http://bugs.python.org/file13035/check_tpiter_before_overriding_msg.diff ___ Python tracker ___ ___

[issue5248] Adding T_SIZET to structmember.h

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In 2.6 and 3.0, we already have 'Py_ssize_t', see 'T_PYSSIZET' > definition on Include/structmember.h. I'm asking for 'size_t' support. Oops, sorry for the noise then. ___ Python tracker

[issue5250] Document __instancecheck__ and __subclasscheck__

2009-02-13 Thread Terry J. Reedy
New submission from Terry J. Reedy : http://www.python.org/dev/peps/pep-3119/#overloading-isinstance-and-issubclass (GvR and Talin) "The primary mechanism proposed here is to allow overloading the built-in functions isinstance() and issubclass(). The overloading works as follows: The call isinsta

[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

2009-02-13 Thread James William Pye
New submission from James William Pye : Basically, nested() doesn't seem to be consistent with explicitly nested with-statements when an exception is thrown in a CM's __enter__. Consider a pair of nested CMs, the inner __enter__ raises an exception trapped by the outer. In the situation of expli

[issue2459] speedup for / while / if with better bytecode

2009-02-13 Thread Collin Winter
Collin Winter added the comment: I don't see the changes to the lnotab format being a roadblock; just mention it in NEWS. Likewise, the pure-Python compiler package shouldn't be a high priority; your changes to that package look good enough. I'm seeing encouraging speed-ups out of this (with gc

[issue5252] 2to3 should detect and delete import of removed statvfs module

2009-02-13 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull : It should also try to convert stuff like from statvfs import F_BAVAIL, F_FRSIZE status = os.statvfs(directory) available = status[F_BAVAIL]/((1024*1024)/status[F_FRSIZE] -- components: 2to3 (2.x to 3.0 conversion tool) messages: 81959 nosy: sjt

[issue2899] Fixers find, rfind, etc in 'string' module

2009-02-13 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Maybe 2to3 could get a --pedantic or even an --annoying option? I agree that it should be noisy about removed features even if actually fixing this kind of thing would be hard to do reliably. -- nosy: +sjt __

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-02-13 Thread Eric Smith
Eric Smith added the comment: Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > All I am requesting is that > '{} {} {}'.format(3, 'pi', 3.14) work as > '%s %s %s' % (3, 'pi', 3.14) > '3 pi 3.14' '{0} {1} {2}'.format(3, 'pi', 3.14) > '3 pi 3.14' > > do today (3.0). My

[issue2459] speedup for / while / if with better bytecode

2009-02-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello Collin, Thanks for taking a look. > I don't see the changes to the lnotab format being a roadblock; just > mention it in NEWS. Likewise, the pure-Python compiler package shouldn't > be a high priority; your changes to that package look good enough. Well

[issue5253] os.environ.get() doesn't handle default value

2009-02-13 Thread Mary Stern
New submission from Mary Stern : os.environ.get('ENV_VAR, 'mydefault') returns '' rather than 'mydefault' if not set. It would be nice if this standard dict-style behavior was supported. -- messages: 81963 nosy: marystern severity: normal status: open title: os.environ.get() doesn't ha

[issue5236] time.strptime should reject bytes arguments on Py3

2009-02-13 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon nosy: +brett.cannon stage: -> test needed ___ Python tracker ___ ___ Python-bu

  1   2   >