[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-06-23 Thread Marco
Marco added the comment: Thank you David.. sorry for my errors :) but this is my first patch :P I've recompiled py2.6 and it works fine on my Debian. As you can see: -rwxr-xr-x 1 marco marco81822 30 set 2008 setup.py ./python -c "import setup" -rw-r--r-- 1 marco marco42156 23 giu

[issue6288] Update contextlib.nested docs in light of deprecation

2009-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Docstring updated in r73518 (2.7) and r73520 (3.1) -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue6326] Add a "swap" method to list

2009-06-23 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : It is sometimes useful to be able to swap the contents of two lists and this patch provides a way to do so using the fastest way possible. > a = [1, 2] > b = [3] > id(a), id(b) (100, 101) > a.swap(b) > a [3] > b [1, 2] > id(a), id(b) (100, 101) One

[issue6327] [mimetext] long lines get cut with exclamation mark and newline

2009-06-23 Thread Martijn Otto
New submission from Martijn Otto : When using mimetext, long lines are cut at character 990, at which place an exclamation mark, a newline and a space are inserted. After this the line continues... For example, this line: 0148

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread Lucas Prado Melo
Lucas Prado Melo added the comment: I think this patch is ok. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6328] login() function failed in smtplib with message "argument 1 must be bytes or buffer, not str"

2009-06-23 Thread Gehua Yang
New submission from Gehua Yang : Hi folks, I encountered the following error with this Python code snippet. (I ran it with Python 3.0.1). Judging from the error as shown in IDLE debugger, the error was buried inside python. try: server = smtplib.SMTP(EmailConfig.smtpServerName) serve

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file14338/issue5230.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread R. David Murray
R. David Murray added the comment: Here is an updated patch that cleans up the unit test (I wasn't correctly restoring sys.path). -- Added file: http://bugs.python.org/file14343/issue5230.patch ___ Python tracker _

[issue6328] login() function failed in smtplib with message "argument 1 must be bytes or buffer, not str"

2009-06-23 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue5259, and has been fixed in 3.1. -- components: +Library (Lib) dependencies: +smtplib is broken in Python3 nosy: +r.david.murray priority: -> low resolution: -> out of date stage: -> committed/rejected status: open -> clo

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

2009-06-23 Thread Akira Kitada
Akira Kitada added the comment: Thanks for this great work! Does Regexp 2.7 include Unicode Scripts support? http://www.regular-expressions.info/unicode.html Perl and Ruby support it and it's pretty handy. -- nosy: +akitada ___ Python tracker

[issue6326] Add a "swap" method to list

2009-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > One application of this is to make help a performance problem when one > wants to upgrade a list instance into a subclass instance. Since this bypasses the subclass's __init__ and other methods, doesn't it risk violating subclass invariants? class CapLis

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

2009-06-23 Thread Matthew Barnett
Matthew Barnett added the comment: It includes Unicode character properties, but not the Unicode script identification, because the Python Unicode database contains the former but not the latter. Although they could be added to the re module, IMHO their proper place is in the Unicode database,

[issue6326] Add a "swap" method to list

2009-06-23 Thread R. David Murray
R. David Murray added the comment: There are clearly enough subtleties to this proposal that it should be discussed on python-ideas first. If a consensus is reached you can reopen this ticket, referencing the discussion thread. -- nosy: +r.david.murray priority: -> low status: open ->

[issue6326] Add a "swap" method to list

2009-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the technique is useful and fast, but it is complicated in its effects. I used something similar in the set_swap_bodies() internal code for set and frozenset objects but avoided exposing the behavior externally. -- status: pending -> open ___

[issue6329] Fix iteration for memoryviews

2009-06-23 Thread Raymond Hettinger
New submission from Raymond Hettinger : Despite being a sequence (with both __getitem__ and __len__ defined), memoryview objects were not recognized as being iterable. The docs say that all such sequences are iterable, so this is a bug. >>> b = b'abcde' >>> m = memoryview(b) >>> list(m) Traceba

[issue6290] cPickle can misread data type

2009-06-23 Thread Alex James
Alex James added the comment: Your test prints: '(1p1\nF1.#INF\naF-1.#INF\naF-1.IND\na.' [inf, -inf, nan] My installation is Python 2.6.2 as currently distributed. Specifying protocol 1 or 2 does circumvent the error. Thank you. -- components: +Documentation, Extension Modules, Wind

[issue6290] cPickle can misread data type

2009-06-23 Thread Alex James
Changes by Alex James : -- components: +Library (Lib) -Documentation, Extension Modules, Windows ___ Python tracker ___ ___ Python-bugs

[issue6326] Add a "swap" method to list

2009-06-23 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Indeed, I realized that it does allow overriding all kinds of behaviour and as such may be dangerous for the unwary. But isn't it possible to do so anyway? One way to increase safety would be to require that the "other" list is not a subclass (PyLis

[issue6330] trunk does not build with --enable-unicode=ucs4

2009-06-23 Thread Eric Smith
New submission from Eric Smith : This was reported a few weeks ago by Benjamin Peterson, but I haven't gotten around to fixing it. This is a reminder to myself to do it. This is due to a bug in Objects/stringlib/formatter.h. Before I fix it trunk, I need to backport some 3.1 code to keep the imp

[issue6326] Add a "swap" method to list

2009-06-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file14345/mview2.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue6326] Add a "swap" method to list

2009-06-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file14345/mview2.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue6329] Fix iteration for memoryviews

2009-06-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file14346/mview2.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue6329] Fix iteration for memoryviews

2009-06-23 Thread R. David Murray
R. David Murray added the comment: Given that the original code being copied is correct, it looks to me like the revision is fine. The memoryview tests pass for me with the patch applied. -- assignee: r.david.murray -> rhettinger resolution: -> accepted __

[issue6329] Fix iteration for memoryviews

2009-06-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file14347/mview3.diff ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue6331] Add unicode script info to the unicode database

2009-06-23 Thread Walter Dörwald
New submission from Walter Dörwald : This patch adds a function unicodedata.script() that returns information about the script of the Unicode character. -- components: Unicode files: unicode-script.diff keywords: patch messages: 89642 nosy: doerwalter severity: normal status: open title:

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

2009-06-23 Thread Walter Dörwald
Walter Dörwald added the comment: http://bugs.python.org/6331 is a patch that adds unicode script info to the unicode database. -- nosy: +doerwalter ___ Python tracker ___ __

[issue6329] Fix iteration for memoryviews

2009-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r73531 and r73532. -- status: open -> closed versions: +Python 2.7 ___ Python tracker ___

[issue6332] typo on man page warning control

2009-06-23 Thread Lie Ryan
New submission from Lie Ryan : A minor typo on the man page > -W argument > ... > such as inside a loop); module to print each warning *only only* > ... -- assignee: georg.brandl components: Documentation files: onlyonly.diff keywords: patch messages: 89645 nosy: georg.brandl, lieryan s

[issue6305] islice doesn't accept large stop values

2009-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Clarified the error message in r73535. Leaving open as a feature request to support arbitrarily large indices. -- components: +Extension Modules type: behavior -> feature request versions: +Python 2.7, Python 3.2 -Python 3.0 ___

[issue6331] Add unicode script info to the unicode database

2009-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the patch is incorrect: the default value for the script property ought to be Unknown, not Common (despite UCD.html saying the contrary; see UTR#24 and Scripts.txt). I'm puzzled why you use a hard-coded list of script names. The set of scripts will cer

[issue2622] Import errors in email.message.py

2009-06-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: The patch looks pretty good, except that you should not change test_email.py. It specifically tests the old names, while test_email_renamed.py tests the new names. There's no point in fixing Python 2.5 since there won't be another maintenance release of that

[issue6331] Add unicode script info to the unicode database

2009-06-23 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +akitada ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue6332] typo on man page warning control

2009-06-23 Thread Lie Ryan
Lie Ryan added the comment: Bored, I grepped the trunk for a few more stuffs that has similar consecutive duplicate typos. The dup.diff patch corrects these typos. Not opening a new issue since all of them are minor. -- Added file: http://bugs.python.org/file14350/dup.diff ___

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2009-06-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is an updated patch, with tests. The only thing that bugs me is the name of the method: date.strptime() seems a bit odd, given that it cannot accept a time part... OTOH 'strptime' refers to the format specification: %Y-%m-%d -- keywords: +n

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2009-06-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Removing the Windows part: on my machine, repeated Ctrl-C's don't exit the 3.1 interpreter, probably because the io module is now written in C. -- assignee: -> ronaldoussoren components: +Macintosh -Interpreter Core, Windows nosy: +ronaldoussore

[issue2622] Import errors in email.message.py

2009-06-23 Thread Mads Kiilerich
Mads Kiilerich added the comment: I have updated the patch. (Applied to 2.6 where it seems like some casings had been fixed, so I dropped all the rejects. Changes to test_email.py has been.) -- Added file: http://bugs.python.org/file14352/emailcasings2.patch ___

[issue6333] logging: ValueError: I/O operation on closed file

2009-06-23 Thread Sridhar Ratnakumar
New submission from Sridhar Ratnakumar : The logging module has a bug that tries to call `flush' on a closed file handle (sys.std[out|err] to be specific). This bug was introduced by ConsoleHandler as defined in http://code.activestate.com/ recipes/576819/ The fix is simple: change definition

[issue6333] logging: ValueError: I/O operation on closed file

2009-06-23 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: BTW, this only happens when running the tests via py.test - http:// pytest.org ... perhaps threading/multiprocess issue. -- ___ Python tracker _

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2009-06-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: I cannot reproduce this on my machine (running OSX) using 2.5, 2.6 and 3.1 (latest rc). -- ___ Python tracker ___ ___

[issue6331] Add unicode script info to the unicode database

2009-06-23 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue6332] typo on man page warning control

2009-06-23 Thread Georg Brandl
Georg Brandl added the comment: Thanks, applied in r73544. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___