[issue10304] error in tutorial triple-string example

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 1. Rather than add a blank line to the output, the input should have the newline suppressed with \ (which has been done in previous examples). print("""\ 2. It is rather difficult to see that there is no blank at the end (highlight with mouse). I can imagin

[issue10304] error in tutorial triple-string example

2010-11-05 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10321] Add support for Message objects and binary data to smtplib.sendmail

2010-11-05 Thread R. David Murray
R. David Murray added the comment: One more patch update. This one includes the versionadded/version changed and a minimal What's New entry. -- Added file: http://bugs.python.org/file19508/sendmail_message_3.patch ___ Python tracker

[issue10304] error in tutorial triple-string example

2010-11-05 Thread Malte Helmert
Malte Helmert added the comment: > 1. Rather than add a blank line to the output, the input should have > the newline suppressed with \ (which has been done in previous > examples). > print("""\ I think that would be didactically bad after just mentioning that newlines in triple-quoted strings

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: As near as I can tell, since && and || are logical rather than bitwise, and since the variable reference 'quotetabs' has no side effect, you are correct. Have you run the unittest on a patched build? -- nosy: +terry.reedy stage: -> commit review type

[issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases

2010-11-05 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 2.7 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10304] error in tutorial triple-string example

2010-11-05 Thread R. David Murray
R. David Murray added the comment: I think the commit hook might object to the trailing blank (I'm not sure it applies to rst files, but I think it does). -- nosy: +r.david.murray ___ Python tracker _

[issue10241] gc fixes for module m_copy attribute

2010-11-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: The attached patch seems better. The copies of module dicts stored in the interpreter state are dereferenced when the interpreter shuts down. -- Added file: http://bugs.python.org/file19509/module_m_copy2.txt ___

[issue10333] Remove ancient backwards compatibility GC API

2010-11-05 Thread Neil Schemenauer
New submission from Neil Schemenauer : I think it should be safe to remove some backwards compatibility cruft. This was introduced during the 2.3 development cycle. -- files: gc_cruft.txt messages: 120554 nosy: nascheme priority: low severity: normal status: open title: Remove ancient

[issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2010-11-05 Thread Philippe Devalkeneer
Philippe Devalkeneer added the comment: Hello, Here is a patch to fix it :) ( and don't blame me too much if something is not correct, it's the first patch I submit :) ) Philippe -- keywords: +patch nosy: +flupke Added file: http://bugs.python.org/file19511/broken_long_int_sqlite_fu

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wish I could test this patch but on OSX I get $ ./configure --without-threads $ make Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k/Lib/site.py", line 519, in main() File "/Users/sasha/Work/python-svn/py3k/Lib/site.p

[issue10333] Remove ancient backwards compatibility GC API

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. I suppose everything builds fine? -- components: +Extension Modules, Interpreter Core nosy: +pitrou stage: -> commit review versions: +Python 3.2 ___ Python tracker

[issue10197] subprocess.getoutput fails on win32

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: () is used to launch a command in a sub-shell and {} is used to group commands, for example to set up a stream redirection for all commands in brackets. -- nosy: +eric.araujo ___ Python tracker

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: dummy_threading feels a bit like black magic to me. What do you think about something like issue10330.diff attached. -- keywords: +patch Added file: http://bugs.python.org/file19512/issue10330.diff ___ Python

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > dummy_threading feels a bit like black magic to me. What do you think > about something like issue10330.diff attached. It's fine for me. -- ___ Python tracker

[issue10252] Fix resource warnings in distutils

2010-11-05 Thread Eric Smith
Eric Smith added the comment: Is it really true that 3.x's distutils is source compatible with 2.3? For 3.x I'd like to see the with statement used. -- nosy: +eric.smith ___ Python tracker ___

[issue1346238] A constant folding optimization pass for the AST

2010-11-05 Thread Dave Malcolm
Dave Malcolm added the comment: I've been working on this against the py3k branch. I'm attaching what I've got so far. I foolishly didn't check the tlee-ast-optimize branch, instead using file6850 as a base. Rune Holm/titanstar, I assume you've signed a PSF contributor agreement? Changes s

[issue1346238] A constant folding optimization pass for the AST

2010-11-05 Thread Dave Malcolm
Dave Malcolm added the comment: Another optimization idea: detect local dictionaries that are only ever used in non-mutating ways, and convert them to constants, rather than rebuilding the dict from scratch each time. See e.g. htmlparser.py:adjustSVGAttributes etc within the bm_html5lib bench

[issue10302] Add class-functions to hash many small objects with hashlib

2010-11-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: This is an application specific optimization that I'd like to see as its own library or a feature added to NSS or OpenSSL. Regardless if you want this for python, write an extension module and put it on pypy before aiming for the stdlib. I understand the o

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Nicolas Kaiser
Nicolas Kaiser added the comment: That's ./Lib/test/test_unittest.py? With patched builds of Python 2.6.5 and 3.1.2: -- Ran 126 tests in 0.015s OK -- Ran 18

[issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2010-11-05 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1346238] A constant folding optimization pass for the AST

2010-11-05 Thread Alex
Alex added the comment: ISTM that you don't need to worry about mutating locals, the locals() function is explicitly documented as not necessarily affecting local variables (not sure if frame objects have the same documentation). If you want a free optimization opportunity: BINARY_SUBSCR with

[issue10252] Fix resource warnings in distutils

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Fixed in the py3k branch in r86223, r86224 and r86226. Thanks for the report and starting patch. Eric: This compatibility policy was instated because a newer version of distutils may be used/is often used to install distributions for older Pythons. In the 2.x

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I'll commit tonight. BTW, on a without-threads build: >>> import dummy_threading >>> dummy_threading.settrace >>> dummy_threading.settrace.__module__ 'threading' In other words, dummy_threading.settrace is always the same as threading.settrace. Since

[issue10252] Fix resource warnings in distutils

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: (Not closing yet: Some calls of os.popen and subprocess.Popen are still to be fixed, and then there’s the backport.) -- ___ Python tracker ___ __

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r86229, merged in r86231 (3.1) and r86233 (2.7). -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-11-05 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20101106.zip is a new version of the regex module. Fix for issue 10328, which regex also shared. -- Added file: http://bugs.python.org/file19514/issue2636-20101106.zip ___ Python tracker

[issue10304] error in tutorial triple-string example

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I should have said that IDLE puts >>> on a new line. -- ___ Python tracker ___ ___ Python-bugs-list

[issue10324] Modules/binascii.c: simplify expressions

2010-11-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: test_binascii.py -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10329] trace.py and unicode in Python 3

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Nov 5, 2010 at 2:43 PM, Antoine Pitrou wrote: .. > Who are the consumers of the trace files? Is there a formal specification > or is Python the primary consumer? The trace files contain annotated python source code. There is no formal specificat

[issue10326] Can't pickle unittest.TestCase instances

2010-11-05 Thread Mark Roddy
Mark Roddy added the comment: Patch which makes TestCase pickle-able for Python 2.7, includes unit test -- keywords: +patch nosy: +MarkRoddy Added file: http://bugs.python.org/file19515/python27.pickle.patch ___ Python tracker

[issue10326] Can't pickle unittest.TestCase instances

2010-11-05 Thread Mark Roddy
Mark Roddy added the comment: Attaching patch which makes TestCase pickle-able for Python 3.2, includes unit test -- Added file: http://bugs.python.org/file19516/python3k.pickle.patch ___ Python tracker _

[issue5412] extend configparser to support mapping access(__*item__)

2010-11-05 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: Code - The __name__-aversion in the mapping interface is a little heavy-handed, but given the implementation of __name__ elsewhere, I think this can be revisited separately if anyone cares enough. In particular, it should be allowed to give an _

[issue10252] Fix resource warnings in distutils

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: [Pp]open objects closed in r86234. All fixes ported to 3.1 in r86237, 2.7 in r86238. Cheers! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1

[issue10329] trace.py and unicode in Python 3

2010-11-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue10329.diff fixes the issue by setting the encoding of the coverage file to that of the source file. I am not 100% happy with this patch for the following reasons: 1. It opens the source file one more time. This is probably accepta

[issue10229] Refleak run of test_gettext fails

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Fixed in r86239. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10229] Refleak run of test_gettext fails

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Added NEWS entry in r86241. Fix (including NEWS entry) backported to 3.1 in r862442 and 2.7 in r86243. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue9281] Race condition with mkdir/makedirs in distutils2

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Fixed in r86244 (py3k), r86245 (3.1), r86246 (2.7), thanks! For distutils2, I’d like to commit a comprehensive fix. Do you want to expand your patch to cover all instances of mkdir/makedirs? -- components: -Distutils status: pending -> open title: Race

[issue10273] Clean-up Unittest API

2010-11-05 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10228] Refleak run of test_dbm fails when several dbm modules are available

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: A quick look makes me think the bug is in the test, not the code. -- nosy: +eric.araujo, giampaolo.rodola, michael.foord ___ Python tracker ___ __

[issue7908] remove leftover macos9 support code

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: FTR, see also #9508. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10205] Can't have two tags with the same QName

2010-11-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue6269] threading documentation makes no mention of the GIL

2010-11-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue9508] python3.2 reversal of distutils reintrocud macos9 support

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Fixed in r86248, thanks. BTW, my commit removes a bit more than yours originally did. In 2.7, the unused distutils.sysconfig._init_mac function is still left over. I don’t know if killing dead code is acceptable in a stable version. Benjamin? -- assi

[issue3902] Packages containing only extension modules have to contain __init__.py

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Reclassifying as request for doc enhancement. I’ll check the distutils2 doc and add a line about this problem if I find the text is not clear enough. Someone finding this report thanks to the “easy” keyword can feel free to propose a patch. -- componen

[issue10334] Add new reST directive for links to source code

2010-11-05 Thread Raymond Hettinger
New submission from Raymond Hettinger : In a few cases where the pure python source code is a helpful adjunct to the documentation, I've added some links using the "seealso" directive: .. seealso:: Latest version of the `ast module Python source code

[issue4931] distutils does not show any error msg when can't build C module extensions due to a missing C compiler

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: Giampaolo, can you test Amaury’s patch? I’d prefer some testing before committing. -- ___ Python tracker ___

[issue9709] test_distutils warning: initfunc exported twice on Windows

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: I can review a patch for this bug but not write it, lacking knowledge in C. -- ___ Python tracker ___ _

[issue10334] Add new reST directive for links to source code

2010-11-05 Thread Alex
Alex added the comment: Seems to me it should be an inline directive (or whatever they're called). i.e. it'd be written:: .. seealso:: Latest version of the :sourcecode:`ast module Python source code `. -- nosy: +alex ___ Python tracker

[issue10334] Add new reST directive for links to source code

2010-11-05 Thread Éric Araujo
Éric Araujo added the comment: A directive can take options, for example to control highlighting, display of line numbers, etc. Similar existing constructs like literalinclude are directives. Inline reST things are called roles :) -- nosy: +eric.araujo _

<    1   2