[issue12713] argparse: allow abbreviation of sub commands by users

2011-08-08 Thread Peter Williams
New submission from Peter Williams : Quite often the names of subcommands are quite long so that their meaning is clear. However, the downside to this is the increased typing the user of the command must make. A compromise between clarity and brevity can be realized if abbreviation of

[issue11866] race condition in threading._newname()

2011-08-12 Thread Peter Saveliev
Peter Saveliev added the comment: Any news? I hope, the change is trivial enough… -- ___ Python tracker <http://bugs.python.org/issue11866> ___ ___ Python-bug

[issue11866] race condition in threading._newname()

2011-08-13 Thread Peter Saveliev
Peter Saveliev added the comment: counter.next() is a C routine and it is atomic from Python's point of view — if I understand right. The test shows that original threading.py leads to a (rare) race here, while with counter object there is no race cond

[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-03 Thread Peter Otten
Peter Otten <__pete...@web.de> added the comment: The unescape() method uses re.sub(regex, sub, re.ASCII), but the third argument is count, not flags. Fix is easy: use re.sub(regex, sub, flags=re.ASCII). -- keywords: +patch nosy: +potten Added file: http://bugs.python.org/fil

[issue9798] time.tzset() doesn't properly reset the time.timezone variable

2010-09-08 Thread Peter Simons
New submission from Peter Simons : Attached are two programs that I would expect to produce the same output, but they don't. $ python --version Python 2.6.5 $ cat test-timezone-1.py import os, time os.environ["TZ"] = "Europe/Berlin" time.tzset() print "t

[issue10066] xmlrpclib does not handle some non-printable characters properly

2010-10-11 Thread Peter Gyorko
New submission from Peter Gyorko : If I add a string to the response, which contains non-printable characters, the output will not be parsed by the most of the XML parsers (I tried with XML-RPC for PHP). Here is my quick and dirty fix: --- a/Lib/xmlrpclib.py +++ b/Lib/xmlrpclib.py @@ -165,9

[issue10066] xmlrpclib does not handle some non-printable characters properly

2010-10-13 Thread Peter Gyorko
Peter Gyorko added the comment: The shortest code which can trigger this error is the following: >>> import xmlrpclib >>> print xmlrpclib.dumps(('\x01',))  As you can see, the escape method does not care about non-printable characters which can cause parsing

[issue10194] Add gc.remap() function to the gc module.

2010-10-25 Thread Peter Ingebretson
New submission from Peter Ingebretson : This patch implements the gc.remap() function as described in the following document: http://doublestar.org/in-place-python-reloading/ The intended use is an enhanced module reloading mechanism, a prototype of which is described here: http

[issue10194] Add gc.remap() function to the gc module.

2010-10-25 Thread Peter Ingebretson
Changes by Peter Ingebretson : Added file: http://bugs.python.org/file19362/issue10194_gc_remap.diff ___ Python tracker <http://bugs.python.org/issue10194> ___ ___ Pytho

[issue10194] Add gc.remap() function to the gc module.

2010-10-25 Thread Peter Ingebretson
Changes by Peter Ingebretson : Removed file: http://bugs.python.org/file19361/python_remap.diff ___ Python tracker <http://bugs.python.org/issue10194> ___ ___ Python-bug

[issue10194] Add gc.remap() function to the gc module.

2010-10-26 Thread Peter Ingebretson
Peter Ingebretson added the comment: Thanks, I've started a thread on python-dev to discuss the patch. -- ___ Python tracker <http://bugs.python.org/is

[issue10194] Add gc.remap() function to the gc module.

2010-10-26 Thread Peter Ingebretson
Peter Ingebretson added the comment: Closing due to general lack of support on python-dev. Some portion of this implementation may come back as part of a PEP reference implementation. -- resolution: -> rejected status: open -> closed ___

[issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection

2010-11-04 Thread Peter Hall
New submission from Peter Hall : I am running the following : Linux Centos version 2.6.18 Python version 2.5 tk version 8.5 tcl version 8.5 I have a Python GUI program (importing Tkinter and tkFileDialog) which prompts the user to select a (one to many) list of file names. The code is

[issue10316] tkFileDialog.askopenfilenames scrambling multiple file selection

2010-11-04 Thread Peter Hall
Changes by Peter Hall : -- type: -> behavior ___ Python tracker <http://bugs.python.org/issue10316> ___ ___ Python-bugs-list mailing list Unsubscri

[issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release

2010-11-08 Thread Peter Hall
Peter Hall added the comment: There seems some similarity between this issue and issue #10316 which occurs on Linux. -- nosy: +pfhall ___ Python tracker <http://bugs.python.org/issue5

[issue3493] No Backslash (\) in IDLE 1.2.2

2010-11-14 Thread Peter Nielsen
Peter Nielsen added the comment: I have the same problem with a danish keyboard and OSX snowleopard.. I can use \ in both the command editor and pretty everywhere else but not in Idle. -- nosy: +Peter.Nielsen versions: +Python 2.6, Python 3.1 -Python 2.7

[issue3493] No Backslash (\) in IDLE 1.2.2

2011-03-12 Thread Peter Nielsen
Peter Nielsen added the comment: Yes, that is correct . Well, thanks for replying, anyway. I guess I'll have to use linux instead. On Sun, Mar 13, 2011 at 12:00 AM, Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Do I understand it correctly when I write

[issue11640] Shelve references globals in its __del__ method

2011-03-22 Thread Peter Davies
New submission from Peter Davies : Shelf.__setitem__ (which is called from __del__ when writeback is enabled) references globals. This was causing exceptions on interpreter shutdown (due to another exception) for me. I have attached a patch which stores the relevant globals in the Shelf

[issue11708] argparse: suggestion for formatting optional positional args

2011-03-28 Thread Peter Williams
New submission from Peter Williams : At present, if a number (e.g. 2) of optional positional arguments are defined (e.g. arg1 and arg2) argparse formats them as follows: usage: program [arg1] [arg2] in the usage message. I would like to suggest that a better format would be: usage: program

[issue11866] race condition in threading._newname()

2011-04-18 Thread Peter Saveliev
New submission from Peter Saveliev : The _newname() function has no locking. It is called from the new thread constructor. Such constructor is executed within parent thread. So, when several threads create new threads simultaneously, there can be race condition, leading to the same name for

[issue11889] 'enumerate' 'start' parameter documentation is confusing

2011-04-20 Thread Peter Hammer
New submission from Peter Hammer : """ A point of confusion using the builtin function 'enumerate' and enlightenment for those who, like me, have been confused. Note, this confusion was discussed at length at http://bugs.python.org/issue2831 prior to the 's

[issue11866] race condition in threading._newname()

2011-05-03 Thread Peter Saveliev
Peter Saveliev added the comment: Ok, patch attached. Patch made for Python: 2.6 Tested Python versions: 2.6, 2.7 -- keywords: +patch versions: +Python 2.6 Added file: http://bugs.python.org/file21866/newname_race_fix.patch ___ Python tracker

[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-07 Thread Peter Eisentraut
Changes by Peter Eisentraut : -- nosy: +petere ___ Python tracker <http://bugs.python.org/issue12012> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12127] Inconsistent leading zero treatment

2011-05-19 Thread Peter Wentworth
New submission from Peter Wentworth : In Python 3 we no longer have octal literals. The assignment x = 0050 gives an invalid token error. But the assignment y = int("0050") assigns the value 50 to y. I would advocate consistency in the two situations, and prefer that leading zeros

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-02 Thread Peter Kleiweg
Peter Kleiweg added the comment: Why not simply: fp = sys.stdin.detach() -- ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailin

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-02 Thread Peter Kleiweg
Peter Kleiweg added the comment: Using platform-dependant code seems iffy to me. The detach function on sys.stdin, sys,stdout and sys.stderr is there specifically to switch these streams from text mode to binary mode. See: http://docs.python.org/py3k/library/sys.html#sys.stdin

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
New submission from Peter Heiberg : I recently installed Win7 on my laptop, and installed the x86 Python 2.7 package. IDLE fails to even start, and shows nothing but a process in task manager. I've tried compatibility modes both to Vista and XPSP2, with no luck. I ran 2.7 x86 on the

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: The command line opens, but displays nothing but the white flashing underscore.. -- ___ Python tracker <http://bugs.python.org/issue10

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: I'd like to add that I had the exact same problem on my other laptop running Win7 x64, but the same laptop (as mentioned earlier) now runs Win7 x86 and IDLE works fine on that. -- ___ Python tracker

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: The IDLE window doesn't open, the taskbar shows no icons and IDLE does not show up under Task Manager's Application tab.. Also, whenever I open an instance of IDLE, two instances of the .exe shows up under the Processes tab: one instance is

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: I am running the EN-US version of Win7, with Norwegian regional and keyboard settings. Tried changing everything to EN-US, with no change in results. Also tried deactivating visual themes and desktop composition for the .exe. What text editor do you

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: Hey, progress! I ran python.exe, typed "import idlelib.idle", pressed enter - same blinking underscore as before. Then i pressed Ctrl+C, and WHOA, python.exe prints 25 lines of something, and the Python Shell (pythonw.exe) pops up! T

[issue10834] Python 2.7 x86 fails to run in Windows 7

2011-01-05 Thread Peter Heiberg
Peter Heiberg added the comment: My Windows Firewall have been turned off from the day I installed Win7, so that couldn't cause it.. I also tried deactivating UAC, with no luck. Running with administrative privileges, without any re

[issue10841] binary stdio

2011-01-06 Thread Peter Kleiweg
Changes by Peter Kleiweg : -- nosy: +pebbe ___ Python tracker <http://bugs.python.org/issue10841> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10841] binary stdio

2011-01-06 Thread Peter Kleiweg
Changes by Peter Kleiweg : -- nosy: -pebbe ___ Python tracker <http://bugs.python.org/issue10841> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10855] wave.Wave_read.close() doesn't release file

2011-01-07 Thread Peter Creath
New submission from Peter Creath : Calling wave.close() fails to release all references to the file passed in via wave.open(filename_or_obj, "rb"). As a result, processing many wave files produces an IOError of too many files open. This bug is often masked because this dangling re

[issue10855] wave.Wave_read.close() doesn't release file

2011-01-12 Thread Peter Creath
Peter Creath added the comment: Thank you for clarifying the documentation. However, I don't think that fully resolves the issue. I'm not complaining about a failure to close the file. As you observe, it doesn't need to (and shouldn't) close a file object, but i

[issue10855] wave.Wave_read.close() doesn't release file

2011-01-12 Thread Peter Creath
Peter Creath added the comment: A point of clarification on the original report: Georg is completely right when he points out that this is only an issue when passing in a file object. If passed a filename, wave.py both opens and closes the file explicitly, and the dangling reference isn&#

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-12 Thread Peter Kleiweg
Peter Kleiweg added the comment: Pierre Quentel wrote: - get the binary layer of stdout : out = sys.stdout.detach() You can't do that! That makes sys.stdout unavaible to the program that is importing the cgi module. Cgi should access and process sys.stdin only, as binary by mea

[issue10904] PYTHONIOENCODING is not in manpage

2011-01-14 Thread Peter Kleiweg
New submission from Peter Kleiweg : The environment variable PYTHONIOENCODING should be documented in de manpage -- assignee: docs@python components: Documentation, IO messages: 126252 nosy: docs@python, pebbe priority: normal severity: normal status: open title: PYTHONIOENCODING is not

[issue10904] PYTHONIOENCODING is not in manpage

2011-01-14 Thread Peter Kleiweg
Peter Kleiweg added the comment: Ah, I see it's fixed in the latest version. The variable PYTHONIOENCODING was present at least since Python 2.6.4, but not documented in the manpage of versions 2.6.4, 2.7 and 3.1.1. I thought I had recent versions, but I see now versions 2.7.1 and 3.1.3

[issue10834] Python 2.7 x86 IDLE fails to run in Windows 7

2011-01-19 Thread Peter Heiberg
Peter Heiberg added the comment: Run -> C:\Python27\python.exe -m test.regrtest ... stops at "test_asynchat", been there for about 20mins. Can't seem to break the operation tho (Ctrl+C), it still hangs at test_asynchat with the blinking underscore one line down. -

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-01-27 Thread Peter Cai
New submission from Peter Cai : xml.etree.ElementTree.fromstring doesn't work with Unicode string. See the code below: >>> from xml.etree import ElementTree >>> t = ElementTree.fromstring(u'诗') Traceback (most recent call last): File "", li

[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

2011-01-29 Thread Peter Eisentraut
New submission from Peter Eisentraut : When setting Py_LIMITED_API, functions such as PyUnicode_Check() can no longer be used. Example: #define Py_LIMITED_API #include void foo() { PyObject *o; PyUnicode_Check(o); } test.c: In function ‘foo’: test.c:9: error: dereferencing

[issue11279] test_posix and lack of "id -G" support - less noise required?

2011-02-21 Thread Peter Bray
New submission from Peter Bray : Solaris 10's id(1M) does not support the "-G" option, so we get the following: % ./python -m test test_posix [1/1] test_posix id: illegal option -- G Usage: id [-ap] [user] 1 test OK. The code already tests that id -G (std) output, and assume

[issue2966] pydoc doesnt show 'from module import identifier' in the docs

2008-05-25 Thread Peter Puk
New submission from Peter Puk <[EMAIL PROTECTED]>: When you try to make a doc from your programm woth pydoc, it doesnt show the the identifiers in the modules section. when i put 'from module import identifier' in my code -- components: Extension Modules messages: 67340

[issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1

2008-06-05 Thread Peter N
Peter N <[EMAIL PROTECTED]> added the comment: Martin, On solaris 10 x86, this patch makes it possible to build python 2.5.x. Without it, there is no way for the automated build to work. I believe that your characterization of it as "Therefore, I claim that this makes things more c

[issue3045] Windows online help broken when spaces in TEMP environ

2008-06-05 Thread Peter Whaite
New submission from Peter Whaite <[EMAIL PROTECTED]>: If the environ vars TEMP or TMP contain spaces on w32 the on-line help will not work. e.g. help('or') gives the message The system cannot find the file specified. This is because pydoc.tempfilepager sets filename

[issue3193] Python 2.5.2 - Python[2420:613] Error loading / flat namespace error

2008-06-24 Thread Peter Dilley
New submission from Peter Dilley <[EMAIL PROTECTED]>: I have noticed a new crash when using pyglet module after installing the latest Apple security patch/framework for Quicktime, Quicktime Framework 7.5.0. This error is repeatable. This error occurs when the opened window is selecte

[issue3193] Python 2.5.2 - Python

2008-06-24 Thread Peter Dilley
Peter Dilley <[EMAIL PROTECTED]> added the comment: Done at pyglet, Thanks for the update, my first Python error like that, could not determine where the issue was stemming from. My worry was the latest security patching from Apple introduced this bug with the Mac version of Python

[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-06-25 Thread Peter Fein
Peter Fein <[EMAIL PROTECTED]> added the comment: Is this going to make the 2.6 release? The lack of this option causes grief on MacPorts. Just wondering if there's anything I could do to move this along, as a cursory reading shows everyone to be happy... -- n

[issue1840] Tools/i18n/msgfmt.py fixes for Python 3.0

2008-08-27 Thread Peter Harris
Peter Harris <[EMAIL PROTECTED]> added the comment: As far as I can tell, it is OK now. Thanks! ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue7693] tarfile.extractall can't have unicode extraction path

2010-01-17 Thread Peter Bienstman
Peter Bienstman added the comment: > Lars Gustäbel added the comment: > > So, use the pax format. It stores the filenames as utf-8 and this way you > will be on the safe side. > > I hope we both agree that the solution to your particular problem is > nothing tarfile.

[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Peter Otten
Peter Otten <__pete...@web.de> added the comment: As noted on comp.lang.python the implementation can be simplified to def consume(items, n): next(islice(items, n, n), None) When I suggested the above I wasn't aware that consume(items, None) should exhaust the enti

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Peter Waller
New submission from Peter Waller : Apologies if there is a way of doing this, but I haven't been able to find anything. I need to be able to do the following: my_tuple = namedtuple("my_tuple", "a b c") obj = my_tuple(1,2,3) if isinstance(obj, namedtuple): .. do s

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Peter Waller
Peter Waller added the comment: Hi Antoine and Eric, Thanks for your responses. I need to be able to catch all named tuples, I don't know in advance what instance of a namedtuple it might be, but I want my function to only accept named tuples. Is this unreasonable? (I am actually wr

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Peter Waller
Peter Waller added the comment: In this case, I need to have names for each object. It is also desirable to use the namedtuple because of their lightweight nature. If they were to subclass the namedtuple I would be happy to accept that, but I really do want them to pass some form of

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Peter Waller
Peter Waller added the comment: Hi Amaury, Thanks. I had heard of but never bothered to read about duck-typing before now; though I have used it passively before. I think it does make sense in this case. I can't imagine any case where checking for the _fields attribute would fai

[issue7812] Call to gestalt('sysu') on

2010-01-30 Thread Peter Hansen
Changes by Peter Hansen : -- nosy: phansen severity: normal status: open title: Call to gestalt('sysu') on type: crash versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-01-30 Thread Peter Hansen
New submission from Peter Hansen : In platform.mac_ver() there is a call to look up Mac version info, which results in a call to gestalt.gestalt('sysu'). This call is useless since, as documented in comments in the function the "sysu" option no longer exists, but the

[issue8031] Can't get f2py to work at all

2010-02-28 Thread Peter Jones
New submission from Peter Jones : I am user 11943. OS is Windows Vista Ultimate. I have followed the instructions on how to use f2py and get this error when I try it (is this a known bug? It appears that there is bug in f2py): C:\Python26\Scripts>python f2py.py Traceback (most recent c

[issue8031] Can't get f2py to work at all

2010-02-28 Thread Peter Jones
Peter Jones added the comment: I would like to recall this bug report. What happend was I went to the f2py web site and dowloaded the "latest" version and installed it over Pythoh x,y. So I uninstalled P x,y and resinstalled and the f2py works OK now. Some one should make it mor

[issue1685453] email package should work better with unicode

2010-03-06 Thread Peter Kleiweg
Peter Kleiweg added the comment: In Python 3.1.1, email.mime.text.MIMEText accepts an 8-bit charset, but not utf-8. I think you should not have to specify a charset. All strings are unicode now, so I think the package should choose an appropriate charset based on the characters in the text

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2010-03-26 Thread Peter Kleiweg
Changes by Peter Kleiweg : -- nosy: +pebbe ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8504] bsddb databases in python 2.6 are not compatible with python 2.5 and are slow in python 2.6

2010-04-23 Thread Peter Landgren
Peter Landgren added the comment: I could add what I have found using bsddb in Python 2.5 and 2.6 under Windows XP SP3. In my installation: Python 2.5.4 bsddb 4.4.5.3 Python 2.6.4 bsddb 4.7.3 What I did: In Gramps imported an XML backup file to a empty bsddb database. It took about 1 hour

[issue8504] bsddb databases in python 2.6 are not compatible with python 2.5 and are slow in python 2.6

2010-04-23 Thread Peter Landgren
Peter Landgren added the comment: Requested data on my Windows box: Python 2.5 bsddb 4.4.5.3 4.4.20 Python 2.6 bsddb 4.7.3 4.7.25 Python 2.6 bsddb 4.8.4 4.8.26 OK? -- ___ Python tracker <http://bugs.python.org/issue8

[issue8504] bsddb databases in python 2.6 are not compatible with python 2.5 and are slow in python 2.6

2010-04-23 Thread Peter Landgren
Peter Landgren added the comment: Maybe I should add that there is no speed degradation between 2.5 and 2.5 when doing the same thing in Linux. -- ___ Python tracker <http://bugs.python.org/issue8

[issue8504] bsddb databases in python 2.6 are not compatible with python 2.5 and are slow in python 2.6

2010-04-23 Thread Peter Landgren
Peter Landgren added the comment: In Linux it is: 4.4.5.3 (4, 6, 21) You asked for a test case. I'm not sure how I can provide one without you having Gramps installed to test it. Do you mean the whole database environment? -- ___ Python tr

[issue8504] bsddb databases in python 2.6 are not compatible with python 2.5 and are slow in python 2.6

2010-04-23 Thread Peter Landgren
Peter Landgren added the comment: To make it 100% clear: The versions are almost the same for Linux and Windows. Python 2.5Python 2.6 Windows 4.4.5.3 (4, 6, 20)4.7.3 (4.7.25) Linux4.4.5.3 (4, 6, 21)4.7.3 (4.7.25

[issue8516] Speed difference between Python 2.5 and 2.6 during filling bsddb database.

2010-04-24 Thread Peter Landgren
New submission from Peter Landgren : The time it takes, in the application Gramps, to fill an empty bsddb database by importing an XML backup or a GECDOM file, incrises from about 2 minutes to about an hour in Windows XP ana Windows 7. No such degradation has been sen in Linux. The Gramps

[issue8516] Speed difference between Python 2.5 and 2.6 during filling bsddb database.

2010-04-24 Thread Peter Landgren
Peter Landgren added the comment: 1. Sorry, I made a mistake this morning. (Had to run to a funeral.) These are the correct version: Python 2.5 Python 2.6 Windows 4.4.5.3 (4, 4, 20)4.7.3 (4.7.25) Linux4.4.5.3 (4, 6, 21)4.7.3 (4.7.25) So, the same versions of

[issue8564] Update documentation on doctest/unittest2 integration

2010-04-28 Thread Peter Fein
New submission from Peter Fein : The documentation on integrating doctests in a file of unittests is confusing and out of date. This patch updates the documentation to use unittest2 test discovery. -- assignee: d...@python components: Documentation files

[issue8564] Update documentation on doctest/unittest2 integration

2010-04-28 Thread Peter Fein
Peter Fein added the comment: See http://lists.idyll.org/pipermail/testing-in-python/2010-April/003039.html for discussion -- ___ Python tracker <http://bugs.python.org/issue8

[issue1691] feature request: methods that modify instances should return instance

2007-12-23 Thread Peter Farson
New submission from Peter Farson: Here's an example: I'd like to be able to reverse a list for iterating... for i in range(10).reverse() This could work if reverse method returned self, but currently it doesn't return anything. I think the overhead is slig

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-11 Thread Peter Donis
New submission from Peter Donis: When running doctest.testfile on a Linux machine, testing a txt file saved on a Windows machine, doctest raised a SyntaxError exception for each Windows newline in the txt file. On examining the code in the _load_testfile function, it looks to me like there

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-11 Thread Peter Donis
Peter Donis added the comment: Edit: I should have said that the attached diff also includes changes to test_doctest.py to test for the correct newline behavior. Because the test setup is a little complex, I added an auxiliary script, doctest_testfile.py, and an accompanying text file

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-12 Thread Peter Donis
Peter Donis added the comment: I've uploaded a revised diff with two small improvements: (1) Removed a redundant os.isfile check in PackageLoaderTestImporter.get_data() in doctest_testfile.py. (The open() builtin already raises IOError if the file can't be opened.) (2) Added doct

[issue1830] pygettext.py syntax error

2008-01-15 Thread Peter Harris
New submission from Peter Harris: Tools/i18n/pygettext.py contains a syntax error. On line 665, there is an old u'' string for testing unicode on pre-3.0 python. It should be OK to remove it. -- components: Demos and Tools messages: 59961 nosy: scav severity: normal st

[issue1830] pygettext.py py3k errors

2008-01-15 Thread Peter Harris
Peter Harris added the comment: Also, a couple of instances of assuming dict.keys() is a list, and trying to use .sort() on them. Patch attached for both issues. -- title: pygettext.py syntax error -> pygettext.py py3k errors Added file: http://bugs.python.org/file9173/pygettext.d

[issue1840] Tools/i18n/msgfmt.py fixes for Python 3.0

2008-01-16 Thread Peter Harris
New submission from Peter Harris: Python 3.0: Use bytes instead of str to construct the binary file, don't try to .sort a dict's keys(). This patch is a tentative fix - in one place I've had to provide an encoding from str to bytes and I've guessed UTF-8, which may be O

[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-01-18 Thread Peter Fein
New submission from Peter Fein: threading.local doesn't free attributes assigned to a local() instance when the assigning thread exits. See attached patch for _threading_local.py doctests. Per discussion with Crys and arkanes in #python, this may be an issue with PyThreadState_

[issue1868] threading.local doesn't free attrs when assigning thread exits

2008-01-19 Thread Peter Fein
Peter Fein added the comment: re: r60075 : I'm unclear - is this intentional behavior? Adding a `del t` at line 24 after the loop doesn't help either (though it does make the test somewhat clear IMO). __ Tracker <[EMAIL PROTECTED]> <htt

[issue2020] _sha256 module missing if openssl is not in a "normal" directory.

2008-02-06 Thread Peter Saunders
New submission from Peter Saunders: When compiling python 2.5.1 on Solaris 10 (sparc and x86), with openssl 0.9.8e - test_md5 fails with No module named _sha256. (As does doing an "import md5") When compiling, setup.dist was modified, the ssl parts were uncommented, and modified

[issue2161] STORE_LOCAL byte code is not documented

2008-02-22 Thread Peter Tröger
New submission from Peter Tröger: The byte code STORE_LOCAL is referenced in the description of STORE_NAME, but has no own entry in the list. See here: http://docs.python.org/lib/bytecodes.html -- components: Documentation messages: 62685 nosy: troeger severity: minor status: open

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-03-31 Thread Peter Poeml
Changes by Peter Poeml <[EMAIL PROTECTED]>: -- nosy: +poeml _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1424152> _ ___ Python-bugs

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Peter Otten
New submission from Peter Otten <[EMAIL PROTECTED]>: I'd like to suggest a different approach than the one taken in rev. 54348 to improve timeit's scripting interface: allow passing it a namespace. Reasons: - It has smaller overhead for functions that take an argument: &g

[issue2527] Pass a namespace to timeit

2008-04-01 Thread Peter Otten
Peter Otten <[EMAIL PROTECTED]> added the comment: Alexander, I'm fine with a more specific argument name. ns was what the Timer already used internally. Antoine, from __main__ import name1, ..., nameN works fine on the command line, but inside a function you'd have to declar

[issue4261] The pwd module doesn't distinguish between errors and no user

2008-11-05 Thread Peter Åstrand
New submission from Peter Åstrand <[EMAIL PROTECTED]>: The getpwnam function in the pwd module does not correctly distinguish between the case when the user does not exist and error conditions. getpwnam() returns NULL in both cases, the the calling code needs to check errno to determine

[issue4515] Formatting error in "What's New in Python 3.0"

2008-12-03 Thread Peter Wang
New submission from Peter Wang <[EMAIL PROTECTED]>: In the section "Removed Syntax", there is some ReST markup that leaked through into the output: "The only acceptable syntax for relative imports is from .``[*module*] :keyword:`import` *name*; :keyword:`import` forms not

[issue4516] Another formatting error in "What's New in Python 3.0"

2008-12-03 Thread Peter Wang
New submission from Peter Wang <[EMAIL PROTECTED]>: In the "Library Changes" section, the next to last bullet point about string.letters has leaked through some ReST markup into the final output: ":data:string.letters`" -- assignee: georg.brandl components: Doc

[issue4609] Allow use of > 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
New submission from Peter Saunders <[EMAIL PROTECTED]>: Feature Request: Could configure etc be modified to detect if it can use enable_extended_FILE_stdio() to allow solaris to use > 256 FD's while still be compiled 32 bit. This is a new feature in Solaris 10 (came in Update 4).

[issue4609] Allow use of > 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
Changes by Peter Saunders <[EMAIL PROTECTED]>: -- components: +Distutils -Interpreter Core type: -> feature request ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue4609] Allow use of > 256 FD's on solaris in 32 bit mode

2008-12-09 Thread Peter Saunders
Changes by Peter Saunders <[EMAIL PROTECTED]>: -- components: +Interpreter Core -Distutils ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue5017] import suds help( suds ) fails

2009-01-20 Thread Peter Bobroff
New submission from Peter Bobroff : Python Interactive Shell 2.6.1 r261:67517 easy_install suds #seemed to succeed import suds help( suds ) fails in Python26\lib\inspect.py with index out of range I fixed the obvious problem, then failed on another. After fixing 3 0r 4 it worked but there is

[issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space

2009-02-05 Thread Peter Harris
New submission from Peter Harris : Using Python3.1 built from svn, on RedHat EL4, with Tcl/Tk 8.5 built from source. Traceback: -- File "/usr/mlocal/lib/python3.1/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) F

[issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space

2009-02-08 Thread Peter Harris
Peter Harris added the comment: Yeah, I know that's what it's supposed to do. It does pop up the list of names, but then crashes. It happens no matter what has been input, even on an empty window. However, if it works for everyone else, maybe I built T

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
New submission from Peter Landgren : If any of the Swedish characters "åäöÅÄÖ" are input to unicode.normalize(form, ustr) with form = "NFD" or "NFKD" the result will be "aaoAAO". "åäöÅÄÖ" are normal character and should be the same after normaliz

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
Peter Landgren added the comment: Thanks for the fast response. I understand that python follows the unicode specification. I think the unicode standard is not correct in this case for the Swedish letters. I have asked unicode.org for an explanation. Should not the Danish letter "

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
Peter Landgren added the comment: The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O" which also are also different letters as "Ø" and "O" are. ("Ø" is the Danish version of "Ö" ) Ma

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-11 Thread Peter Landgren
Peter Landgren added the comment: > Martin v. Löwis added the comment: > > The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O" > > which also are also different letters as "Ø" and "O" are. >

<    1   2   3   4   5   6   7   >