[issue16113] Add SHA-3 (Keccak) support
Aaron Gallagher added the comment: As long as the reference Keccak code is going to live in the python stdlib anyway, I would /greatly/ appreciate it if the Keccak sponge function was directly exposed instead of just the fixed parameters used for SHA-3. A Keccak sponge can have a much wider range of rates/capacities, and after absorption can have any number of bytes squeezed out. The ability to get an unbounded number of bytes out is very useful and I've written some code that uses that behavior. I ended up having to write my own Keccak python library since none of the other SHA-3 libraries exposed this either. -- nosy: +habnabit ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17902] Document that _elementtree C API cannot use custom TreeBuilder for iterparse or IncrementalParser
Aaron Oakley added the comment: So sorry, I just found the emails from the bug tracker in my spam folder. Anyhow, I've now signed the CLA. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18203] Replace direct calls to malloc() with PyMem_Malloc() or PyMem_RawMalloc()
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18005] faster modular exponentiation in some cases
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18005 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18054] Add more exception related assertions to unittest
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17901] _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None
New submission from Aaron Oakley: When the _elementtree module is in use, the TreeBuilder class will raise an IndexError in treebuilder_handle_end if __init__ was passed None. I discovered this while writing a subclass of TreeBuilder with a modified __init__ method that delegated to TreeBuilder: class MyTreeBuilder(ET.TreeBuilder): def __init__(self, element_factory=None): super().__init__(element_factory) Used as a target, this class (and also simply TreeBuilder(None)) will cause the IndexError when parser.feed(data) is called. import xml.etree.ElementTree as ET parser = ET.XMLParser(target=ET.TreeBuilder(None)) parser.feed('fileline22/line/file') Traceback (most recent call last): File stdin, line 1, in module IndexError: pop from empty stack The error is raised from treebuilder_handle_end, but the cause appears to be in treebuilder_handle_start. if (self-element_factory) { node = PyObject_CallFunction(self-element_factory, OO, tag, attrib); } else { node = create_new_element(tag, attrib); } I included a patch adding a check against Py_None to the if test above which seems to fix the issue. I also included a simple test case for it. -- components: XML files: _elementtree.c-340a0.patch keywords: patch messages: 188326 nosy: Aaron.Oakley priority: normal severity: normal status: open title: _elementtree.TreeBuilder raises IndexError on end if constructed with element_factory=None type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30117/_elementtree.c-340a0.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17901 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17902] Document that _elementtree C API cannot use custom TreeBuilder for iterparse or IncrementalParser
New submission from Aaron Oakley: It would really help to document that the C API can only use the default xml.etree.ElementTree.TreeBuilder for targets with iterparse (and by extension, IncrementalParser). I got a nice surprise about that when I went from 3.2 to 3.3 and started getting TypeError: event handling only supported for ElementTree.TreeBuilder targets. I included a patch to add notes to iterparse and IncrementalParser, but I'm not sure what to refer to the C module as since xml.etree.cElementTree is deprecated. -- assignee: docs@python components: Documentation, XML files: elementtree.rst-340a0.patch keywords: patch messages: 188329 nosy: Aaron.Oakley, docs@python priority: normal severity: normal status: open title: Document that _elementtree C API cannot use custom TreeBuilder for iterparse or IncrementalParser type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file30119/elementtree.rst-340a0.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17413] format_exception() breaks on exception tuples from trace function
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17075] logging documentation for library cleanup
New submission from Aaron Sherman: This documentation states that libraries can turn off logging by adding a NullHandler: http://docs.python.org/2/howto/logging.html#configuring-logging-for-a-library This is not entirely true. It only holds true if the application which calls the library has not called basicConfig on the root logger. If it has, you get logs to both the root logger and the NullLogger, defeating the point of having added a NullLogger in the first place. The correct way for a library to silence log messages is to both set a NullHandler and set propagate to false. For an example of the behavior on the current docs, see: import logging import sys # Application configures its root logger logging.basicConfig(level=logging.DEBUG) # Library configures a NullLogger: logger = logging.getLogger('foo') logger.setLevel(logging.DEBUG) handler = logging.NullHandler() handler.setLevel(logging.DEBUG) logger.addHandler(handler) # Library then logs: logger.warning(BLAH) This example is not terribly interesting, but the more interesting example is when the library configures a real log handler (e.g. in order to create a separate security log in an authorization module). In this case, the log messages will be sent to both the file log and the root logger by default, as long as any part of the application has configured the root logger. IMHO, propagate should always be False for all new loggers, but at the very least the fact that it is True should be documented in the section on library logging... -- assignee: docs@python components: Documentation messages: 180919 nosy: ajs, docs@python priority: normal severity: normal status: open title: logging documentation for library cleanup type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16959] rlcompleter doesn't work if __main__ can't be imported
New submission from Aaron Meurer: The rlcompleter module does not work if __main__ cannot be imported, even though it can be used without it. For example, on the App Engine, __main__ is not usable. If one creates the example app described at https://developers.google.com/appengine/docs/python/gettingstartedpython27/helloworld, and adds import rlcompleter to the top of helloworld.py, you get the following error in the AppEngine Traceback (most recent call last): File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 196, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py, line 255, in _LoadHandler handler = __import__(path[0]) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1766, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1630, in FindAndLoadModule description) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1577, in LoadModuleRestricted description) File /Users/aaronmeurer/Desktop/helloworld/helloworld.py, line 2, in module import rlcompleter File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1766, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1630, in FindAndLoadModule description) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1577, in LoadModuleRestricted description) File /sw/lib/python2.7/rlcompleter.py, line 43, in module import __main__ File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 1766, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py, line 692, in Decorate return func(self, *args, **kwargs) File /Applications
[issue16959] rlcompleter doesn't work if __main__ can't be imported
Aaron Meurer added the comment: For completion, here's the corresponding App Engine issue I opened: http://code.google.com/p/googleappengine/issues/detail?id=8665. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5289] ctypes.util.find_library does not work under Solaris
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7741] Allow multiple statements in code.InteractiveConsole.push
Aaron Iles added the comment: Should a new issue be created to decouple print after every call from the single vs multiple statement condition that is a blocker for this issue? Or can it be resolved here? On Sunday, 9 December 2012, Nick Coghlan wrote: Nick Coghlan added the comment: OK, after a long detour that delved deep into codeop and the vagaries of PyCF_DONT_IMPLY_DEDENT (due to a problem that turned out to be due to a missing \n in a test case I added), my main conclusion is: Coupling the single vs multiple statement decision to the implicit print after every call decision is *really* annoying. The latter should be its own flag *or else* also implied by the DONT_IMPLY_DEDENT flag that is already passed to the compiler by codeop. If *that* gets fixed, then the code module could simply switch over to compiling in exec mode always, without any side effects on the implicit display of expression results. -- ___ Python tracker rep...@bugs.python.org javascript:; http://bugs.python.org/issue7741 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15795] Zipfile.extractall does not preserve file permissions
Aaron Train added the comment: Thanks for the patch. Is this going to be resolved soon? -- nosy: +Aaron.Train ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12890] cgitb displays p tags when executed in text mode
Aaron Iles added the comment: Patch successfully tested on Mac OSX 10.8. No regressions. -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Aaron Iles added the comment: I've updated the patch for the current default branch (to be Python 3.4) and added documentation to the inspect module for the new unwraps function. Functionally unwraps and it's tests are unchanged. -- Added file: http://bugs.python.org/file27790/p13266-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15629] Add to regrtest the ability to run Lib and Doc doctests
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15629 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2716] Reimplement audioop because of copyright issues
Aaron added the comment: The license from http://sox.sourcearchive.com/documentation/12.17.7/g711_8c-source.html /* * This source code is a product of Sun Microsystems, Inc. and is provided * for unrestricted use. Users may copy or modify this source code without * charge. * * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. * * Sun source code is provided with no support and without any obligation on * the part of Sun Microsystems, Inc. to assist in its use, correction, * modification or enhancement. * * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE * OR ANY PART THEREOF. * * In no event will Sun Microsystems, Inc. be liable for any lost revenue * or profits or other special, indirect and consequential damages, even if * Sun has been advised of the possibility of such damages. * * Sun Microsystems, Inc. * 2550 Garcia Avenue * Mountain View, California 94043 */ That seems compatible with Python's licensing, no? It seems like adding this license text to the file and also to the documentation in http://docs.python.org/license.html#licenses-and-acknowledgements-for-incorporated-software would make this a non-issue. Assessment of the module's contents and whether it should be rewritten or removed seems like a separate issue. I could write up a patch if people think that this would solve the problem. -- nosy: +hac.man ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13212] json library is decoding/encoding when it should not
Aaron added the comment: I think it's worth pointing out that both Firefox and Chrome support the non-standard JSON that Python supports (serializing and deserializing basic types). I'm guessing that communicating with web browsers is the vast majority of JSON IPC. That is to say, supporting the de-facto standard implemented by web browsers may be better than adhering to the exact specifications of the RFC. Maybe someone else wants to check what IE, Safari, Opera, and the various phone browsers allow as that might influece the discussion one way or another. -- nosy: +hac.man ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15882] _decimal.Decimal constructed from tuple
Aaron added the comment: I did not encounter this in a regular application. I do use the decimal module, and was excited to see the adoption of a faster C version, so I was just reading through the code to see how it worked. I can't think of a situation where I would need to construct a decimal from a tuple and not a string or some other numeric type, though. For what it's worth, I think that as long as construction from tuples is supported, Decimal(d.as_tuple()) should work for all Decimal objects d. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15882] _decimal.Decimal constructed from tuple
New submission from Aaron: I think I may have found a problem with the code that constructs Infinity from tuples in the C _decimal module. # pure python (3.x or 2.x) decimal.Decimal( (0, (0, ), 'F')) Decimal('Infinity') # _decimal decimal.Decimal( (0, (0, ), 'F')) Traceback (most recent call last): File stdin, line 1, in module decimal.InvalidOperation: [class 'decimal.ConversionSyntax'] Also, there is no unit test coverage for constructing these special values from tuples either. I have provided some that pass with the existing pure python code and with the modifications to the _decimal C code. The unit tests can be applied to Python 2.7.x as well, if desired. They would go in the ExplicitConstructionTest.test_explicit_from_tuples() method. -- components: Extension Modules files: _decimal.diff keywords: patch messages: 170017 nosy: hac.man priority: normal severity: normal status: open title: _decimal.Decimal constructed from tuple versions: Python 3.3 Added file: http://bugs.python.org/file27144/_decimal.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15475] Correct __sizeof__ support for itertools
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15490] Correct __sizeof__ support for StringIO
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15436] __sizeof__ is not documented
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15696] Correct __sizeof__ support for mmap
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15695] Correct __sizeof__ support for StgDict
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15695 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15513] Correct __sizeof__ support for pickle
Changes by Aaron Iles aaron.i...@gmail.com: -- nosy: +aliles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15513 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs
Aaron Iles added the comment: I've submitted a patch which adds a section to the code module's documentation on overriding console output. It attempts to catalogue when sys.stderr, sys.excepthook and sys.displayhook are used to print console output. -- keywords: +patch nosy: +aliles Added file: http://bugs.python.org/file27014/p1346072775.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12403 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15762] Windows 8 certification
Aaron Galea added the comment: Its a distutils issue not py2exe. Not sure where I should post about this problem. The change I applied was in msvc9compiler.py in distutils. Once this change has been applied py2exe was rebuild to generate the correct runw.exe with the correct settings in the PE header of the executable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15762 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15762] Windows 8 certification
New submission from Aaron Galea: Hi We have an application created with python2.7 and created into an executable using py2exe. However we are getting an issue with Windows 8 certification due to compiler parameters. We would like to have this application Windows 8 certified but we can't get pass the following warning: === Windows security features test WARNING Binary analyzer • Warning: The binary analyzer test detected the following errors: ◦File C:\Program Files (x86)\TestApp\test.exe has failed the DBCheck check. ◦File C:\Program Files (x86)\TestApp\test.exe has failed the NXCheck check. • Impact if not fixed: If the app doesn’t use the available Windows protections, it can increase the vulnerability of customer's computer to malware. • How to fix: Apply the SAFESEH, DYNAMICBASE, and NXCOMPAT options when you link the app. See link below for more information: Fixing Binary Analyzer Errors In order to fix this issue I had to modify the file msvc9compiler.py by changing the following line from: self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO'] to self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO', '/DYNAMICBASE', '/SAFESEH', '/NXCOMPAT'] and rebuild py2exe. Once I have done this the test passed. I could go about it by having local patch available to my team but preferably I try to avoid patching the standard python modules. My question is if there is another way to do this? and whether it would be a good idea to include these flags in future distutils? -- assignee: eric.araujo components: Distutils messages: 168859 nosy: agale031176, eric.araujo, tarek priority: normal severity: normal status: open title: Windows 8 certification type: enhancement versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15762 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15542] Documentation incorrectly suggests __init__ called after direct __new__ call
New submission from Aaron Staley: The documentation for __new__ at http://docs.python.org/reference/datamodel.html#object.__new__ is: object.__new__(cls[, ...]) Called to create a new instance of class cls. __new__() is a static method (special-cased so you need not declare it as such) that takes the class of which an instance was requested as its first argument. The remaining arguments are those passed to the object constructor expression (the call to the class). The return value of __new__() should be the new object instance (usually an instance of cls). Typical implementations create a new instance of the class by invoking the superclass’s __new__() method using super(currentclass, cls).__new__(cls[, ...]) with appropriate arguments and then modifying the newly-created instance as necessary before returning it. If __new__() returns an instance of cls, then the new instance’s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to __new__(). If __new__() does not return an instance of cls, then the new instance’s __init__() method will not be invoked. __new__() is intended mainly to allow subclasses of immutable types (like int, str, or tuple) to customize instance creation. It is also commonly overridden in custom metaclasses in order to customize class creation. The problem is in this line: If __new__() returns an instance of cls, then the new instance’s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to __new__(). This is only true in the context of a constructor. In particular, directly calling cls.__new__(cls) will NOT call __init__. If I define a class: class C(object): def __new__(*args, **kwargs): print 'new', args, kwargs return object.__new__(*args,**kwargs) def __init__(self): print 'init' C() will result in __new__ and __init__ being both executed, but C.__new__(C) will only create the instance of C; it will not call __init__! The original documentation described in http://bugs.python.org/issue1123716 was more correct: __new__ must return an object... If you return an existing object, the constructor call will still call its __init__ method unless the object is an instance of a different class... That is __init__ is only being called in the context of an external constructor call. Proposed phrasing: If __new__() is invoked during object construction (cls()) and it returns an instance of cls, then the new instance’s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to the object constructor. -- assignee: docs@python components: Documentation messages: 167267 nosy: Aaron.Staley, docs@python priority: normal severity: normal status: open title: Documentation incorrectly suggests __init__ called after direct __new__ call versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15542 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4640] optparse doesn’t disallow adding one-dash long options (“-option”)
Aaron hacm...@gmail.com added the comment: I came across this bug report and was unable to reproduce the described behavior. I wrote a few test cases demonstrating that the behavior is indeed correct. It passes both against 2.5.2 (the version described in the report) and the lastest 2.7. The relevant code is line 602 of optparse.py in the function Option._set_opt_strings(). I believe this bug can be closed. -- keywords: +patch nosy: +hac.man Added file: http://bugs.python.org/file26338/test_optparse.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14938] 'import my_pkg.__init__' creates duplicate modules
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14938 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems
Aaron Staley usaa...@gmail.com added the comment: Hi Eric, Quick rundown: There are template 'exe' inside distutils/command. bdist_wininst appends to the template to build a customized installer. First the 64 bit bug: http://bugs.python.org/issue6792 With that bug active, I must be able to make 64 bit windows installers for users of 64 bit windows python to install my package. Unfortunately, the only 64 bit template is wininst-9.0-amd64.exe. Due to this bug, there is no way to use that installer, preventing one from creating universal windows installers on *nix, which bdist_wininst is supposed to allowed (per documentaiton). Furthermore, I have empirically found that a 32-bit installer built against wininst-6.0 will not behave correctly either. Specifically, the pre-install-script I used would not execute. When I switched to the wininst-9.0 template, all worked fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems
New submission from Aaron Staley usaa...@gmail.com: On a *nix system, bdist_wininst.get_exe_bytes will always return an open wininst-6.0.exe. However, Windows python2.7 is compiled against msvc 9.0 and ideally would take an installer based on wininst-9.0.exe. Windows-64bit needs an installer based on wininst-9.0-amd64.exe. The ideal solution would be for bdist_wininst to take an option what template exe to be used. While I've monkey-patched things on my own, I'm not providing a patch as I'm not sure how the community wants to handle this (it could be anywhere from the exe name to tables being driven by target_version and some some 64bit option) -- assignee: eric.araujo components: Distutils messages: 161313 nosy: Aaron.Staley, eric.araujo, tarek priority: normal severity: normal status: open title: No option to run bdist_wininst against newer msvc versions on non-windows systems versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems
Aaron Staley usaa...@gmail.com added the comment: Sorry, minor correction: We could just rely on plat_name for 64bit. All that is needed is for this table: if self.target_version 2.4: bv = 6.0 else: bv = 7.1 to be updated to python2.7 (9.0 for python2.7) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
Aaron Staley usaa...@gmail.com added the comment: I was looking over this patch (as it relates to my bug report: http://bugs.python.org/issue14877?@ok_message=msg%20161314%20created%3Cbr%3Eissue%2014877%20message_count%2C%20messages%20edited%20ok@template=item) and noticed that this line: +if (not self.distribution.has_ext_modules() and +not self.distribution.has_c_libraries()): +basename = %s.%s % (fullname, win32) I feel it may be better to insert plat_name there if it exists. That way, users can create installers targeted for win-amd64. Why is this needed for a pure python packages? This bug: http://bugs.python.org/issue6792 -- nosy: +Aaron.Staley ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14573] json iterencode can not handle general iterators
New submission from Aaron Staley usaa...@gmail.com: The json library's encoder includes a function called 'iterencode'. iterencode allows for encoding to be streamed; as tokens are produced they are yielded. This allows for the encoded object to be streamed to a file, over a socket, etc. without being placed all into memory. Unfortunately, iterencode cannot encode general iterators. This significantly limits the usefulness of the function. For my use case I wish to convert a large stream (iterator) of objects into json. Unfortunately, I currently have to: A. Bring all the objects into memory by encasing the iterator in a list() B. Make a hack where I subclass list and making that object's __iter__ function return my desired iterator. The problem is that the json library explicitly checks for something being a list: if isinstance(value, (list, tuple)): chunks = _iterencode_list(value, _current_indent_level) It would work just as well (and be more pythonic) to see if the value supports the iterator protocol: if isinstance(value, collections.Iterable): chunks = _iterencode_list(value, _current_indent_level) Erroring example: import json e = json.JSONEncoder() r = xrange(20) gen = e.iterencode(r) generator object _iterencode at 0x14a5460 next(gen) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.2/json/encoder.py, line 419, in _iterencode o = _default(o) File /usr/lib/python3.2/json/encoder.py, line 170, in default raise TypeError(repr(o) + is not JSON serializable) TypeError: xrange(0, 20) is not JSON serializable -- components: Library (Lib) messages: 158239 nosy: Aaron.Staley priority: normal severity: normal status: open title: json iterencode can not handle general iterators versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14537] Fatal Python error: Cannot recover from stack overflow. with SymPy test suite
New submission from Aaron Meurer asmeu...@gmail.com: Recently, after a small seemingly unrelated refactoring, the SymPy test suite in Python 3 started dying with Fatal Python error: Cannot recover from stack overflow. Here's how to reproduce the error git clone git://github.com/sympy/sympy.git # Clone the development version of SymPy cd sympy git checkout 0856119bd7399a416c21e1692855a1077164f21c # This is the first commit to exhibit the problem. Do this in case we make an unrelated change that removes the problem. ./bin/use2to3 # Convert the codebase to Python 3 python3 py3k-sympy/setup.py test # Run the tests The issue is described in more detail at http://groups.google.com/group/sympy/browse_thread/thread/f664fe88e6b4f29d/3a44691c945695db#3a44691c945695db. Some key points: - The test that triggers the error is an XFAIL test (test that is expected to fail) that raises RuntimeError: maximum recursion depth exceeded. - The change that caused the error, 0856119bd7399a416c21e1692855a1077164f21c (see https://github.com/sympy/sympy/commit/0856119bd7399a416c21e1692855a1077164f21c), is seemingly unrelated. The only thing that I can think of is that it has added another call to the stack. - This kills Python with Abort Trap: 6 in Mac OS X, which generates a problem report to be sent to Apple. I have included a copy of it here: https://gist.github.com/2317869. - Others have reproduced this error as well, as can be seen by our test reporter tool. See the mailing list thread for more info. - I tested this in 3.2.3r2, and the error still occurred. I tried testing in the 3.3 alpha, but I could not get it to compile. -- messages: 157876 nosy: Aaron.Meurer priority: normal severity: normal status: open title: Fatal Python error: Cannot recover from stack overflow. with SymPy test suite type: crash versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14537 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14537] Fatal Python error: Cannot recover from stack overflow. with SymPy test suite
Aaron Meurer asmeu...@gmail.com added the comment: We do have a stack overflow, but this should be raising a RuntimeError, not killing Python. The way it is now, Python dies completely with abort trap 6 (hence the Mac OS X problem report). Sorry if I didn't make this clear in the OP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14537 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14537] Fatal Python error: Cannot recover from stack overflow. with SymPy test suite
Aaron Meurer asmeu...@gmail.com added the comment: No it does not. SymPy is a pure Python library. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14537 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: Unfortunately, my application is running so slow under valgrind that behavior is changing, namely the sockets are all timing out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: I see no invalid read/write. Only warnings are some conditional jump depends on uninitialized value in pycrypto's libraries very early on though. The link seems to be a different bug from mine. I did test in python 2.6.7 and the crash still occurs. (I also never get a segfault on my system with the link's test case - perhaps that only occurs in osx?) To do the async exception, I use ctypes.pythonapi.PyThreadState_SetAsyncExc in python itself. This is relatively rarely used however. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: BTW, I take back what I said about using PyThreadState_SetAsyncExc. Turns out I had a bug where this function would never succeed (was always returning 0). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: Active extension modules are MySQL-python, numpy, and crypto. Here is the output from the non-optimized debug build. Slightly different trace, but still some sort of deallocator crashing AFAIK: #0 0x0046247c in _Py_ForgetReference (op= Channel(origin_addr=None, in_window_size=65536, in_window_threshold=6553, lock=thread.lock at remote 0x571bf90, _pipe=None, eof_received=0, in_max_packet_size=34816, out_buffer_cv=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x571bf90, acquire=built-in method acquire of thread.lock object at remote 0x571bf90, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x571bf90) at remote 0x593d3e0, event=_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x59138b0, acquire=built-in method acquire of thread.lock object at remote 0x59138b0, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x59138b0) at remote 0x5a333e0) at remote 0x593ded0, transport=Transport(_Thread__ident=140009885591296, host_key_type='ssh-rsa', _channels=ChannelMap(_lock=thread.lock at remote 0x5928f90, _map=WeakValueDictionary(_re...(truncated)) at Objects/object.c:2220 #1 0x004624ed in _Py_Dealloc (op= Channel(origin_addr=None, in_window_size=65536, in_window_threshold=6553, lock=thread.lock at remote 0x571bf90, _pipe=None, eof_received=0, in_max_packet_size=34816, out_buffer_cv=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x571bf90, acquire=built-in method acquire of thread.lock object at remote 0x571bf90, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x571bf90) at remote 0x593d3e0, event=_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x59138b0, acquire=built-in method acquire of thread.lock object at remote 0x59138b0, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x59138b0) at remote 0x5a333e0) at remote 0x593ded0, transport=Transport(_Thread__ident=140009885591296, host_key_type='ssh-rsa', _channels=ChannelMap(_lock=thread.lock at remote 0x5928f90, _map=WeakValueDictionary(_re...(truncated)) at Objects/object.c:2240 #2 0x00442244 in list_dealloc (op=0x66d7ab0) at Objects/listobject.c:309 #3 0x004624fa in _Py_Dealloc (op= [Channel(origin_addr=None, in_window_size=65536, in_window_threshold=6553, lock=thread.lock at remote 0x571bf90, _pipe=None, eof_received=0, in_max_packet_size=34816, out_buffer_cv=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x571bf90, acquire=built-in method acquire of thread.lock object at remote 0x571bf90, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x571bf90) at remote 0x593d3e0, event=_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x59138b0, acquire=built-in method acquire of thread.lock object at remote 0x59138b0, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x59138b0) at remote 0x5a333e0) at remote 0x593ded0, transport=Transport(_Thread__ident=140009885591296, host_key_type='ssh-rsa', _channels=ChannelMap(_lock=thread.lock at remote 0x5928f90 , _map=WeakValueDictionary(_r...(truncated)) at Objects/object.c:2241 #4 0x00448bc4 in listiter_next (it=0x5d1c530) at Objects/listobject.c:2917 #5 0x004ce425 in PyEval_EvalFrameEx (f= Frame 0x7f56a050aea0, for file /usr/lib/python2.7/dist-packages/paramiko/transport.py, line 1586, in run (self=Transport(_Thread__ident=140009885591296, host_key_type='ssh-rsa', _channels=ChannelMap(_lock=thread.lock at remote 0x5928f90, _map=WeakValueDictionary(_remove=function at remote 0x56355a0, data={}) at remote 0x5939588) at remote 0x5912bc0, lock=thread.lock at remote 0x5928d60, _Thread__started=_Event(_Verbose__verbose=False, _Event__flag=True, _Event__cond=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x521ff40, acquire=built-in method acquire of thread.lock object at remote 0x521ff40, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x521ff40) at remote 0x5223300) at remote 0x47f56f0, _channel_counter=22, active=False, _preferred_compression=('none',), server_object=None, kex_engine=None, log_name='paramiko.transport', _x11_handler=None, remote_compression='none', _Thread__initiali zed=True, server_accepts=[], s...(truncated), throwflag=0) at Python/ceval.c:2497 #6 0x004d41c3 in fast_function (func=function at remote 0x4716300, pp_stack=0x7f56977ed400, n=1, na=1, nk=0) at Python/ceval.c:4099 #7
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: As far as I can tell, no other thread is active. Their backtraces are all either: #0 0x7f283dedd300 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x00519295 in PyThread_acquire_lock (lock=0xe7dd50, waitflag=1) at Python/thread_pthread.h:321 #2 0x004c734f in PyEval_RestoreThread (tstate=0xfbfb40) at Python/ceval.c:357 or Thread 77 (Thread 0x7f2808fb1700 (LWP 30292)): #0 0x7f283d57a773 in poll () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x7f283c458739 in internal_select (s=0x7f2831432ca0, writing=0) at /root/python2.7-2.7.2/Modules/socketmodule.c:692 #2 0x7f283c45acdf in sock_recv_guts (s=0x7f2831432ca0, cbuf=0x339bf7c \313\313\313\313\313\313\313\313\313\313\313\313\313\313\313, incomplete sequence \313, len=16, flags=0) at /root/python2.7-2.7.2/Modules/socketmodule.c:2356 (More stack frames follow...) or Thread 17 (Thread 0x7f2829ff3700 (LWP 19252)): #0 0x7f283d57f913 in select () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x7f283d2a1fac in floatsleep (secs=0) at /root/python2.7-2.7.2/Modules/timemodule.c:943 #2 0x7f283d2a0cd9 in time_sleep (self=0x0, args=(float at remote 0xb3ed40,)) at /root/python2.7-2.7.2/Modules/timemodule.c:206 (More stack frames follow...) or Thread 12 (Thread 0x7f2834e5f700 (LWP 19223)): #0 0x7f283d57f913 in select () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x7f2839cb275e in select_select (self=0x0, args=([_socketobject at remote 0x7f2830f4d1a0, _socketobject at remote 0x2106ec0], [], [], float at remote 0x7f283034d510)) at /root/python2.7-2.7.2/Modules/selectmodule.c:278 #2 0x0055f0ee in PyCFunction_Call (func=built-in function select, arg=([_socketobject at remote 0x7f2830f4d1a0, _socketobject at remote 0x2106ec0], [], [], float at remote 0x7f283034d510), kw=0x0) at Objects/methodobject.c:81 (More stack frames follow...) Unfortunately, I've only been able to produce the segfault with this program (an EC2 server monitor and deployer). It's very site specific and couldn't run on another machine. That said, I can trigger these segfaults with high reliability, so I can certainly add additional debugging logs if requested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: I should note that my program is also affected by this bug: http://bugs.python.org/issue13817 (couldn't isolate it until I used the pydebug configure info). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: Used latest mercurial 2.7 branch and segfault still occurs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: Also, the only particular things by code does is have a lot of threads (100+), holds open many ssh connections (with paramiko) and I do occasionally use PyThreadState_SetAsyncExc to asynchronously terminate threads. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13992] Segfault in PyTrash_destroy_chain
New submission from Aaron Staley usaa...@gmail.com: Am frequently getting segmentation faults with my python program. I am utilizing heavy use of threading and sockets. All sorts of ones are showing in syslog: kernel: [7763578.475590] python[10097]: segfault at 88e5a0 ip 0088e5a0 sp 7f640efd4028 error 15 in python2.7[833000+69000] Feb 11 11:39:41 ip-10-8-197-187 kernel: [7762910.806782] python[6228]: segfault at 16 ip 0016 sp 7fe488fb0028 error 14 in python2.7[40+233000] Feb 11 07:36:09 ip-10-8-197-187 kernel: [7748298.747145] python[11376]: segfault at 16 ip 0016 sp 7f28767ab028 error 14 in python2.7[40+233000] Managed to capture one coredump: Program terminated with signal 11, Segmentation fault. #0 0x0009 in ?? () (gdb) where #0 0x0009 in ?? () #1 0x0046670f in _PyTrash_destroy_chain () at ../Objects/object.c:2448 #2 0x004bd0df in PyEval_EvalCodeEx (co=optimized out, globals=optimized out, locals=optimized out, args=optimized out, argcount=optimized out, kws=optimized out, kwcount=0, defs=0x0, defcount=0, closure= (cell at remote 0x293ef68, cell at remote 0x21c78d8, cell at remote 0x239e168, cell at remote 0x219ef30, cell at remote 0x2397a28, cell at remote 0x2129868, cell at remote 0x2397590, cell at remote 0x2397be8, cell at remote 0x2397fa0)) at ../Python/ceval.c:3264 #3 0x004b6a5b in fast_function (nk=optimized out, na=0, n=optimized out, pp_stack=0x7f778ef9c1b0, func=function at remote 0x20afa28) at ../Python/ceval.c:4117 #4 call_function (oparg=optimized out, pp_stack=0x7f778ef9c1b0) at ../Python/ceval.c:4042 #5 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #6 0x004bcd2d in PyEval_EvalCodeEx (co=0x168f6b0, globals=optimized out, locals=optimized out, args=optimized out, argcount=optimized out, kws=optimized out, kwcount=0, defs=0x169f260, defcount=2, closure= 0x0) at ../Python/ceval.c:3253 #7 0x004b6a5b in fast_function (nk=optimized out, na=3, n=optimized out, pp_stack=0x7f778ef9c3a0, func=function at remote 0x16a00c8) at ../Python/ceval.c:4117 #8 call_function (oparg=optimized out, pp_stack=0x7f778ef9c3a0) at ../Python/ceval.c:4042 #9 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #10 0x004bd325 in PyEval_EvalCodeEx (co=0x168f8b0, globals=optimized out, locals=optimized out, args=optimized out, argcount=optimized out, kws=optimized out, kwcount=5, defs=0x169a6c8, defcount=5, closure= 0x0) at ../Python/ceval.c:3253 #11 0x004b6a5b in fast_function (nk=optimized out, na=1, n=optimized out, pp_stack=0x7f778ef9c590, func=function at remote 0x16a0140) at ../Python/ceval.c:4117 #12 call_function (oparg=optimized out, pp_stack=0x7f778ef9c590) at ../Python/ceval.c:4042 #13 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #14 0x004bcd2d in PyEval_EvalCodeEx (co=0x168a130, globals=optimized out, locals=optimized out, args=optimized out, argcount=optimized out, kws=optimized out, kwcount=0, defs=0x1684d28, defcount=1, closure= 0x0) at ../Python/ceval.c:3253 #15 0x004b6a5b in fast_function (nk=optimized out, na=2, n=optimized out, pp_stack=0x7f778ef9c780, func=function at remote 0x1763758) at ../Python/ceval.c:4117 #16 call_function (oparg=optimized out, pp_stack=0x7f778ef9c780) at ../Python/ceval.c:4042 #17 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #18 0x004b6d77 in fast_function (nk=optimized out, na=optimized out, n=optimized out, pp_stack=0x7f778ef9c8c0, func=function at remote 0x1ebf050) at ../Python/ceval.c:4107 #19 call_function (oparg=optimized out, pp_stack=0x7f778ef9c8c0) at ../Python/ceval.c:4042 #20 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #21 0x004b6d77 in fast_function (nk=optimized out, na=optimized out, n=optimized out, pp_stack=0x7f778ef9ca00, func=function at remote 0xc5f5f0) at ../Python/ceval.c:4107 #22 call_function (oparg=optimized out, pp_stack=0x7f778ef9ca00) at ../Python/ceval.c:4042 #23 PyEval_EvalFrameEx (f=optimized out, throwflag=optimized out) at ../Python/ceval.c:2666 #24 0x004bcd2d in PyEval_EvalCodeEx (co=0xc0d9b0, globals=optimized out, locals=optimized out, args=optimized out, argcount=optimized out, kws=optimized out, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253 #25 0x00448edf in function_call (func=function at remote 0xc5f500, arg= (ProvisionThread(_Thread__ident=140151476573952, _Thread__block=_Condition(_Verbose__verbose=False, _Condition__lock=thread.lock at remote 0x33d2fd0, acquire=built-in method acquire of thread.lock object at remote 0x33d2fd0, _Condition__waiters=[], release=built-in method release of thread.lock object at remote 0x33d2fd0) at remote
[issue13992] Segfault in PyTrash_destroy_chain
Aaron Staley usaa...@gmail.com added the comment: For some more context: Python 2.7.2 Running on Amazon EC2 Linux 3.0.0-14-virtual x86_64 in ubuntu 11.10 170 threads in this particular core dump (another similar crash has 135) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13666] datetime documentation typos
Aaron Maenpaa aa...@maenpaa.ca added the comment: This patch fixes the rzinfo typo as well as the GMT2 issue (GMT +2 should behave exactly the same as GMT +1 with regards to DST, it's base offset should simply be +2 hours instead of +1). This does not; however, address the comment about the first line of the tzinfo.utcoffset(). The fact that tzinfo.utcoffset() should return a timedelta or None is addressed later in the same paragraph, as such I'm not sure the proposed change is an improvement. -- keywords: +patch nosy: +zacherates Added file: http://bugs.python.org/file24161/issue13666.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13666] datetime documentation typos
Aaron Maenpaa aa...@maenpaa.ca added the comment: Looks like the issue of the first line of utcoffsect was also raised in issue 8810. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12005] modulo result of Decimal differs from float/int
Aaron Maenpaa aa...@maenpaa.ca added the comment: Here is a patch that adds an explination for the difference in the behaviour to the FAQ section of the Decimal documentation. -- keywords: +patch nosy: +zacherates Added file: http://bugs.python.org/file24162/issue12005.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12005 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13730] Grammar mistake in Decimal documentation
New submission from Aaron Maenpaa aa...@maenpaa.ca: In the sentance: In contrast, numbers like 1.1 and 2.2 do not have an exact representations in binary floating point. there is a mismatch in number between an and representations. I suggest removing an to make the whole thing plural. A patch is attached. -- assignee: docs@python components: Documentation files: plural.diff keywords: patch messages: 150813 nosy: docs@python, zacherates priority: normal severity: normal status: open title: Grammar mistake in Decimal documentation versions: Python 3.3 Added file: http://bugs.python.org/file24164/plural.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13731] Awkward phrasing in Decimal documentation
New submission from Aaron Maenpaa aa...@maenpaa.ca: The paragraph: The exactness carries over into arithmetic. In decimal floating point, 0.1 + 0.1 + 0.1 - 0.3 is exactly equal to zero. In binary floating point, the result is 5.5511151231257827e-017. While near to zero, the differences prevent reliable equality testing and differences can accumulate. For this reason, decimal is preferred in accounting applications which have strict equality invariants. ... has some awkward phrasing to my ear. I've attached a patch with a proposed alternative. -- assignee: docs@python components: Documentation files: rephrase.diff keywords: patch messages: 150814 nosy: docs@python, zacherates priority: normal severity: normal status: open title: Awkward phrasing in Decimal documentation versions: Python 3.3 Added file: http://bugs.python.org/file24165/rephrase.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13587] Correcting the typos error in Doc/howto/urllib2.rst
Aaron Maenpaa aa...@maenpaa.ca added the comment: Here's a patch that makes the WWW-Authenticate headers in howto/urllib2 agree with rfc2617. -- keywords: +patch nosy: +zacherates Added file: http://bugs.python.org/file24166/issue13587.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13731] Awkward phrasing in Decimal documentation
Aaron Maenpaa aa...@maenpaa.ca added the comment: That's fine. I'm not particularly attached to that phrasing. The one thing I would push for is to add a comma to ... decimal is preferred in accounting applications which have strict equality invariants. ... since, as far as I can tell, which have strict equality invariants is supposed to be a parenthetical statement explaining why accounting applications prefer to use decimal arithmetic, rather than a constraints on the preference for decimal arithmetic to only those accounting applications that have strict equality invariants. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13050] RLock support the context manager protocol but this is not documented
Aaron Maenpaa aa...@maenpaa.ca added the comment: Here is a patch that adds an note about using Locks, RLocks, Conditions, and Semaphores as context managers to each of their descriptions as well as a link to the Using locks, conditions, and semaphores in the with statement section. -- keywords: +patch nosy: +zacherates versions: +Python 3.3 Added file: http://bugs.python.org/file24167/issue13050.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13731] Awkward phrasing in Decimal documentation
Aaron Maenpaa aa...@maenpaa.ca added the comment: I can understand what was meant. You're welcome to close the issue. Sorry for the nitpick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13332] execfile fixer produces code that does not close the file
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13060] allow other rounding modes in round()
Aaron Robson shiny.mag...@googlemail.com added the comment: When i run into I have to bodge around it in ways like the below code. I've only ever used round half up, has anyone here even used Bankers Rounding by choice before? For reference here are the other options: http://en.wikipedia.org/wiki/Rounding#Tie-breaking def RoundHalfUp(number): '''http://en.wikipedia.org/wiki/Rounding#Round_half_up 0.5 and above round up else round down. ''' trunc = int(number) fractionalPart = number - trunc if fractionalPart 0.5: return trunc else: ceil = trunc + 1 return ceil -- nosy: +AaronR ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13060 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13106] Incorrect pool.py distributed with Python 2.7 windows 32bit
Aaron Staley usaa...@gmail.com added the comment: Never mind; looks like this functionality was moved to handle_workers. I had inadvertently been testing under a modified pool.py. Sorry for the inconvenience! -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13106] Incorrect pool.py distributed with Python 2.7 windows 32bit
New submission from Aaron Staley usaa...@gmail.com: The multiprocess/pool.py distributed with the Python 2.7.2 Windows Installer is different from the one distributed with the 64 bit windows installer or source tarball - and is buggy. Specifically, see Pool._terminate_pool: def _terminate_pool(cls, taskqueue, inqueue, outqueue, pool, worker_handler, task_handler, result_handler, cache): # this is guaranteed to only be called once debug('finalizing pool') worker_handler._state = TERMINATE task_handler._state = TERMINATE taskqueue.put(None) # THIS LINE MISSING! Without that line, termination may deadlock during Pool._help_stuff_finish. The consequence to the user is the interpreter not shutting down. -- components: Windows messages: 144934 nosy: Aaron.Staley priority: normal severity: normal status: open title: Incorrect pool.py distributed with Python 2.7 windows 32bit versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12942] Shebang line fixer for 2to3
New submission from Aaron Meurer asmeu...@gmail.com: As suggested in this thread in the Python porting list (http://mail.python.org/pipermail/python-porting/2011-September/000231.html), it would be nice if 2to3 had a fixer that translated shebang lines from #! /usr/bin/env python to #! /usr/bin/env python3 Also relevant here is the draft PEP 394 (http://www.python.org/dev/peps/pep-0394/), which apparently is likely to be accepted. -- components: 2to3 (2.x to 3.0 conversion tool) messages: 143749 nosy: Aaron.Meurer priority: normal severity: normal status: open title: Shebang line fixer for 2to3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12942 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable
Changes by Aaron Robson shiny.mag...@googlemail.com: -- nosy: +AaronR ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12006] strptime should implement %V or %u directive from libc
Changes by Aaron Robson shiny.mag...@googlemail.com: -- nosy: +AaronR ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12006 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12664] Path variable - Windows installer
New submission from Aaron Robson shiny.mag...@googlemail.com: One of the main barriers to getting a working development environment for me was having to discover that I needed, learn about and find out how to set up the Path variable in Windows. I propose an option in the installer (perhaps even set to be on by default) to allow the user to choose if they want it to be added to the list or not. My apologies if this has been raised before (my searches in the tracker didn't turn up any similar problems), I am quite new to the issue tracker however. -- components: Installation messages: 141468 nosy: AaronR priority: normal severity: normal status: open title: Path variable - Windows installer type: feature request versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12611] 2to3 crashes when converting doctest using reduce()
Aaron Meurer asmeu...@gmail.com added the comment: Vladimir will need to confirm how to reproduce this exactly, but here is corresponding SymPy issue: http://code.google.com/p/sympy/issues/detail?id=2605. The problem is with the sympy/ntheory/factor_.py file at https://github.com/sympy/sympy/blob/sympy-0.7.1.rc1/sympy/ntheory/factor_.py#L453 (linking to the file from our release candidate, as a workaround is likely to be pushed to master soon). Vladimir, can you confirm that this particular version of the file reproduces the problem? -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12611] 2to3 crashes when converting doctest using reduce()
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12613] itertools fixer fails
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12616] zip fixer fails on zip()[:-1]
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12534] Tkinter doesn't support property attributes
New submission from Aaron Stevens aaron.stev...@molex.com: When using Tkinter in Python 2.6.6, it is impossible to use the new-style properties, as the base classes (Misc, Pack, Place, and Grid) do not use the new style classes. It is easily fixed by changing the class declarations, i.e.: class Misc: becomes class Misc(object): -- components: Tkinter messages: 140148 nosy: bheklilr priority: normal severity: normal status: open title: Tkinter doesn't support property attributes type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12534 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12534] Tkinter doesn't support property attributes
Aaron Stevens aaron.stev...@molex.com added the comment: I forgot add that this is a problem only when inheriting from a Tkinter widget, such as a Frame. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12534 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11314] Subprocess suffers 40% process creation overhead penalty
Aaron Sherman a...@ajs.com added the comment: I think it's still safe to say that high performance applications which need to create many hundreds or thousands of children (e.g. large monitoring systems) will still need another solution that isn't subprocess. That being said, you're right that no one is going to care about the extra overhead of subprocess in a vacuum, and most applications fork one or a very small number of processes at a time and typically end up waiting for orders of magnitude more time for their output than they spend creating the process in the first place. As I said when I opened this issue, I wasn't terribly concerned with most applications. That being said, I can't really submit a full-blown monitoring system against this bug, so the best I could do would something that did lots of os.popens or subprocess.Popens in parallel in a contrived way and see how the performance scales as I tune lots to different values. Sadly, the time I have for doing that needs to be spent writing other code, so I'll leave this closed and let someone else raise the issue in the future if they run into it. I can always build a dispatcher in C and communicate with it via IPC to get around the immediate concern of scalability. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11314] Subprocess suffers 40% process creation overhead penalty
Aaron Sherman a...@ajs.com added the comment: That's why I asked for absolute numbers for the overhead difference. Did you not follow the link in my first post? I got pretty detailed, there. os.popen just calls the popen(3) library call, which just performs a fork/execve and some dup/close in between. subprocess.Popen is implemented in Python, so it doesn't come as a surprise that it's slower in your example. Well, of course. I don't think I was ever trying to claim that os.popen vs. subprocess without a shell was going to compare favorably. I'm not advocating os.popen, here, I'm just trying to figure out where this massive overhead is coming from. I think the answer is just, pure Python is fundamentally slower, and that's not a surprise. Now, if the 3.x subprocess work that was described here, gets back-ported into 2.x and is included with future releases, that will definitely serve to improve the situation, and might well render much of this moot (testing will tell). However, I do think that doing the performance testing before deprecating the previous interface would have been a good idea... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11314] Subprocess suffers 40% process creation overhead penalty
Aaron Sherman a...@ajs.com added the comment: Python 3.2 has a _posixsubprocess: some parts of subprocess are implemented in C. Can you try it? I don't have a Python 3 installation handy, but I can see what I can do tomorrow evening to get one set up and try it out. disagree with the idea that spawning exit 0 subprocesses is a performance critical operation ;) How else would you performance test process creation overhead? By introducing as little additional overhead as possible, it's possible for me to get fairly close to measuring just the subprocess module's overhead. If you stop to think about it, though, this is actually a shockingly huge percent increase. In any process creation scenario I'm familiar with, its overhead should be so small that you could bump it up several orders of magnitude and still not compete with executing a shell and asking it to do anything, even just exit. And yet, here we are. 40% I understand that most applications won't be running massive numbers of external commands in parallel, and that's the only way this overhead will really matter (at least that I can think of). But in the two scenarios I mentioned (monitoring and Web services such as CGI, neither of which is particularly rare), this is going to make quite a lot of difference, and if you're going to deprecate os.popen, I would think that making sure your proposed replacement was at least nearly as performant would be standard procedure, no? I think your analysis is wrong. These mmap() calls are for anonymous memory, most likely they are emitted by the libc's malloc() to get some memory from the kernel. In other words they will be blazingly fast. The mremap might be a bit of a performance hit, but it's true that these calls should not be substantially slowing execution... then again, they might indicate that there's substantial amounts of work being done for which memory allocation is required, and as such may simply be a symptom of the actual problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11314 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2228] Imaplib speedup patch
Aaron Kaplan x348v...@aaronkaplan.info added the comment: Let me clarify. Offlineimap used to ship a modified version of imaplib in its distribution, but eventually the author decided he no longer wanted to maintain his imaplib fork, so he dropped it and went with stock imaplib (at a significant performance penalty). The patch I submitted here is the difference between the forked imaplib circa 2007 and the upstream version it was forked from. The current version of offlineimap is not relevant to this issue, because it no longer contains any imaplib code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10776] os.utime returns an error on NTFS-3G partition
New submission from Aaron Masover amaso...@gmail.com: I'm working with Anki (http://ankisrs.net/) on a linux NTFS-3G partition. Anki requires access to modification times in order to handle its backup files. This works fine on my ext3 partition, but on an NTFS partition accessed with NTFS-3G an error is returned: you...@yinghuochong:/storage/文件/anki/decks$ python -c 'import shutil,os; shutil.copyfile(u\u6f22\u5b57.anki, new.anki); os.utime(new.anki, None)' you...@yinghuochong:/storage/文件/anki/decks$ python -c 'import shutil,os; shutil.copyfile(u\u6f22\u5b57.anki, new.anki); os.utime(new.anki, (1293402264,1293402264))' Traceback (most recent call last): File string, line 1, in module OSError: [Errno 1] Operation not permitted: 'new.anki' Note that passing numbers into os.utime returns an error. -- components: IO messages: 124684 nosy: Aaron.Masover priority: normal severity: normal status: open title: os.utime returns an error on NTFS-3G partition versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10776] os.utime returns an error on NTFS-3G partition
Aaron Masover amaso...@gmail.com added the comment: The Anki author suggested that it was a python bug. However, that example command works on a drive set with different permissions, so this looks more like an NTFS-3G bug. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Issue Tracker issues, and a bug in Python
Hi all, I found a bug in Python 2.7 involving dictionary comprehensions. I repeatedly tried to register on the Issue Tracker (http://bugs.python.org/) but never received a confirmation email, so I still can't log in and post it there. Maybe someone on this list can post it on my behalf: functions = {x : lambda y: x + y for x in xrange(10)} functions[0](0) 9 The expression functions[0](0) should return 0, not 9. It looks like the scope for variable x is shared across the entire dictionary comprehension rather than having separate scope for each generated item. ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
Aaron Sterling aaronasterl...@gmail.com added the comment: FWIW, I also get this behavior on 2.6.5 and there are claims that it occurs on 2.6.4 and 3.1.1. see http://stackoverflow.com/questions/3745221/import-calls-init-py-twice/3745273#3745273 -- nosy: +Aaron.Sterling versions: +Python 2.6 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2090] __import__ with fromlist=
Changes by Aaron Sterling aaronasterl...@gmail.com: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4453] MSI installer shows error message if Compile .py files to bytecode option is selected
Aaron Thomas aaron.tho...@gmail.com added the comment: 3.1, yes, same problem 2.7, I'll check what's 2a? Aaron On Aug 3, 2010 10:00 PM, Terry J. Reedy rep...@bugs.python.org wrote: Terry J. Reedy tjre...@udel.edu added the comment: Can either of you check 2.7/3.1 or 2a? -- nosy: +tjreedy versions: +Python 2.7 -Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4453 ___ -- Added file: http://bugs.python.org/file18370/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4453 ___p3.1, yes, same problembr 2.7, I#39;ll checkbr what#39;s 2a?/p pAaron /p pblockquote type=citeOn Aug 3, 2010 10:00 PM, quot;Terry J. Reedyquot; lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt; wrote:brbrbr Terry J. Reedy lt;a href=mailto:tjre...@udel.edu;tjre...@udel.edu/agt; added the comment:br br Can either of you check 2.7/3.1 or 2a?br br --br nosy: +tjreedybr versions: +Python 2.7 -Python 2.5, Python 2.6, Python 3.0br br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue4453; target=_blankhttp://bugs.python.org/issue4453/agt;br ___br /blockquote/p ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3119] pickle.py is limited by python's call stack
Aaron Gallagher habna...@gmail.com added the comment: Here's a patch that fixes the unit tests. A new test was added that tried to test the C implementation of this though none exists. -- keywords: +patch Added file: http://bugs.python.org/file18073/pickle4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8465] Backreferences vs. escapes: a silent failure solved
Aaron Sherman a...@ajs.com added the comment: Matthew, thank you for replying. I still think the primary issue is the potential for confusion between single digit escapes and backreferences, and the ease with which they could be addressed, but to cover what you said: Quote: the normal way to handle \41 + 1 is \0411 That might be the way dictated by the limitations of escape expansion as it is now, but it's entirely non-intuitive and seems more like the exciting edge cases (and obfuscated code opportunities) in other languages than something Python would be proud of. With \41\e1 you would actually be able to tell, visually that the 1 does not get read by the code which reads the \41. This seems to me to be a serious win for maintainability. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8381] IDLE 2.6 freezes on OS X 10.6
Aaron aaron.the@gmail.com added the comment: I just used the biult in mac softwere -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8465] Backreferences vs. escapes: a silent failure solved
New submission from Aaron Sherman a...@ajs.com: I tested this under 2.6 and 3.1. Under both, the common mistake that I'm sure many others have made, and which cost me quite some time today was: re.sub(r'(foo)bar', '\1baz', 'foobar') It's obvious, I'm sure, to many reading this that the second r was left out before the replacement spec. It's probably obvious that this is going to happen quite a lot, and there are many edge cases which are equally baffling to the uninitiated (e.g. \8, \418 and \) In order to avoid this, I'd like to request that such usage be deprecated, leaving only numeric escapes of the form matched by r'\\[0-7][0-7][0-7]?(?!\d)' as valid, non-deprecated uses (e.g. \01 or \111 are fine). Let's look at what that would do: Right now, the standard library uses escape sequences with \n where n is a single digit in a handful of places like sndhdr.py and difflib.py. These are certainly not widespread enough to consider this a common usage, but certainly those few would have to change to add a leading zero before the digit. OK, so the specific requested feature is that \xxx produces a warning where xxx is: * any single digit or * any invalid sequence of two or three digits (e.g containing 8 or 9) or * any sequence of 4 or more digits ... guiding the user to the more explicit \01, \x01 or, if they intended a literal backslash, the r notation. If you wish to go a step further, I'd suggest adding a no-op escape \e such that: \41\e1 would print !1. Otherwise, there's no clean way to halt the interpretation of a digit-based escape sequence. -- components: Regular Expressions, Unicode messages: 103640 nosy: Aaron.Sherman severity: normal status: open title: Backreferences vs. escapes: a silent failure solved type: feature request versions: Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4453] MSI installer shows error message if Compile .py files to bytecode option is selected
Aaron Thomas aaron.tho...@gmail.com added the comment: I can verify this will all versions of Windows 7, and the versions of python 32 and 64 bit. I install this at my work to many machines, and every one of them crashes when trying to 'compile py scripts to bytecode' during install. I have to left click the setup file after installation (installation fails), and choose 'install' in the windows context menu, then choose 'repair python' for the installation to complete 'successfully'. -- nosy: +Aaron.Thomas versions: +Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8381] New Window Error
New submission from Aaron aaron.the@gmail.com: When ever I try to open a new window or open a saved file in the IDLE (on a mac) it freezes. I am running snow leppord on a very new mac. -- components: IDLE messages: 102987 nosy: aaron.the.cow severity: normal status: open title: New Window Error type: crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7972] Have sequence multiplication call int() or return NotImplemented so that it can be overridden with __rmul__
New submission from Aaron Meurer asmeu...@gmail.com: This works in Python 2.5 but not in Python 2.6. If you do [0]*5, it gives you [0, 0, 0, 0, 0]. I tried getting this to work with SymPy's Integer class, so that [0]*Integer(5) would return the same, but unfortunately, the sequence multiplication doesn't seem to return NotImplemented properly allowing it to be overridden in __rmul__. Overridding in regular __mul__ of course works fine. From sympy/core/basic.py (modified): # This works fine @_sympifyit('other', NotImplemented) def __mul__(self, other): if type(other) in (tuple, list) and self.is_Integer: return int(self)*other return Mul(self, other) # This has no affect. @_sympifyit('other', NotImplemented) def __rmul__(self, other): if type(other) in (tuple, list, str) and self.is_Integer: return other*int(self) return Mul(other, self) In other words, with the above, Integer(5)*[0] works, but [0]*Integer(5) raises TypeError: can't multiply sequence by non-int of type 'Integer' just as it does without any changes. See also my branch at github with these changes http://github.com/asmeurer/sympy/tree/list-int-mul. Another option might be to just have the list.__mul__(self, other) try calling int(other). SymPy has not yet been ported to Python 3, so I am sorry that I cannot test if it works there. -- messages: 99629 nosy: Aaron.Meurer severity: normal status: open title: Have sequence multiplication call int() or return NotImplemented so that it can be overridden with __rmul__ type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7972 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7465] Call to another class's constructor in unittest.TestCase.setUp returns the same instance
New submission from Aaron Altman aa...@tomorrowsfunction.com: Not sure if this is intended behavior. I have a baseClass I'm writing tests for. My test architecture has an instance of this baseClass assigned as a member of TestBaseClass(unittest.TestCase) in TestBaseClass.setUp. The problem occurs when tests in TestBaseClass modify state within the member baseClass instance. I think there should be a fresh new instance of baseClass for every test that gets run, but the old state from the last test is still there. Example code and output from Python 2.6.2 attached. -- components: Library (Lib), Tests files: unittest_doesnt_reinstantiate_members.txt messages: 96189 nosy: awaltman severity: normal status: open title: Call to another class's constructor in unittest.TestCase.setUp returns the same instance versions: Python 2.6 Added file: http://bugs.python.org/file15514/unittest_doesnt_reinstantiate_members.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7465] Call to another class's constructor in unittest.TestCase.setUp returns the same instance multiple times
Changes by Aaron Altman aa...@tomorrowsfunction.com: -- title: Call to another class's constructor in unittest.TestCase.setUp returns the same instance - Call to another class's constructor in unittest.TestCase.setUp returns the same instance multiple times ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7465 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5555] optparse: clarify option concatenation in docs
Aaron Sherman a...@ajs.com added the comment: I'm closing this out, as the previous poster was correct: the module does the right thing, and I misread the documentation. Thanks! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3119] pickle.py is limited by python's call stack
Aaron Gallagher habna...@gmail.com added the comment: Okay, here's a new version for the py3k trunk. I'm assuming that this is not going to make it into 2.x at all, because of the API changes. This patch only touches the python version of the code and adds a unit test for testing whether pickle works with arbitrary nesting depth in test.pickletest. The test is disabled for the C pickle tests currently, since it causes python to run out of stack space and crash. So, does _pickle.Pickler's API need to be changed as well? Right now, pickle._Pickler.dump expects save (and save expects the other save_* methods) to either return None or an iterable, where the iterable yields either None or further iterables. I'm sure it wouldn't be hard to make _pickle.Pickler.dump work the same way, but since C doesn't have generators, I don't know how exactly the API would translate. -- versions: +Python 3.1 -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13654/pickle3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5555] optparse
New submission from Aaron Sherman a...@ajs.com: First off, I want to be clear that this isn't a request for changes to functionality, nor for debate over decisions which have already been made. This is purely a request for correction to mis-statements about the nature and origins of optparse's handling in its documentation. This is an edited-down excerpt form the optparse documentation from: http://docs.python.org/library/optparse.html ... the traditional Unix syntax is a hyphen (“-“) followed by a single letter [...] Some other option syntaxes that the world has seen include: * a hyphen followed by a few letters, e.g. -pf [...] [...] These option syntaxes are not supported by optparse, and they never will be. This is deliberate: the first three are non-standard on any environment[...] While, obviously, optparse is free to choose whatever model of option parsing the developers like, the above text should be removed or corrected. Traditional Unix command-line usage is detailed in the POSIX specification's definition of various utilities and the optparse C function as documented here: http://www.opengroup.org/onlinepubs/009695399/functions/getopt.html which lays out this example: This code accepts any of the following as equivalent: cmd -ao arg path path cmd -a -o arg path path Note that the concatenation of single-character arguments is, in fact, in conformance to the POSIX standard, GNU coding conventions, and Unix best-practices since at least the mid-1980s. This clearly contradicts the statement from Python's documentation. For further reference, see: any Unix or Unix-like system's man 3 getopt http://www.faqs.org/docs/artu/ch10s05.html http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces (which refers back to the POSIX guidelines for the command-line options of a program) any Unix or Unix-like system's man pages for a plethora of core utilities such as rm(1), ls(1), sh(1), cp(1), etc. A more accurate statement would be: optparse has chosen to implement a subset of the GNU coding standard's command line interface guidelines, allowing for both long and short options, but not the POSIX-style concatenation of short options. A rationale for that decision may or may not be included, but I won't presume to write it since I'm not actually privy to that decision-making process. -- assignee: georg.brandl components: Documentation messages: 84103 nosy: ajs, georg.brandl severity: normal status: open title: optparse type: behavior versions: Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4708] os.pipe should return inheritable descriptors (Windows)
Aaron Brady castiro...@gmail.com added the comment: This is currently accomplished in 'multiprocessing.forking' with a 'duplicate' function. Use (line #213): rfd, wfd = os.pipe() # get handle for read end of the pipe and make it inheritable rhandle = duplicate(msvcrt.get_osfhandle(rfd), inheritable=True) Definition (line #192). Should it be included in the public interface and documented, or perhaps a public entry point to it made? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4708] os.pipe should return inheritable descriptors (Windows)
New submission from Aaron Brady castiro...@gmail.com: os.pipe should return inheritable descriptors on Windows. Patch below, test attached. New pipe() returns descriptors, which cannot be inherited. However, their permissions are set correctly, so msvcrt.get_osfhandle and msvcrt.open_osfhandle can be used to obtain an inheritable handle. Docs should contain a note to the effect. 'On Windows, use msvcrt.get_osfhandle to obtain a handle to the descriptor which can be inherited. In a subprocess, use msvcrt.open_osfhandle to obtain a new corresponding descriptor.' --- posixmodule_orig.c 2008-12-20 20:01:38.296875000 -0600 +++ posixmodule_new.c 2008-12-20 20:01:54.359375000 -0600 @@ -6481,8 +6481,12 @@ HANDLE read, write; int read_fd, write_fd; BOOL ok; + SECURITY_ATTRIBUTES sAttribs; Py_BEGIN_ALLOW_THREADS - ok = CreatePipe(read, write, NULL, 0); + sAttribs.nLength = sizeof( sAttribs ); + sAttribs.lpSecurityDescriptor = NULL; + sAttribs.bInheritHandle = TRUE; + ok = CreatePipe(read, write, sAttribs, 0); Py_END_ALLOW_THREADS if (!ok) return win32_error(CreatePipe, NULL); -- components: Library (Lib), Windows files: os_pipe_test.py messages: 78136 nosy: castironpi severity: normal status: open title: os.pipe should return inheritable descriptors (Windows) type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12408/os_pipe_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com