[issue14373] C implementation of functools.lru_cache
Matt Joiner anacro...@gmail.com added the comment: * it incorporate the recent lru_cache algorithmic updates (moving the root around the circular queue to re-use old links). The existing C patch already does this. * it shows which parts should be implemented in C using a regular type and shows how to call it from pure python. The existing patch already did this. * it gives hints on use of #defines and PyDict_GetItem I'm familiar with C. I've retained PyDict_GetItemWithError so as not to suppress typing errors from keys constructed from bad arguments from the user. * the critical sections are marked so you can use the GIL rather than using locks. The existing patch is already using the GIL, it didn't have any locks. * there are hints for what datatypes to use (only the hits and misses need the ability to grow beyond sys.maxsize). The existing patch already had this. * it shows how to access the named tuple from within the C code (using a straight PyObject_Call). I incorporated this. * this code passes the test suite and should be directly translatable (and very fast). So did the old code. * please follow the model and use PyList objects instead of C structure for links I've left this as is, the linked list in C is idiomatic, avoids a lot of branching and reference counting and is also more readable than the equivalent C/Python. -- Added file: http://bugs.python.org/file25094/functools.lru_cache-in-c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Changes by Matt Joiner anacro...@gmail.com: Removed file: http://bugs.python.org/file25026/functools.lru_cache-in-c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14373] C implementation of functools.lru_cache
Changes by Matt Joiner anacro...@gmail.com: Removed file: http://bugs.python.org/file24984/functools.lru_cache-in-c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In 2.7, the file is named _winreg.c. But the patch does not apply there, because it's using the ANSI (=bytes) API. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Thanks. Martin, what constitutes a security fix for Python? For example, isn't it conceivable that one could place a long key into some registry setting used by python and thus interfere with its stack? Aren't stack buffer overruns a classic security hole? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14472] .gitignore is outdated
New submission from Matej Cepl mc...@redhat.com: Patch for the port of .hgignore to .gitignore is attached -- components: Build files: _gitignore.patch keywords: patch messages: 157346 nosy: mcepl priority: normal severity: normal status: open title: .gitignore is outdated Added file: http://bugs.python.org/file25095/_gitignore.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14472] .gitignore is outdated
Thomas Spura toms...@fedoraproject.org added the comment: AFAIK hg supports symlinks. Why not just symlink .gitignore to .hgignore and keep .hgignore up to date? But in this case $ and ^ need to be avoided, e.g. this doesn't work for git: Makefile$ Makefile.pre$ -- nosy: +tomspur ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13903] New shared-keys dictionary implementation
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file25096/372d0bca85ae.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14473] Regex Howto error
New submission from Federico Reghenzani feder...@reghe.net: There's an error in Regex Howto, when explain the operator '?', I attached the patch. -- assignee: docs@python components: Documentation files: regex_doc.diff keywords: patch messages: 157348 nosy: docs@python, federico.reghenzani priority: normal severity: normal status: open title: Regex Howto error versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25097/regex_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14473 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14473] Regex Howto error
Senthil Kumaran sent...@uthcode.com added the comment: That's not an error, but in fact a correct statement. Please test it in the interpreter. -- nosy: +orsenthil resolution: - invalid stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14473 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14474] mishandling of AttributeError in threads
New submission from Pierre Ossman oss...@cendio.se: These three things do not mix: - AttributeError - Threads - Object methods An unhandled AttributeError thrown in a thread will not call sys.excepthook if the thread's start function is a class/object method. Test case: import sys import thread class Dummy: def worker(self): raise AttributeError thread.start_new_thread(Dummy().worker, ()) sys.stdin.readline() Note that you do not get a traceback here. Throwing any other exception type works fine, as does having worker() be a simple function. I think I've traced the issue to Objects/classobject.c:instance_repr(). It tries to look up the method, making sure to handle any AttributeError this might cause. But it fails to save and restore and Exception currently already active, effectively clearing out the current exception. -- components: Interpreter Core messages: 157350 nosy: ossman priority: normal severity: normal status: open title: mishandling of AttributeError in threads versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Jeff Robbins je...@livedata.com added the comment: I'm happy to try another build of apsw, but am not up-to-speed with how to get development copies of Python. As a user, I typically download the latest Windows .msi file and install it. If you can point me to a document on how to proceed, I'll give it a try. I'm Bcc'ing the APSW author in the event he can give it a try. - Original Message - From: Stefan Krah rep...@bugs.python.org To: je...@livedata.com Sent: Sunday, April 01, 2012 7:48 AM Subject: [issue14387] Include\accu.h incompatible with Windows.h Stefan Krah stefan-use...@bytereef.org added the comment: Should I contact the extension's author(s)/maintainer(s) and tell them about this ordering requirement? FWIW, it is the recommended way in the docs. The Python build itself has been fixed. Does the http://code.google.com/p/apsw/ module build now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Martin v. Löwis mar...@v.loewis.de added the comment: Martin, what constitutes a security fix for Python? For example, isn't it conceivable that one could place a long key into some registry setting used by python and thus interfere with its stack? If it has a CVE identifier, it's a security fix. Otherwise, I'd apply standard risk assessment procedures, and ask the release manager for judgement. Aren't stack buffer overruns a classic security hole? My personal risk assessment of this issue is that it has a fairly low risk, as the likelihood of an attack is low. Just placing a key in the registry is not sufficient as an attack: one would also need a different user who has a Python application that enumerates this part of the registry. In that scenario, the user would have to be unprivileged (*), i.e. would not have write permissions to either HKLM nor HKCR. Writing to HKCU does not constitute a threat, since it would only allow to crash your own Python applications. There may be opportunities where an administrator has a script that traverses HKEY_USERS while a different user is logged on. Given that the threat of being discovered is very high for the attacker, and given that the typical Windows installation does not use concurrent logins, and given that traversing HKEY_USERS is uncommon, I think the risk of this threat is really low. (*) an administrator user could just as well replace the Python DLL, causing a threat regardless of the winreg module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Thanks for the your info/insight, Martin. I'll update 3.2 and 3.3. as you suggest then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14472] .gitignore is outdated
Matej Cepl mc...@redhat.com added the comment: Right ... .gitignore doesn't support regexeps (they are not needed IMHO here, but that's another point). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14405] Some Other Resources in the sidebar are hopelessly out of date
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14475] codecs.StreamReader.read behaves differently from regular files
New submission from Mikko Rasa t...@tdb.fi: For regular files, a read() call without arguments will read until EOF. codecs.StreamReader does its own buffering, and if there are characters in the buffer, a read() call will be satisfied from the buffer without an attempt to read the rest of the file. This discrepancy causes certain code that worked with regular open() fail if codecs.open() is substituted. The easiest way to reproduce this is to first call readline() and then read(). Since readline() can't know how many characters are on the line, it will almost always leave some characters in the buffer, triggering the problem with read(). -- messages: 157355 nosy: tdb priority: normal severity: normal status: open title: codecs.StreamReader.read behaves differently from regular files type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Stefan Krah stefan-use...@bytereef.org added the comment: Jeff Robbins rep...@bugs.python.org wrote: I'm happy to try another build of apsw, but am not up-to-speed with how to get development copies of Python. As a user, I typically download the latest Windows .msi file and install it. If you can point me to a document on how to proceed, I'll give it a try. http://www.python.org/ftp/python/3.3.0/python-3.3a2.msi should have the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14474] mishandling of AttributeError in threads
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If Dummy is a new-style class, the traceback is correctly printed. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
New submission from Pierre Ossman oss...@cendio.se: sudo breaks exception handling in Python in some subtle way. The following test program works fine when run directly, but breaks when run through sudo: #!/usr/bin/python import time def a(): try: while True: time.sleep(0.001) except KeyboardInterrupt: print a def b(): try: a() except KeyboardInterrupt: print b b() This is expected: pierre@pangolin:~$ ./test.py ^Ca But through sudo you get random behaviour: pierre@pangolin:~$ sudo ./test.py ^Ca b pierre@pangolin:~$ sudo ./test.py ^Ca b pierre@pangolin:~$ sudo ./test.py ^Ca b pierre@pangolin:~$ sudo ./test.py ^Ca pierre@pangolin:~$ sudo ./test.py ^Ca pierre@pangolin:~$ sudo ./test.py ^Cb Seen on Ubuntu 12.04 (alpha/beta) and on Fedora 16. Happens more often on Ubuntu though. -- components: Interpreter Core messages: 157358 nosy: ossman priority: normal severity: normal status: open title: sudo breaks python versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14474] mishandling of AttributeError in threads
Pierre Ossman oss...@cendio.se added the comment: Indeed. I assume old style classes are still supported though? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's probably not related to Python; see http://comments.gmane.org/gmane.comp.tools.sudo.user/3769 This threads ends with: Great. That change will be in the next sudo release. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
R. David Murray rdmur...@bitdance.com added the comment: See also http://www.gratisoft.us/bugzilla/show_bug.cgi?id=464, which lists versions. Sounds like the same bug Amaury linked to. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
R. David Murray rdmur...@bitdance.com added the comment: I'm going to close this. If it turns out not to be a bug in sudo, please reopen. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14474] mishandling of AttributeError in threads
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8609d7fcdcc7 by Benjamin Peterson in branch '2.7': prevent writing to stderr from messing up the exception state (closes #14474) http://hg.python.org/cpython/rev/8609d7fcdcc7 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14476] sudo breaks python
Pierre Ossman oss...@cendio.se added the comment: Well that was fast. :) Sounds very much like the same bug I'm seeing here, yes. Unfortunately I'm not sure it's sufficient for us to rely on the distributions to update their sudo packages. A workaround would be preferable. I'll see if I can figure something out. Many thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14476 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13903] New shared-keys dictionary implementation
Mark Shannon m...@hotpy.org added the comment: I'm not bothered by the regression in silent_logging, as it is a micro benchmark with a very short running time. The regression in mako is, I think, caused by competition for the data cache between the new dict implementation and the method-cache used by _PyType_Lookup. Although the new-dict uses less memory overall, the size of a single split-table dict (keys + value) is larger than a combined table. Reducing the method-cache size from 2**10 to 2**9 allows the working set to fit better in the cache. This fixes the regression in mako, but makes OO programs that use few objects (such as richards) a bit slower. Compared with tip, the new-dict implementation is 4% slower, using 7% less memory for mako. 6% slower, using 5% less memory for richards. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14474] mishandling of AttributeError in threads
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 60ad83716733 by Benjamin Peterson in branch '3.2': prevent writing to stderr from messing up the exception state (closes #14474) http://hg.python.org/cpython/rev/60ad83716733 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14455] plistlib unable to read json and binary plist files
Changes by Georges Martin jrjsm...@gmail.com: -- nosy: +jrjsmrtn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b3639f6aaa2b by Kristján Valur Jónsson in branch '3.2': Issue #14471: Fix a possible buffer overrun in the winreg module. http://hg.python.org/cpython/rev/b3639f6aaa2b New changeset 80d814d7b886 by Kristján Valur Jónsson in branch 'default': Merge with 3.2 (Issue #14471) http://hg.python.org/cpython/rev/80d814d7b886 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14471] Buffer overrun in winreg.c
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14471 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14477] Rietveld test issue
New submission from Martin v. Löwis mar...@v.loewis.de: This is to test issues with the Rietveld integration. -- messages: 157368 nosy: dmalcolm, loewis priority: normal severity: normal status: open title: Rietveld test issue ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14477] Rietveld test issue
Changes by Martin v. Löwis mar...@v.loewis.de: -- keywords: +patch Added file: http://bugs.python.org/file25098/readme.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
New submission from James Hutchison jamesghutchi...@gmail.com: Tested on 3.2 Note that I noticed that Decimal is supposed to be faster in 3.3 but I thought I would bring this to light just in case its still relevant Decimal hashing is very slow, even for simple numbers. I found by caching the hash result, there is significant speed up whenever a Decimal value is reused. I created a class that inherits from Decimal and changed the __hash__ function to try/except a stored hash value as such: def __hash__(self): try: return self.myHash; except: self.myHash = super().__hash__(); return self.myHash; Example code: d = dict(); start = time.time(); i = int(1); j = int(2); k = int(3); for i in range(10): d[i,j,k] = 5; print(time.time() - start); d = dict(); start = time.time(); i = Decimal(1); j = Decimal(2); k = Decimal(3); for i in range(10): d[i,j,k] = 5; print(time.time() - start); d = dict(); start = time.time(); i = CachingDecimal(1); j = CachingDecimal(2); k = CachingDecimal(3); for i in range(10): d[i,j,k] = 5; print(time.time() - start); Output int: 0.0463133544922 Decimal: 2.31263760376 CachingDecimal: 0.111335144043 In a real life example, I changed some of the values in my code from int to Decimal because non-whole numbers needed to be supported (and this seemed like the easiest way to do so without having to worry about my == comparisons breaking) and it slowed my code down massively. Changing to a CachingDecimal type sped up one code block from 92 seconds with Decimal to 7 seconds, which was much closer to the original int speed. Note that all of the relevant operations have to be overloaded to return the CachingDecimal type, which is a pain, so this makes a lot of sense to implement into the Decimal module. My understanding is that altering a Decimal value will always create a new Decimal object, so there shouldn't be any issues with the cached hash desyncing with the correct hash. Someone may want to check that though. Thanks, James -- components: Library (Lib) messages: 157369 nosy: Jimbofbx priority: normal severity: normal status: open title: Decimal hashing very slow, could be cached type: performance versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Jeff Robbins je...@livedata.com added the comment: Thanks for the pointer to the .msi. The fix solved my apsw build problem. I installed Python 3.3.a2 and apsw-3.7.11-r1. I ran this build: C:\Temp\apsw-3.7.11-r1c:\Python33\python setup.py fetch --all build --enable-all-extensions install apsw built and installed fine. And my test app runs. This line in accu.h did the trick: #undef small /* defined by some Windows headers */ One of the apsw tests failed, but I don't think it had to do with the accu.h build problem. Could be something I did wrong, or some issue between APSW and Python 3.3? - Jeff == FAIL: testShell (tests.APSW) Check Shell functionality -- Traceback (most recent call last): File C:\Temp\apsw-3.7.11-r1\tests.py, line 6703, in testShell self.assertEqual(data, newdata) AssertionError: Lists differ: [(3.1, 'xabc'), (3.2, 'xabfff... != [(3.1, ''), ( 3.2, '')] First differing element 0: (3.1, 'xabc') (3.1, '') - [(3.1, 'xabc'), (3.2, 'xabfffc')] + [(3.1, ''), (3.2, '')] -- Ran 78 tests in 787.594s FAILED (failures=1) - Original Message - From: Stefan Krah rep...@bugs.python.org To: je...@livedata.com Sent: Monday, April 02, 2012 09:31 Subject: [issue14387] Include\accu.h incompatible with Windows.h Stefan Krah stefan-use...@bytereef.org added the comment: Jeff Robbins rep...@bugs.python.org wrote: I'm happy to try another build of apsw, but am not up-to-speed with how to get development copies of Python. As a user, I typically download the latest Windows .msi file and install it. If you can point me to a document on how to proceed, I'll give it a try. http://www.python.org/ftp/python/3.3.0/python-3.3a2.msi should have the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14472] .gitignore is outdated
Georg Brandl ge...@python.org added the comment: Symlinks don't work well on Windows. I think a comment in .hgignore asking to update the other two ignores as well is the best solution. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14472 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Stefan Krah stefan-use...@bytereef.org added the comment: The fix solved my apsw build problem. Thanks for testing. As for the test failure, that could be really anything. Often these kinds of failures turn out to be overly strict assumptions in the test suite. Best ask the maintainer of the package. So 3.3 is covered. The fix isn't yet in 3.2.3rc2, but I guess aff7ff2aae8c will go automatically into the final release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Georg Brandl ge...@python.org added the comment: No it won't: but it's harmless enough that I think it can go into the final without creating another rc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14387] Include\accu.h incompatible with Windows.h
Georg Brandl ge...@python.org added the comment: Transplanted to f91ecbc8bafc in 3.2.3 release clone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14387 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
Serhiy Storchaka storch...@gmail.com added the comment: It would be better if you provide a working script that demonstrates the issue. I have completed your example (attached). I ran the example on Python 3.1 and received: 0.24046326 9.8737308979 0.587980985641 Then I ran on Python 3.3: 0.2100839614868164 0.8649246692657471 0.6062228679656982 As you can see, the new implementation is much faster. Benefit from caching decreased. I suppose, if we implement caching in C the difference will be more. Then I increased the size of the cycles in 10 times, and the time is almost equal (on Python 3): 1.8386573791503906 8.418540477752686 8.355770826339722 That I can't to explain. The time of cached version increased disproportionately, more than in 10 times. -- nosy: +storchaka Added file: http://bugs.python.org/file25099/CachingDecimal_example.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
James Hutchison jamesghutchi...@gmail.com added the comment: If I increase the cycles increased 10x with 3.2 I get: int: 0.421313354492 Decimal: 24.20299983024597 CachingDecimal: 1.7809998989105225 The sample you have provided is basically what I'm using. See attached What about worst case hash calculation time for Decimal? How does the C code handle that? This is if I increase the values themselves by 100x, same number of loops as above int: 0.5309998989105225 CachingDecimal: 2.07868664551 Decimal: 41.2979998588562 -- Added file: http://bugs.python.org/file25100/cachedDecimal.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14478] Decimal hashing very slow, could be cached
James Hutchison jamesghutchi...@gmail.com added the comment: 100x should be e100 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14478 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14428] Implementation of the PEP 418
STINNER Victor victor.stin...@gmail.com added the comment: Updated patch: - Implement time.get_clock_info() - time.monotonic() never fails: fallback to time.time() if needed TODO: time.monotonic() must use GetTickCount64() or GetTickCount() on Windows, with a detection of integer overflow on GetTickCount(). -- Added file: http://bugs.python.org/file25101/pep418-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14432] Bug in generator if the generator in created in a C thread
Adam Tomjack adam.tomj...@zuerchertech.com added the comment: For what it's worth, I think I've seen this bug in 2.6 and 2.5, using generators created in python threads, while profiling not tracing. I'm creating generators in one python thread and storing them in a variable. In a different python thread I overwrite the variable, which garbage collects the generator. Sometimes it causes an interpreter crash. Other times, it seems to trigger a return event in the profiler, but it's associated with an incorrect thread. The thread in question is often (always?) in the profiler code, so it looks like the profiler is profiling itself. -- nosy: +adamtj versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14432 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14475] codecs.StreamReader.read behaves differently from regular files
STINNER Victor victor.stin...@gmail.com added the comment: Oh, yet another bug in in codecs.StreamReader. I should add it to the PEP :-) http://www.python.org/dev/peps/pep-0400/ Use io.TextIOWrapper (open) instead of codecs.StreamReader (codecs.open), it's bugfree :-) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14477] Rietveld test issue
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14477 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14466] Rip out mq instructions
Antoine Pitrou pit...@free.fr added the comment: No one uses it? I'm surprised. I do and it seems to me by far the easiest and safest way to maintain patches in progress when there is constant churn. Ah, good to know :) My wording was a bit too strong then. However, I rarely see mq-produced patches when processing patches from contributors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14466] Rip out mq instructions
R. David Murray rdmur...@bitdance.com added the comment: One person that I helped at the PyCon sprints was using it, because the devguide said to. But I think she was more confused by it than she would have been by 'hg diff', at least to start out. Or maybe not...but I wasn't able to help her with the mq commands, because I don't use mq myself. I should try it sometime, I suppose. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14466] Rip out mq instructions
Antoine Pitrou pit...@free.fr added the comment: One person that I helped at the PyCon sprints was using it, because the devguide said to. But I think she was more confused by it than she would have been by 'hg diff', at least to start out. Or maybe not...but I wasn't able to help her with the mq commands, because I don't use mq myself. mq is advanced compared to other workflows. It's a rather powerful and sophisticated tool. I think people familiar with hg will have no problem using mq even if we don't mention it. hg beginners, on the other hand, will be more comfortable with something simpler. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14466] Rip out mq instructions
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file25102/ripmq.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14479] Replace transplant with graft in devguide
New submission from Antoine Pitrou pit...@free.fr: hg has a new graft command that replaces and obsoletes the transplant extension. The devguide should be changed in that regard. -- components: Devguide messages: 157385 nosy: eric.araujo, ezio.melotti, pitrou, r.david.murray priority: normal severity: normal stage: needs patch status: open title: Replace transplant with graft in devguide ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14479 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CallbackStack
Nick Coghlan ncogh...@gmail.com added the comment: I'm unlikely to add the contextlib2.ContextStack API as written. I aim to have an updated variant (called contextlib.CallbackStack) available for alpha 3 in May: https://bitbucket.org/ncoghlan/contextlib2/issue/8/rename-contextstack-to-callbackstack-and -- title: Add contextlib.ContextStack - Add contextlib.CallbackStack ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14428] Implementation of the PEP 418
STINNER Victor victor.stin...@gmail.com added the comment: Patch version 3: - fix compilation on non-Linux (e.g. on FreeBSD and OpenBSD) - time.monotonic() uses GetTickCount/GetTickCount64 on Windows - clock_getres() fills the accuracy field instead of the resolution field of time.get_clock_info() Clock information on different operating systems. Linux (Fedora 16) on x86_64: pprint.pprint(time.get_clock_info('clock')) {'accuracy': 1e-06, 'function': 'clock()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-06} pprint.pprint(time.get_clock_info('highres')) {'accuracy': 1e-09, 'function': 'clock_gettime(CLOCK_MONOTONIC_RAW)', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('monotonic')) {'accuracy': 1e-09, 'function': 'clock_gettime(CLOCK_MONOTONIC_RAW)', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('time')) {'accuracy': 1e-09, 'function': 'clock_gettime(CLOCK_REALTIME)', 'is_adjusted': True, 'is_monotonic': False, 'resolution': 1e-09} FreeBSD 8.2 on x86_64: pprint.pprint(time.get_clock_info('clock')) {'accuracy': 0.0078125, 'function': 'clock()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 0.0078125} pprint.pprint(time.get_clock_info('highres')) {'accuracy': 1.1001e-08, 'function': 'clock_gettime(CLOCK_MONOTONIC)', 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('monotonic')) {'accuracy': 1.1001e-08, 'function': 'clock_gettime(CLOCK_MONOTONIC)', 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('time')) {'accuracy': 1.1001e-08, 'function': 'clock_gettime(CLOCK_REALTIME)', 'is_adjusted': True, 'is_monotonic': False, 'resolution': 1e-09} OpenBSD on x86_64: pprint.pprint(time.get_clock_info('clock')) {'accuracy': 0.01, 'function': 'clock()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 0.01} pprint.pprint(time.get_clock_info('highres')) {'accuracy': 0.01, 'function': 'clock_gettime(CLOCK_MONOTONIC)', 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('monotonic')) {'accuracy': 0.01, 'function': 'clock_gettime(CLOCK_MONOTONIC)', 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('time')) {'accuracy': 0.01, 'function': 'clock_gettime(CLOCK_REALTIME)', 'is_adjusted': True, 'is_monotonic': False, 'resolution': 1e-09} Python 32 bits on Windows 64 bits: pprint.pprint(time.get_clock_info('clock')) {'accuracy': 1e-08, 'function': 'QueryPerformanceCounter()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-08} pprint.pprint(time.get_clock_info('highres')) {'accuracy': 1e-08, 'function': 'QueryPerformanceCounter()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-08} pprint.pprint(time.get_clock_info('monotonic')) {'accuracy': 0.0156000999, 'function': 'GetTickCount()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 0.001} pprint.pprint(time.get_clock_info('time')) {'accuracy': 0.0156000999, 'function': 'GetSystemTimeAsFileTime()', 'is_adjusted': True, 'is_monotonic': False, 'resolution': 1e-07} Some remarks: - these 4 platforms provide a monotonic clock - these 4 platforms provide the accurary of the 4 clocks (it looks like Linux is cheating) - on OpenBSD, time.highres() resolution is not so high. It has only an accuracy of 10 ms. - as expected, the accuracy is very different from the resolution in some cases (ex: 0.0156 vs 1e-07 for time.time() on Windows) -- Added file: http://bugs.python.org/file25103/pep418-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14341] sporadic (?) test_urllib2 failures
Stefan Krah stefan-use...@bytereef.org added the comment: This occurs quite frequently now. In the latest build four bots show this error. http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/5605/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/2158/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/6294/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/1911/steps/test/logs/stdio -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14341 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14466] Rip out mq instructions
R. David Murray rdmur...@bitdance.com added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14428] Implementation of the PEP 418
STINNER Victor victor.stin...@gmail.com added the comment: Solaris on x86_64: pprint.pprint(time.get_clock_info('clock')) {'accuracy': 1e-06, 'function': 'clock()', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-06} pprint.pprint(time.get_clock_info('highres')) {'accuracy': 2e-09, 'function': 'clock_gettime(CLOCK_HIGHRES)', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('monotonic')) {'accuracy': 2e-09, 'function': 'clock_gettime(CLOCK_HIGHRES)', 'is_adjusted': False, 'is_monotonic': True, 'resolution': 1e-09} pprint.pprint(time.get_clock_info('time')) {'accuracy': 0.01, 'function': 'clock_gettime(CLOCK_REALTIME)', 'is_adjusted': True, 'is_monotonic': False, 'resolution': 1e-09} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2377] Replace __import__ w/ importlib.__import__
Changes by Brett Cannon br...@python.org: Added file: http://bugs.python.org/file25104/0fdf350657e3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14428] Implementation of the PEP 418
STINNER Victor victor.stin...@gmail.com added the comment: TODO (pep418-3.patch): - Use CLOCK_HIGHRES on Solaris - Maybe implement gethrtime() for Solaris -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2377] Replace __import__ w/ importlib.__import__
Brett Cannon br...@python.org added the comment: OK, everyone's code review comments have been addressed. That means I have test_pydoc still failing (and that won't get fixed until ImportError grows a module_name attribute; issue #1559549) and test_trace (it doesn't like frozen modules). I also have not plugged the memory leaks that Antoine pointed out (but then again I'm not sure where they might be considering how many people have gone over this code and not spotted a leak that I have not fixed). I also have not dealt with python -v or Windows registry imports. But once everything but the memory leaks are done I will generate a massive patch and commit to default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14440] Close background process if IDLE closes abnormally.
Roger Serwy roger.se...@gmail.com added the comment: This bug is related to issue12540. The approach taken there is to have the IDLE frontend explicitly kill the subprocess. It's a band-aid to the problem that run.py doesn't exit when the socket to the IDLE frontend closes (either by shell restart or kill -9 on IDLE). Attached is a patch to cause the subprocess to exit. I have to admit not fully understanding why it works (on Ubuntu 11.04). It looks like the following code in _getresponse() in rpc.py is what keeps the subprocess running: cvar.acquire() while myseq not in self.responses: cvar.wait() I also tried disabling the terminate_subprocess in PyShell.py. With that change, the subprocess does not terminate on a shell restart (unless my patch is applied). Andrew, Terry: What are your thoughts? -- keywords: +patch Added file: http://bugs.python.org/file25105/issue14440.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14440 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue802310] tkFont may reuse font names
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- assignee: - asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue802310 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com