[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-04-05 Thread Максим Цыпкин
New submission from Максим Цыпкин drauger...@gmail.com: The following code: class TestServer(BaseManager):pass Server_1=TestServer(address=(127.0.0.1,5),authkey=passkey) produces following error in python 3.2 : TypeError: string argument without an encoding The cause is in

[issue14492] pdeps.py has_key

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Should be x not in y BTW to be idiomatic, not not x in y. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14492 ___

[issue14497] Invalid syntax Python files in Python sources tree

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yes, Sphinx is still 2.x, although we could switch to a Python 3 version since now all necessary dependencies are ported. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org

[issue14489] repr() function link on the built-in function documentation is incorrect

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4416efeb0163 by Georg Brandl in branch '2.7': Closes #14489: correct link target. http://hg.python.org/cpython/rev/4416efeb0163 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status:

[issue14489] repr() function link on the built-in function documentation is incorrect

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Shows how it's a bad thing to have a builtin function and a module of the same name :) -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14489

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: From d...@python.org: I recently ran into a situation where I could not be certain that a lock was currently in the acquired state. I checked the documentation to determine what would happen if I attempted to release a lock that was already

[issue14486] Add some versionchanged notes in threading docs

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: +1. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14486 ___ ___

[issue14492] pdeps.py has_key

2012-04-05 Thread Popa Claudiu
Popa Claudiu pcmantic...@gmail.com added the comment: Hello. Here is the new patch. There was a few more problems: 1. in process, fp wasn't closed 2. in process, m_import.match(line) = 0 could fail if the regular expression didn't matched on that line I've included the tests, too. --

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: On Thu, Apr 5, 2012 at 09:06, Georg Brandl rep...@bugs.python.org wrote: I agree: if we know that a ThreadError will always be raised in this instance, we should document it as such. I've already prepared a small patch for that (every

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: What different exceptions are they? Note that thread.error == _thread.error == threading.ThreadError. The docs should always use the last one (ThreadError). -- ___ Python tracker

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Ah, and I missed that apparently on 3.3, _thread.Error is aliased to RuntimeError. In that case you should use RuntimeError of course :) -- ___ Python tracker rep...@bugs.python.org

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Rik Poggi
Rik Poggi poggi.ri...@gmail.com added the comment: Hi, I'd like to contribute to this bug if it's possible. I would've directly started, but it seems the situation has moved/changed a bit, so I'm not sure where the tests are needed. There's a try/except, like the one mentioned above, in

[issue14503] docs:Code not highlighted

2012-04-05 Thread Ramchandra Apte
New submission from Ramchandra Apte maniandra...@gmail.com: In http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator , two code samples -- assignee: docs@python components: Documentation messages: 157551 nosy: docs@python, ramchandra.apte

[issue14503] docs:Code not highlighted

2012-04-05 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: Whoops - In http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator , two code samples are not highlighted. -- ___ Python tracker rep...@bugs.python.org

[issue14478] Decimal hashing very slow, could be cached

2012-04-05 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: I recommend that __hash__ should use functools.lru_cache for caching. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478

[issue14321] Do not run pgen during the build if files are up to date

2012-04-05 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14321 ___

[issue14504] Suggestion to improve argparse's help messages for store_const

2012-04-05 Thread Amnon Harel
New submission from Amnon Harel amnon.ha...@cern.ch: argparse's help messages for variables that use store_const can probably be improved: - propagate the default to all the options - mark the default option as such explicitly - group the keywords that have the same destination together (?) -

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Matthias Klose
New submission from Matthias Klose d...@debian.org: [forwarded from http://bugs.debian.org/664529] seen with 2.7.3 rc2 File descriptors opened by PyFile_FromString don't get closed when the reference count is decreased. Here's my test program, pythony.c: #include Python.h int main() { int

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Matthias Klose
Changes by Matthias Klose d...@debian.org: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14505 ___ ___ Python-bugs-list mailing

[issue3033] tkFont added displayof where necessary

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 774c2afa6665 by Andrew Svetlov in branch 'default': Issue #3033: Add displayof parameter to tkinter font. http://hg.python.org/cpython/rev/774c2afa6665 -- nosy: +python-dev

[issue3033] tkFont added displayof where necessary

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Closing as fixed -- assignee: - asvetlov resolution: - fixed stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3033

[issue3033] tkFont added displayof where necessary

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Thanks to Guilherme Polo. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3033 ___

[issue6225] Fixing several minor bugs in Tkinter.Canvas and one in Misc._configure

2012-04-05 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6225 ___ ___ Python-bugs-list

[issue6167] Tkinter.Scrollbar: the activate method needs to return a value, and set should take only two args

2012-04-05 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6167 ___ ___ Python-bugs-list

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: File descriptors opened by PyFile_FromString don't get closed when the reference count is decreased. Correct, PyFile_FromString() doesn't close the file descriptor, even if you call its close() method. You have to call manually

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Victor, that sounds like a strange behaviour to me. PyFile_FromString is a public API and maybe it shouldn't have changed between 2.6 and 2.7. -- ___ Python tracker rep...@bugs.python.org

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Victor, that sounds like a strange behaviour to me. We may change PyFile_FromString() to call fclose() when the file is closed explicitly (call its close() method), but it may break backward compatibility. I prefer to document the

[issue14417] dict RuntimeError workaround

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: A counter can be added to dictobject.c.patch to avoid an infinite loop. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14417 ___

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Victor, what exactly are you talking about? http://hg.python.org/cpython/rev/0f5b64630fda/ *does* change PyFile_FromString. And Matthias mentioned that the problem didn't occur with 2.6. -- ___ Python

[issue14222] Use time.steady() to implement timeout

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Why do you think monotonic time is needed for the Queue module? The duration of a timeout of N seconds should be N seconds even if the system clock is updated (e.g. a daylight saving time (DST) change). This feature is checked by an

[issue14222] Use time.steady() to implement timeout

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: You can imagine a similar patch for Queue timeout. Oops: You can imagine a similar *test* for Queue timeout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14222

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2c514c382a2a by Victor Stinner in branch 'default': Close #14249: Use an union instead of a long to short pointer to avoid aliasing http://hg.python.org/cpython/rev/2c514c382a2a -- nosy: +python-dev

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Result of the benchmark before/after my commit. I prefer an unit over manually manipulate long as short or bytes, because I think that the compiler knows better how to optimize operations on integers. unpatched: $ ./python -m timeit

[issue14227] console w/ cp65001 displays extra characters for non-ascii strings.

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: I'm quite sure that this issue is a duplicate of #1602. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14227

[issue1602] windows console doesn't print or input Unicode

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: The issue #14227 has been marked as a duplicate of this issue. Copy of msg155149: This is on Windows 7 SP1. Run 'chcp 65001' then Python from a console. Note the extra characters when non-ASCII characters are in the string. At a

[issue14506] HTMLParser can't handle erronous end tags with additional tags in it

2012-04-05 Thread Olaf Tomalka
New submission from Olaf Tomalka olaf.toma...@gmail.com: While this is wrongly formated html, I've spotted such an example on real website on the web, and all browsers handle the bad tag gracefully, while the python html parser throws an exception with bad end tag, I think additional info in

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is a completely new patch. This approach uses the already existing tp_is_gc enquiry slot to signal garbage collection. The patch modifies the generator object to use this new mechanism. The patch keeps the old

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-05 Thread marko kreen
marko kreen mark...@gmail.com added the comment: The 'msg' in SysLogHandler does not correspond to MSG in RFC. Nor to %(message)s in log record. RFC: SYSLOG-MSG = HEADER SP STRUCTURED-DATA [SP MSG] HEADER = PRI VERSION SP TIMESTAMP SP HOSTNAME

[issue14386] Expose dict_proxy internal type as types.MappingProxyType

2012-04-05 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Expose dict_proxy internal type as types.MappingViewType - Expose dict_proxy internal type as types.MappingProxyType ___ Python tracker rep...@bugs.python.org

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-05 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9141 ___ ___ Python-bugs-list

[issue14385] Support other types than dict for __builtins__

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: New version: - if __build_class__ is missing, raise a NameError instead of surprising ImportError - add tests - if PyObject_GetItem on __builtins__ or globals fail, only raise NameError if the exception is a KeyError Before my

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8258e5fa4a19 by Antoine Pitrou in branch '2.7': Issue #14505: Fix file descriptor leak when deallocating file objects created with PyFile_FromString(). http://hg.python.org/cpython/rev/8258e5fa4a19 -- nosy:

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Matthias, this should be fixed now. -- resolution: - fixed stage: - committed/rejected status: open - closed type: - resource usage ___ Python tracker rep...@bugs.python.org

[issue14506] HTMLParser can't handle erronous end tags with additional info in them

2012-04-05 Thread Olaf Tomalka
Changes by Olaf Tomalka olaf.toma...@gmail.com: -- title: HTMLParser can't handle erronous end tags with additional tags in it - HTMLParser can't handle erronous end tags with additional info in them ___ Python tracker rep...@bugs.python.org

[issue14507] Segfault with starmap and izip combo

2012-04-05 Thread Per Myren
New submission from Per Myren progr...@gmail.com: The following code crashes with a segfault on Python 2.7.2: from operator import add from itertools import izip, starmap a = b = [1] for i in xrange(10): a = starmap(add, izip(a, b)) list(a) It also crashes with Python 3.2.2: from

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the report. I'm not familiar with multiprocessing, so I'll have to leave it to someone else to judge the fix. We use 'crash' to indicate a segfault in the Python interpreter, so I'm changing the type to 'behavior' (that is,

[issue14507] Segfault with starmap and izip combo

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Apparently it's a stack overflow between zip_next and starmap_next. -- nosy: +pitrou, rhettinger versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14507

[issue14503] docs:Code not highlighted

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I'm not seeing any unhighlighted examples in that section. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14503

[issue14504] Suggestion to improve argparse's help messages for store_const

2012-04-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +bethard versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14504 ___

[issue14508] gprof2html is broken

2012-04-05 Thread Popa Claudiu
New submission from Popa Claudiu pcmantic...@gmail.com: Tools/gprof2html.py uses file to open a file. Also, the opened file passed to add_escapes was never closed. There's a test included in the patch. -- components: Demos and Tools files: gprof.patch keywords: patch messages: 157580

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Rik Poggi
Rik Poggi poggi.ri...@gmail.com added the comment: Strictly related or not to this bug, a bit more test coverage shouldn't hurt. So while waiting for a reply I started writing a couple of tests for pypi/dist.py, hope they look good. -- Added file:

[issue14506] HTMLParser can't handle erronous end tags with additional info in them

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Which version of python did you test with? There have been several improvements html parsing recently. -- nosy: +ezio.melotti, r.david.murray ___ Python tracker rep...@bugs.python.org

[issue14506] HTMLParser can't handle erronous end tags with additional info in them

2012-04-05 Thread Olaf Tomalka
Olaf Tomalka olaf.toma...@gmail.com added the comment: Python 3.2.2, which is latest on arch linux -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14506 ___

[issue14503] docs:Code not highlighted

2012-04-05 Thread Berker Peksag
Berker Peksag berker.pek...@gmail.com added the comment: I can reproduce. See screenshot.png. -- nosy: +berker.peksag Added file: http://bugs.python.org/file25135/screenshot.png ___ Python tracker rep...@bugs.python.org

[issue14506] HTMLParser can't handle erronous end tags with additional info in them

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I just tested your script on 3.2.3a2+, and it raises an error. Ezio made the other parsing changes, I'll leave it to him to evaluate what if anything should be done here. -- versions: +Python 3.3

[issue14509] Build failures in non-pydebug builds without NDEBUG.

2012-04-05 Thread Thomas Wouters
New submission from Thomas Wouters tho...@python.org: The hash randomization change conflates 'pydebug' builds (which define the 'Py_DEBUG' preprocessor symbol) and asserts (which use 'NDEBUG' instead.) While Py_DEBUG automatically unsets NDEBUG, the inverse is not true (and should not be

[issue14503] docs:Code not highlighted

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Berker: you can reproduce the bug, or the fact that they are highlighted? The png looks like they are highlighted, so I assume the latter. -- ___ Python tracker rep...@bugs.python.org

[issue14510] Regular Expression + perform wrong repeat

2012-04-05 Thread YunJian
New submission from YunJian tld...@yahoo.com.cn: Regular expression perform wrong result, I use regular expression r'(\$.)+' try to match $B$b or something like that, but the script only give back $b, r'(\$.){1,}', r'(\$.){2}' performed the same, you can take the file I attached for reference

[issue14503] docs:Code not highlighted

2012-04-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: they are highlighted No. Keywords normally appear in bold font, and with another color. This is not the case in these blocks. Probably because the language detection does not work with the new yield from construct. Sphinx should

[issue14496] Wrong name in idlelib/tabbedpages.py

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f2dfe0ca6c21 by Andrew Svetlov in branch '3.2': Issue #14496: Fix wrong name in idlelib/tabbedpages.py. http://hg.python.org/cpython/rev/f2dfe0ca6c21 -- nosy: +python-dev

[issue14496] Wrong name in idlelib/tabbedpages.py

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Fixed. Thanks. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14496

[issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Closing as won't fix. -- assignee: kbk - asvetlov nosy: +asvetlov resolution: - wont fix stage: test needed - committed/rejected status: open - closed ___ Python tracker

[issue14503] docs:Code not highlighted

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, you mean they are not *syntax* highlighted. Now I understand. Sorry for missing that. My understanding is that Sphinx does not use Python directly to parse the code and highlight it, it uses pygments, which uses regexes. So this

[issue1047540] Turtle.py hangs Idle

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Closing as not reproducible for 3.3. The bug is too minor to worry about 2.7 and 3.2 even if it present (all works for me by the way). Please reopen if you will get described issue. -- assignee: - asvetlov nosy: +asvetlov

[issue14503] docs:Code not highlighted

2012-04-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Not exactly. Sphinx first tries to see if the block is a Python script, and to do so it uses the Python compiler: https://bitbucket.org/birkenfeld/sphinx/src/164f59b2d946/sphinx/highlighting.py#cl-117 In case of SyntaxError, it treats

[issue14503] docs:Code not highlighted

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Huh. Well, in another issue Georg said it was now possible to upgrade the doc build toolchain to Python3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14503

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-05 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Ok, I see what the problem is. I could go for option 1 - leave the BOM out, encode the string as UTF-8 but send it as just a bunch of bytes, i.e. the MSG-ANY variant of the spec. However, this could break any existing code that doesn't

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-05 Thread marko kreen
marko kreen mark...@gmail.com added the comment: Note additional brokenness in BOM addition: * It does add BOM even when msg is ascii, just because it was in unicode() string. * It does not add BOM to UTF8 string if it is already encoded to str(). So highly doubt anybody actually relies on it.

[issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs

2012-04-05 Thread Zachary Ware
New submission from Zachary Ware zachary.w...@gmail.com: Adding the search plugin for the 3.2 docs to Firefox and then searching from it returns results from the 3.3 dev docs, despite everything saying it should be for searching Python v3.2.2 documentation. If my understanding of how it all

[issue14510] Regular Expression + perform wrong repeat

2012-04-05 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: If a capture group is repeated, as in r'(\$.)+', only its last match is returned. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14510

[issue14506] HTMLParser can't handle erronous end tags with additional info in them

2012-04-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is already fixed, but only in non-strict mode (and 3.2.3 iirc). You should always use HTMLParser(strict=False). The non-strict mode will probably become the default and strict=True will be deprecated. Thanks anyway for the report, and

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2012-04-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the tests! I should have some time this week-end to review them and explain clearly what this bug is about and where tests should go. -- ___ Python tracker rep...@bugs.python.org

[issue14478] Decimal hashing very slow, could be cached

2012-04-05 Thread James Hutchison
James Hutchison jamesghutchi...@gmail.com added the comment: I presume you mean in 3.2? Have you looked at the source code for that decorator? It's fundamentally a try/except but with a lot more unnecessary bloat than is needed for caching a single int result from a function with no

[issue14417] dict RuntimeError workaround

2012-04-05 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: A counter can be added to dictobject.c.patch to avoid an infinite loop. But why bother? There was no counter originally -- it would continue until it ran out of stack. Since this can only be triggered if there is Python code in the __eq__,

[issue14417] dict RuntimeError workaround

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Does this mean I should just check it in? But I asked, and never got an answer, whether the original stress test had been converted into a unittest. I'd like that to happen before I check this in. Also there are probably docs I've missed.

[issue14512] Pydocs module docs server not working on Windows.

2012-04-05 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: 3.2.3rc2 and 3.3.0a2, freshly downloaded and installed, Win7, 64 bit Start Menue/Pythonxx/Module Docs Brings up tkinter pydoc box. [open browser] brings up *empty* localhost:7464 window. Search 'tkinter' and double-click tkinter entry or

[issue14505] PyFile_FromString leaks file descriptors in python 2.7

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Victor, what exactly are you talking about? http://hg.python.org/cpython/rev/0f5b64630fda/ *does* change PyFile_FromString. Oh. I don't know (remember) why I did this change!? I suppose that I changed it to test something and then

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: What's about test which pass bytes to Popen? Should it be deprecated and should Popen accept only unicode strings only — I mean `str` type? As I know the trend of py3k to get rid of bytes in filesystem names. --

[issue8515] idle Run Module (F5) does not set __file__ variable

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2c276d0553ff by Andrew Svetlov in branch 'default': Issue #8515: Set __file__ when run file in IDLE. http://hg.python.org/cpython/rev/2c276d0553ff -- nosy: +python-dev

[issue8515] idle Run Module (F5) does not set __file__ variable

2012-04-05 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Thanks to all. Bruce Frederiksen, you are mentioned in Misc/ACK Tal Einat, if you want to make a patch which will use `execfile` instead of current approach — you are welcome. Please file new issue. -- assignee: - asvetlov

[issue14509] Build failures in non-pydebug builds without NDEBUG.

2012-04-05 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14509 ___ ___ Python-bugs-list

[issue14513] IDLE icon switched and switches on Windows taskbar

2012-04-05 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: IDLE has an icon that is, appropriately, a white page with text overlaid with the Python logo on lower right. (Module docs uses the same icon.) For a long time, this has been used everywhere for IDLE -- start menu, desktop, taskbar. In the

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: What compiler are you using? With gcc 4.4 on 32-bit Linux netbook I get: unpatched union shift utf-16le *1 129 126109 utf-16le \u263A*1208 203160 utf-16be *1

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: No, you need to be able to pass bytes to Popen, just like you do to the os.exec[xx] functions. When the OS doesn't fully support unicode, that is sometimes the only option. As for filenames; again, as long as the underlying systems

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: On 64-bit Linux with gcc-4.4 I get: Unpatched: $ ./python -m timeit -s 'import codecs; d = codecs.utf_16_be_decode; x = ( * 1000).encode(utf-16be)' 'd(x)' 10 loops, best of 3: 4.1 usec per loop $ ./python -m timeit -s 'import

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Linux, 64-bit, Intel Core i5 2500: - unpatched: $ ./python -m timeit -s 'import codecs; d = codecs.utf_16_be_decode; x = ( * 1000).encode(utf-16be)' 'd(x)' 10 loops, best of 3: 2.99 usec per loop - Victor's commit: $ ./python -m timeit

[issue14417] dict RuntimeError workaround

2012-04-05 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: A counter can be added to dictobject.c.patch to avoid an infinite loop. But why bother? Without a termination condition, how is this different from just reverting the original change? Is it just the slightly improvement in efficiency?

[issue14417] dict RuntimeError workaround

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Without a termination condition, how is this different from just reverting the original change? The difference is that it's a (presumably interruptible) infinite loop, not a stack overflow. There's no crash and therefore no security issue.

[issue14386] Expose dict_proxy internal type as types.MappingProxyType

2012-04-05 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: [Victor] '''Oh, collections.abc contains also the mappingview type exposed with the name dict_proxy: dict_proxy = type(type.__dict__) It was exposed as _abcoll.dict_proxy in Python 3.2. It is not documented. Should we keep it for

[issue14386] Expose dict_proxy internal type as types.MappingProxyType

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: You can ignore those. You mean that I can remove it? It's a little bit surprising to find a concrete class in collections.abc. So I think that it's better to expose dict_proxy in types than in collections.abc. --

[issue7057] tkinter doc: more 3.x updates

2012-04-05 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- assignee: gpolo - asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7057 ___ ___

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 489f252b1f8b by Victor Stinner in branch 'default': Close #14249: Use bit shifts instead of an union, it's more efficient. http://hg.python.org/cpython/rev/489f252b1f8b -- resolution: - fixed stage: commit

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-05 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: I think the second patch is a fairly straightforward enhancement to the existing situation. It still feels a bit like an awkward half-measure, though. (1) If a class does have a finalizer, instances should still be able to say Go ahead and

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Ok, benchmarks have spoken, amen. I applied Serhiy Storchaka's patch (version 3). I just replaced expressions in calls to Py_MAX by variables: Py_MAX is a macro and it may have to compute each expression twice. I didn't check if it's

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset efeca6ff2751 by Sandro Tosi in branch '2.7': Issue #14502: release() and unlocked lock generates a ThreadError http://hg.python.org/cpython/rev/efeca6ff2751 New changeset acea9d95a6d8 by Sandro Tosi in branch '3.2':

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Sandro Tosi
Changes by Sandro Tosi sandro.t...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14502 ___

[issue14249] unicodeobject.c: aliasing warnings

2012-04-05 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I just replaced expressions in calls to Py_MAX by variables: Py_MAX is a macro and it may have to compute each expression twice. gcc computes those values only once. It even caches them for use in PyUnicode_WRITE. But other compilers

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: At least put the information inside some disclaimers about normally; even the stdlib has some fake locks that let you release a lock someone else holds. (I think I found them in in workarounds for threading not being available, such as the

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: At least put the information inside some disclaimers about normally; even the stdlib has some fake locks that let you release a lock someone else holds. Not sure what you're talking about. The doc patch is about unacquired locks, not locks

[issue12567] curses implementation of Unicode is wrong in Python 3

2012-04-05 Thread Nicholas Cole
Nicholas Cole nicholas.c...@gmail.com added the comment: Testing the Python3.3a2 build on OS X - the exception AttributeError: '_curses.curses window' object has no attribute 'get_wch' is still being raised. I don't have a Linux build I can easily test with. Is this a particular problem

  1   2   >