[issue13984] Python2.6 compilation breaking on mips64 bit machine
New submission from Shivam shivam.agar...@aricent.com: Hi All, I am getting follwoing error when compiling Python2.6 on mips 64. Failed to find the necessary bits to build these modules: _bsddb _tkinter bsddb185 bz2dl imageop readline sunaudiodevzlib To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _ctypesdatetime dbm -- components: None messages: 153031 nosy: shivam_python_issues priority: normal severity: normal status: open title: Python2.6 compilation breaking on mips64 bit machine type: compile error versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13960] Handling of broken comments in HTMLParser
Ezio Melotti ezio.melo...@gmail.com added the comment: I'll fix this for 3.x non-strict and then see if it can be backported to 2.7 (there are still other fixes that should be backported to 2.7 before this can be applied). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13984] Python2.6 compilation breaking on mips64 bit machine
Martin v. Löwis mar...@v.loewis.de added the comment: Python 2.6 is in a mode where only security issues get fixed. Please use Python 2.7 or Python 3.2. -- nosy: +loewis resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13984] Python2.6 compilation breaking on mips64 bit machine
Martin v. Löwis mar...@v.loewis.de added the comment: Also understand that this output does not indicate an error. It just means that it couldn't build these modules. Python itself works just fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13960] Handling of broken comments in HTMLParser
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 242b697449d8 by Ezio Melotti in branch '3.2': #13960: HTMLParser is now able to handle broken comments when strict=False. http://hg.python.org/cpython/rev/242b697449d8 New changeset 44366541dd86 by Ezio Melotti in branch 'default': #13960: merge with 3.2. http://hg.python.org/cpython/rev/44366541dd86 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13960] Handling of broken comments in HTMLParser
Ezio Melotti ezio.melo...@gmail.com added the comment: This is now fixed in 3.2/3.3, I'll wait for 2.7 before closing it. On a side note, the empty ! comment doesn't seem to be valid in HTML5. HTMLParser just ignores it, and doesn't report it as an empty comment (so this should be fine). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13985] Menu.tk_popup : menu doesn't disapear when main window is iconified.
New submission from marc dechico marc.dech...@gmail.com: actions do discover the bug with the source I have given: pushing the right button to get the pop-up menu . going out of the popup_menu still pushing the right button. the menu doesn't disapear when releasing the button. and still doesn't disapear when iconnifying the main window. I suppose the pop up_menu should behave in a transient way. when doing such a thing with google-chrome I first have my popup menu disapear and I need to click again to iconify. perhaps we should have the choice and have access to a transient function. -- components: Tkinter files: popupmenu.py messages: 153037 nosy: marc.dechico priority: normal severity: normal status: open title: Menu.tk_popup : menu doesn't disapear when main window is iconified. type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file24474/popupmenu.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13189] New bdist_simple binary distribution format for packaging
Paul Moore p.f.mo...@gmail.com added the comment: I'm writing a PEP, also as a result of Nick's suggestion on python-ideas. I don't think it will be too hard to get the basic framework of the PEP in place. When I'm done, would you like to see it and comment before I post to the wider python-dev, or should I just post it and see what happens? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13986] ValueError: cannot convert float NaN to integer
New submission from Shivam shivam.agar...@aricent.com: Hi Team, Kindly help me in resolving below issue which arises when we do make install as it is show stopper for us. Listing /usr/local/lib/python2.7 ... Compiling /usr/local/lib/python2.7/BaseHTTPServer.py ... Traceback (most recent call last): File /usr/local/lib/python2.7/compileall.py, line 213, in module exit_status = int(not main()) File /usr/local/lib/python2.7/compileall.py, line 200, in main force, rx, quiet): File /usr/local/lib/python2.7/compileall.py, line 50, in compile_dir if not compile_file(fullname, ddir, force, rx, quiet): File /usr/local/lib/python2.7/compileall.py, line 99, in compile_file ok = py_compile.compile(fullname, None, dfile, True) File /usr/local/lib/python2.7/py_compile.py, line 108, in compile timestamp = long(os.fstat(f.fileno()).st_mtime) ValueError: cannot convert float NaN to integer make: *** [libinstall] Error 1 Addtionaly: --- At the time of make below message is flashed as well: Failed to build these modules: datetime dbm -- components: Build messages: 153039 nosy: shivam_python_issues priority: normal severity: normal status: open title: ValueError: cannot convert float NaN to integer type: compile error versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13986] ValueError: cannot convert float NaN to integer
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13986] ValueError: cannot convert float NaN to integer
Shivam shivam.agar...@aricent.com added the comment: Hi Team, I am having this issue on mips 64bit machine running debian. Regards Shivam Agarwal -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 29507a2acdb5 by Ned Deily in branch '2.7': Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building http://hg.python.org/cpython/rev/29507a2acdb5 New changeset 5c784b0f263d by Ned Deily in branch '3.2': Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building http://hg.python.org/cpython/rev/5c784b0f263d New changeset 35bd40b16a91 by Ned Deily in branch 'default': Issue #13590: merge http://hg.python.org/cpython/rev/35bd40b16a91 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2
Ned Deily n...@acm.org added the comment: Éric: I've replied to your review comments in Rietveld. Thanks. Ronald: distutils would not only have to check for gcc-4.2 vs. clang, but also needs to strip -arch ppc from the compiler flags when it is present and it cannot use gcc-4.2. Otherwise you cannot build extensions for the 32-bit python installer on OSX 10.7 with Xcode 4.2. The 32-bit-only installers uses gcc-4.0, not -4.2 and it uses the 10.4u SDK, neither of which is available with Xcode 4.*. The patch does not currently attempt to support building extensions for the 32-bit-only installers. Besides stripping arch ppc, it would also have to substitute an available SDK (10.6 is the oldest SDK shipping with Xcode 4.2). CFLAGS and LDFLAGS would also have to be edited to remove ppc and the use of 10.3 as a deployment target results in warning messages: #warning Building for Intel with Mac OS X Deployment Target 10.4 is invalid even though for simple cases it seems to work. But I think trying to automatically support the 32-bit-only configuration is too intrusive and unnecessary for most users. There are disadvantages to trying to use the old 32-bit-only configuration on newer systems, such as using the older, more broken, or less feature-rich system APIs. One reasonable use case I can think of is for app developers who want to distribute Python-based apps on OS X that run on a range of systems, say 10.4 to 10.7. For those presumably more sophisticated users, documenting the unsupported environment variable settings to override when attempting to build with Xcode 4 should be sufficient. (The safer options of building with Xcode 3 on 10.6 (or earlier) or building their own custom Pythons remain, of course.) W.r.t. the patch: is it really necessary to use a subshell to look for the compiler? I'd either walk os.environ['PATH'] myself or use xcodebuild to locate binaries. I suppose that could be done. I've tried to minimize the performance impact by only performing the check the first time it is needed and caching the result so it's only done once per Python invocation. I'm concerned about the added complexity of getting the PATH parsing and semantics right; I don't know of any Python code in the standard library that does this. My immediate concern is for the imminent code cutoffs for Python 3.2.3 and 2.7.3 so I've committed the patch, updated for other review comments, for them. I'm deferring looking at doing a PATH walk for the 3.3 version of the code which is needed along with corresponding changes to packaging. There also should be some OS X installer README and/or other documentation of this and other 10.7 and 10.6 issues. I'm considering how to handle that. -- priority: release blocker - deferred blocker stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13986] ValueError: cannot convert float NaN to integer
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13982] python returning errorneous value for sqrt
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13987] Handling of broken markup in HTMLParser on 2.7
New submission from Ezio Melotti ezio.melo...@gmail.com: The attached patch fixes a few problems with HTMLParser on 2.7. Instead of raising error when invalid markup is detected, the parser now consumes the invalid input and proceeds. This patch is a partial backport of #1486713. After this two more patches will follow. The first will get rid of errors raised while parsing declarations and should also solve #13576: def unknown_decl(self, data): -self.error(unknown declaration: %r % (data,)) +pass The second will take care of bogus comments (see #13960). Once this is done HTMLParser should be able to parse (almost) everything. I'm planning to commit this before the release of 2.7.3. -- assignee: ezio.melotti components: Library (Lib) files: issue13987.diff keywords: patch messages: 153043 nosy: benjamin.peterson, eric.araujo, ezio.melotti, r.david.murray priority: normal severity: normal stage: patch review status: open title: Handling of broken markup in HTMLParser on 2.7 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file24475/issue13987.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13987] Handling of broken markup in HTMLParser on 2.7
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser
Christophe Kalt k...@taranis.org added the comment: nice, thank you! -- nosy: +kalt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13922] argparse handling multiple -- in args improperly
Christophe Kalt k...@taranis.org added the comment: Hah.. was just about to report this. I'm in the midst of converting a bunch of scripts from optparse to argparse, and this is one of the problems I'm hitting. -- nosy: +kalt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10049] Add a no-op (null) context manager to contextlib
Nick Coghlan ncogh...@gmail.com added the comment: FWIW, it's likely I'll be adding contextlib.ContextStack (see [1]) for 3.3. While it's far from the primary use case, that API also serves as a no-op context manager (if you never register any contexts or callbacks, the __exit__ impl does nothing). [1] http://contextlib2.readthedocs.org/en/latest/index.html#contextlib2.ContextStack -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
Brett Cannon br...@python.org added the comment: The patch looks fine for its current semantics except for the fact that the macro doesn't work under clang; ##macro_var is supposed to be used only when concatenating parts of a string to create a complete identifier, not concatenating two identifiers next to each other (e.g. gooblede##gook is fine, but self-##gook isn't because '-' is its own identifier). But one issue is that for my purposes I need 'name' to be the full name of the module, not just the tail of the full name. The reason is that pydoc needs a way to tell when a module import failed because the module isn't there vs. when a module had an actual error itself. Using the tail end of the name doesn't help me because it means I can't tell if an import of a module named 'bunk' containing the line 'import test.bunk' fails because the module 'bunk' doesn't exist or because the import line failed since in both cases name == 'bunk'. But if name == 'test.bunk' there is no ambiguity. Pydoc used to do this by inspecting the stack and seeing where the exception was thrown which is just nasty and brittle (i.e. doesn't work with importlib since the stack goes much farther until ImportError is thrown). IOW I don't think we should be tossing out valuable data just because historically modules that didn't exist only returned the tail end of the full module name. Anyone object to switching to using the full name of the module triggering the exception? The message wouldn't change to use the full name (unfortunately) for backwards-compatibility reasons of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
Brett Cannon br...@python.org added the comment: And to answer David's joke, I carpool from Toronto to Waterloo four days a week so I have an hour each direction to work on stuff. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10049] Add a no-op (null) context manager to contextlib
Alexander Jones aj.d...@gmail.com added the comment: That's very reassuring. Thanks, Nick! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10049 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13947] gdbm reorganize() leaves hanging file descriptor
Jesús Cea Avión j...@jcea.es added the comment: I can't reproduce. Sorry. Reading the GDBM documentation, all filedescriptors management seem to be inside gdbm, not Python. Anyway, if I can't reproduce, I can not diagnose neither patch. Sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
Brett Cannon br...@python.org added the comment: Oh, and there are no forward declarations for the new functions added to errors.c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
New submission from Eli Bendersky eli...@gmail.com: Following the discussion on python-dev [1], this issue will track the re-organization of Lib/xml/etree to expose the C implementation (_elementtree) by default when importing ElementTree. The test suite will also have to be updated - it's required that it exercises both the C and the Python implementations. I would like to make the import magic simple. Thus, the idea I currently plan to pursue is: * xml/etree/ElementTree.py will be a simple facade that attempts to 'import *' from _elementtree, and on failure does 'import *' from pyElementTree * The current contents of xml/etree/ElementTree.py will move to xml/etree/pyElementTree.py * xml/etree/cElementTree.py disappears. The test suite will be modified accordingly. I'll be working on creating a patch for this. Any help, ideas, comments and discussions are more than welcome. [1] http://mail.python.org/pipermail/python-dev/2012-February/116278.html -- components: Library (Lib) messages: 153052 nosy: effbot, eli.bendersky, flox, scoder priority: normal severity: normal status: open title: Expose the C implementation of ElementTree by default when importing ElementTree versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: Oh, and not to forget: the documentation has to be updated to just not mention cElementTree any longer. For the user, the fact that a fast C library is invoked underneath should be invisible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
Brett Cannon br...@python.org added the comment: Attached is Brian's patch with the macro fix and forward declarations. -- Added file: http://bugs.python.org/file24476/importerror.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Benjamin Peterson benja...@python.org added the comment: So modulo my (small) review comments, David's patches are ready to go in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Stefan Behnel sco...@users.sourceforge.net added the comment: Eli Bendersky, 10.02.2012 15:52: * The current contents of xml/etree/ElementTree.py will move to xml/etree/pyElementTree.py IIRC, there is a well specified way how accelerator modules should be used by Python modules. I recall a lengthy discussion on python-dev (or the py3k list?) back in the old pre-3.0 days, maybe there's even a PEP? * xml/etree/cElementTree.py disappears. Careful with backwards compatibility here. It's the accelerator module (_elementtree.so, IIRC) which is to be moved behind ElementTree.py. I don't see a compelling enough reason to break imports in existing code by removing the cElementTree module, so we should not do that. Stefan -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: Hmm, that may be PEP 399: If an acceleration module is provided it is to be named the same as the module it is accelerating with an underscore attached as a prefix, e.g., _warnings for warnings. The common pattern to access the accelerated code from the pure Python implementation is to import it with an import *, e.g., from _warnings import *. This is typically done at the end of the module to allow it to overwrite specific Python objects with their accelerated equivalents. However, it's hardly a rule, just describing a common pattern. I wonder why this approach is preferable to the one I proposed (explicit facade module)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: IIRC, there is a well specified way how accelerator modules should be used by Python modules. I recall a lengthy discussion on python-dev (or the py3k list?) back in the old pre-3.0 days, maybe there's even a PEP? If there's a convention, I'll happily follow it. It would be great if someone could dig up the relevant details (I'll try to look for them myself). I don't see a compelling enough reason to break imports in existing code by removing the cElementTree module, so we should not do that. Agreed. Perhaps it should just be deprecated? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Stefan Behnel sco...@users.sourceforge.net added the comment: Eli Bendersky, 10.02.2012 16:43: I don't see a compelling enough reason to break imports in existing code by removing the cElementTree module, so we should not do that. Agreed. Perhaps it should just be deprecated? Given that its mere existence is currently almost undocumented (except for one tiny sentence in the docs), I vote for clearly documenting it as deprecated, yes, with a mention to the fact that it's automatically used by xml.etree.ElementTree starting with 3.3. I wouldn't want to see more than that done, though, specifically not a visible warning when it's being imported. There's far too much code out there that uses it in previous Python versions. Such a warning would strike even if it's only being imported conditionally with a try-except, which is the most common way of doing it. So it would hit most users and require an awful lot of code to be touched to fix it, for basically zero benefit. Stefan -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
Brett Cannon br...@python.org added the comment: So I just tried to pass fullname in import.c and it didn't work (of course). Looks like even when I try to use fullname in find_module_path_list() and load_next() it is still leaving out the package name. Ugh. That means either refactoring import.c to get the full name in all places, not get the full name (and thus I'm still screwed), have importlib do something different than import.c in hopes that importlib replaces import.c before this goes public, or add a full_name attribute for importlib to fill in with the full details. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Ezio Melotti ezio.melo...@gmail.com added the comment: A note in the doc is easy to miss IMHO, and since DeprecationWarnings are silenced by default, I don't think they will affect the final users. A different problem is that developers will have to check for the Python version if they want to use ElementTree on Python =3.3 and keep using cElementTree on 3.3 (unless another way is provided). If possible I would avoid pyElementTree, and keep ElementTree that imports from _elementtree and the deprecated cElementTree (until it can be removed). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: If possible I would avoid pyElementTree, I suppose it's possible, but I'm genuinely interested in a technical reason for doing so. The approach suggested in PEP 399 is useful for module in which part of the functionality is implemented in C, and then augmented in Python. ElementTree is different - it's pretty much two separate implementations of the same API. So, I think there's little question in terms of simplicity and clarity. Having pyElementTree and cElementTree (keeping it for backwards compat), and a facade named ElementTree that chooses between them is simple, clean and intuitive. From a performance point of view, consider the (by far) common case - where _elementtree *is* successfully imported. Option 1: from _elementtree import *, at the end of the Python implementation in ElementTree.py - so for each invocation, the whole import of the Python code has to be done, just to reach the overriding import * at the end. Option 2: ElementTree is a facade that attempts to import _elementtree first. So the Python implementation in pyElementTree doesn't even have to be parsed and imported -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Florent Xicluna florent.xicl...@gmail.com added the comment: If possible I would avoid pyElementTree, Me too: - __name__ and __qualname__ would be less confusing - the cElementTree accelerator uses large parts of Python implementation ElementTree is different - it's pretty much two separate implementations of the same API. Not fully separated... there's some python code hidden in the C module. From a performance point of view, consider the (by far) common case - where _elementtree *is* successfully imported. ... for each invocation, the whole import of the Python code has to be done, just to reach the overriding import * at the end. This point is wrong... the _elementtree.c accelerator imports Python ElementTree already. As you can see on lines 2938 to 2945, the change could lead to an import cycle: http://hg.python.org/cpython/file/705b56512287/Modules/_elementtree.c#l2938 Trying to sort this out, it already gives me a headache. I would like to remove the Python bootstrap code from the C module and try to do it differently, in a more standard way. -- stage: - needs patch type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: From a performance point of view, consider the (by far) common case - where _elementtree *is* successfully imported. ... for each invocation, the whole import of the Python code has to be done, just to reach the overriding import * at the end. This point is wrong... the _elementtree.c accelerator imports Python ElementTree already. As you can see on lines 2938 to 2945, the change could lead to an import cycle: http://hg.python.org/cpython/file/705b56512287/Modules/_elementtree.c#l2938 Trying to sort this out, it already gives me a headache. I would like to remove the Python bootstrap code from the C module and try to do it differently, in a more standard way. The Python code inside _elementtree could be moved to Python code, which would then import the Python stuff it needs from pyElementTree. Since pyElementTree doesn't import _elementtree, there will be circular dependencies. So this is a point *in favor* of pyElementTree being pure-Python :-) In other words: In xml/etree there is: - ElementTree: tries to import cElementTree. On success, done. On ImportError, imports pyElementTree - pyElementTree: the pure Python implementation - cElementTree: sets up the bootstrap Python code and tries to import _elementtree. In case of an error, propagates an ImportError up. Would that work? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: Oops, in last message: s/there will be circular dependencies/there will not be circular dependencies/ -- stage: needs patch - type: performance - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Ezio Melotti ezio.melo...@gmail.com added the comment: In xml/etree there is: - ElementTree: tries to import cElementTree. On success, done. On ImportError, imports pyElementTree - pyElementTree: the pure Python implementation - cElementTree: sets up the bootstrap Python code and tries to import _elementtree. In case of an error, propagates an ImportError up. What I had in mind is more like: - ElementTree: defines the python code and if _elementtree is available overrides part of it with the functions imported from it; - cElementTree: at this point it could just be a deprecated alias for ElementTree -- stage: - needs patch type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13989] gzip always returns byte strings, no text mode
New submission from Peter p.j.a.c...@googlemail.com: Consider the following example where I have a gzipped text file, $ python3 Python 3.2 (r32:88445, Feb 28 2011, 17:04:33) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more information. import gzip with gzip.open(ex1.sam.gz) as handle: ... line = handle.readline() ... line b'EAS56_57:6:190:289:82\t69\tchr1\t100\t0\t*\t=\t100\t0\tCTCAAGGTTGTTGCAAGTCTATGTGAACAAA\t7;8;;7;4;;94;\tMF:i:192\n' Notice the file was opened in binary mode (rb is the default for gzip.open which is surprising given t is the default for open on Python 3), and a byte string is returned. Now try explicitly using non-binary reading r, and again you get bytes rather than a (unicode) string as I would expect: with gzip.open(ex1.sam.gz, r) as handle: ... line = handle.readline() ... line b'EAS56_57:6:190:289:82\t69\tchr1\t100\t0\t*\t=\t100\t0\tCTCAAGGTTGTTGCAAGTCTATGTGAACAAA\t7;8;;7;4;;94;\tMF:i:192\n' Now try and use t or rt to be even more explicit that text mode is desired, with gzip.open(ex1.sam.gz, t) as handle: ... line = handle.readline() ... Traceback (most recent call last): File stdin, line 1, in module File /Users/pjcock/lib/python3.2/gzip.py, line 46, in open return GzipFile(filename, mode, compresslevel) File /Users/pjcock/lib/python3.2/gzip.py, line 157, in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') ValueError: can't have text and binary mode at once with gzip.open(ex1.sam.gz, rt) as handle: ... line = handle.readline() ... Traceback (most recent call last): File stdin, line 1, in module File /Users/pjcock/lib/python3.2/gzip.py, line 46, in open return GzipFile(filename, mode, compresslevel) File /Users/pjcock/lib/python3.2/gzip.py, line 157, in __init__ fileobj = self.myfileobj = builtins.open(filename, mode or 'rb') ValueError: can't have text and binary mode at once See also Issue #5148 which is perhaps somewhat related. -- components: None messages: 153067 nosy: maubp priority: normal severity: normal status: open title: gzip always returns byte strings, no text mode versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: What I had in mind is more like: - ElementTree: defines the python code and if _elementtree is available overrides part of it with the functions imported from it; The problem with this is the bootstrap Python code executed by _elementtree. That should not be executed when _elementtree (the C parts) can't be imported. Keeping this code in ElementTree will probably complicate matters since it will add import conditions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13990] Benchmarks: 2to3 failures on the py3 side
New submission from Francisco Martín Brugué franci...@email.de: Steps to reproduce: after following the usage instructions from make_perf3.sh go to the the py3 benchmarks directory and run the lib/2to3 tests (python3.2 test.py). The result are 3 failures and 17 errors. The equivalent procedure in the py2 benchmarks directory succeeds (python2.7 test.py). A summary is attached (the whole paste at http://pastebin.com/PAAhGsdR) Cheers, francis -- assignee: collinwinter components: 2to3 (2.x to 3.x conversion tool), Benchmarks files: FailuresErrors.txt messages: 153069 nosy: collinwinter, francismb priority: normal severity: normal status: open title: Benchmarks: 2to3 failures on the py3 side versions: Python 3.2 Added file: http://bugs.python.org/file24477/FailuresErrors.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13989] gzip always returns byte strings, no text mode
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1559549] ImportError needs attributes for module and file name
R. David Murray rdmur...@bitdance.com added the comment: However you do it, I'm very much in favor of having the full name available. I either wrote or fixed (I can't remember which) that stack walk in pydoc, and you are right, it is very very ugly. This would also be a big benefit for unittest, which currently *doesn't* do the stack walk and therefore generates incorrect error messages when sub-imports fail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1559549 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13961] Have importlib use os.replace()
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13978] OSError exception in multiprocessing module when using os.remove() on NFS
Charles-François Natali neolo...@free.fr added the comment: OSError: [Errno 16] Device or resource busy: '/nfs/tmp/pymp-f7R9S6/.nfse039692f0236' That's because the temporary directory is removed while a file inside is still open. And that's really likely the unix socket used by the server's listener. What happens if you do this instead: import multiprocessing manager = multiprocessing.Manager() manager.shutdown() del manager You should shutdown the manager before it gets garbage collected. (the TMDIR directory is in a nfs server) Bad idea, for the following reasons: - you're actually lucky Linux allows binding unix sockets over NFS filesystems, some Unix flavors don't - you're likely to run into similar problems, because code which removes a temporary directory while having still an open FD is quite common, and will break with a tmp dir over NFS - mkstemp() and friends use O_EXCL to create a temporary file securely, and some NFS implementations of O_EXCL are unsafe (should be OK with NFSv3 and later though) - it's not a good idea performance wise -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13978 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings
Eric Talevich eric.talev...@gmail.com added the comment: Well, this is not the best month for me to try digging into a new codebase... I would not mind if someone else did the patch for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13990] Benchmarks: 2to3 failures on the py3 side
Brett Cannon br...@python.org added the comment: It looks like 2to3 isn't being converted properly. Benjamin, is lib2to3 supposed to work on itself and result in a sane output? If not then the benchmark should probably drop its internal copy of lib2to3. Antoine (since you last looked at the benchmark suite for Python 3), do you know anything about this? -- assignee: collinwinter - benjamin.peterson nosy: +benjamin.peterson, brett.cannon, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13990] Benchmarks: 2to3 failures on the py3 side
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Gregory P. Smith g...@krypto.org added the comment: Thanks for reviewing Benjamin. I'm also reviewing this today. Sorry for the delay! BTW, like Schadenfreude? A hash collision DOS issue fix patch for PHP5 was done poorly and introduced a new security vulnerability that was just used to let script kiddies root many servers all around the web: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0830 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Ezio Melotti ezio.melo...@gmail.com added the comment: - ElementTree: defines the python code and if _elementtree is available overrides part of it with the functions imported from it; The problem with this is the bootstrap Python code executed by _elementtree. This might become unnecessary if ElementTree becomes the main module and _elementtree only contains a few faster functions/classes that are supposed to replace the ones written in Python. So basically you only have a single fully functional Python module (ElementTree) plus an optional C module (_elementtree) that only provides faster replacements for ElementTree. That should not be executed when _elementtree (the C parts) can't be imported. We are assuming that _elementtree might be missing, but what are the cases where this might actually happen? Other implementations like PyPy? Exotic platforms that can't compile _elementtree? Keeping this code in ElementTree will probably complicate matters since it will add import conditions. Wouldn't that as simple as having in ElementTree.py: ... full python code here... ... try: # override a few functions/classes with the faster versions from _elementtree import * except ImportError: # _elementtree is missing, so we just keep the slow versions pass else: # do the rest here if at all needed (e.g. plug the faster # versions in the right places) I'm not familiar with ElementTree (I just looked at the bootstrap bit quickly), so what I'm saying might not be applicable here, but I've seen other modules doing something similar to what I'm proposing (json, heapq, maybe even warning and others). -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13991] namespace packages depending on order
New submission from andrea crotti andrea.crott...@gmail.com: I am not really sure that it is a bug, but for me it's at least not the expected behaviour. In short supposing I have two namespace packages ab and ac (as seen in the tar file), this works perfectly: import sys from os import path sys.path.append(path.abspath('ab')) sys.path.append(path.abspath('ac')) from a.b import api as api_ab from a.c import api as api_ac But this doesn't: import sys from os import path sys.path.append(path.abspath('ab')) from a.b import api as api_ab sys.path.append(path.abspath('ac')) from a.c import api as api_ac And raises an ImportError from a.c import api as api_ac ImportError: No module named c Which means that if you actually append all the paths containing package resources before trying to import something it works, but if you interleave the path mangling, it won't.. Is this a bug or maybe I'm doing something wrong? -- assignee: tarek components: Distutils files: namespace.tar.gz messages: 153076 nosy: andrea.crotti, eric.araujo, tarek priority: normal severity: normal status: open title: namespace packages depending on order versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file24478/namespace.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13198] Remove duplicate definition of write_record_file
Mike Hoy mho...@gmail.com added the comment: I am unable to work on this issue at this time. On Thu, Feb 9, 2012 at 8:57 PM, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: Mike, if you don’t have the time to finish this shortly, I will do it, as I need this fixed for another bug. Just let me know if you’d like to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13198 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Florent Xicluna florent.xicl...@gmail.com added the comment: The first step is to strip out the cElementTree bootstrap code from the C module. I did it in the attached patch (plus removal of obsolete code for copy() in Python 2.4). This passes the unmodified tests test_xml_etree and test_xml_etree_c. Then I think the right approach is to fold completely cElementTree behind ElementTree. The cElementTree alias can be simply declared in Lib/xml/etree/__init__.py. -- keywords: +patch Added file: http://bugs.python.org/file24479/issue13988_prepare_pep399.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13974] packaging: test for set_platform()
Tshepang Lekhonkhobe tshep...@gmail.com added the comment: It indeed was permanent. The new patch fixes the issue. -- Added file: http://bugs.python.org/file24480/test-set-platform-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13619] Add a new codec: locale, the current locale encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: According to the discussion on the python-dev mailing list, such codec would add too much confusion to users and so it is better to not add it. http://mail.python.org/pipermail/python-dev/2012-February/116272.html I close the issue as wont fix. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
STINNER Victor victor.stin...@haypocalc.com added the comment: Review of add-randomization-(...).patch: - there is a missing ) in the doc, near the types covered by the :option:`-R` option (or its equivalent, :envvar:`PYTHONHASHRANDOMIZATION`. - get_hash() in test_hash.py fails completly on Windows: Windows requires some environment variables. Just use env=os.environ.copy() instead of env={}. - PYTHONHASHSEED doc is not clear: it should be mentionned that the variable is ignored if PYTHONHASHRANDOMIZATION is not set - (Python 2.6) test_hash fails because of [xxx refs] in stderr if Python is compiled in debug mode. Add strip_python_stderr() to test_support.py and use it in get_hash(). def strip_python_stderr(stderr): Strip the stderr of a Python process from potential debug output emitted by the interpreter. This will typically be run on the result of the communicate() method of a subprocess.Popen object. stderr = re.sub(br\[\d+ refs\]\r?\n?$, b, stderr).strip() return stderr Except these minor nits, the patches (2.6 and 3.1) looks good. I didn't read the tests patches: just run the tests to test them :-) (Or our buildbots will do the work for you.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13991] namespace packages depending on order
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Jim Jewett jimjjew...@gmail.com added the comment: On Fri, Feb 10, 2012 at 6:02 PM, STINNER Victor - PYTHONHASHSEED doc is not clear: it should be mentionned that the variable is ignored if PYTHONHASHRANDOMIZATION is not set *That* is why this two-envvar solution bothers me. PYTHONHASHSEED has to be a string anyhow, so why not just get rid of PYTHONHASHRANDOMIZATION? Use PYTHONHASHSEED=random to use randomization. Other values that cannot be turned into an integer will be (currently) undefined. (You may want to raise a fatal error, on the assumption that errors should not pass silently.) A missing PYTHONHASHSEED then has the pleasant interpretation of defaulting to 0 for backwards compatibility. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10227] Improve performance of MemoryView slicing
Stefan Krah stefan-use...@bytereef.org added the comment: Kristján, I ran the benchmarks from http://bugs.python.org/issue10227#msg143731 in the current cpython and pep-3118 repos. In both cases the differences between Linux and Windows are far less pronounced than they used to be. All benchmarks were run with the x64 builds. I also ran the profile guided optimization build for Visual Studio. The results are equal to (or better than) the non-pgo gcc results. In my experience Visual Studio relies heavily on PGO for x64 builds. The default optimizer is just not as good as gcc's. If you can reproduce similar results, I think we can close this issue. ./python -m timeit -n 1000 -s x = ((b'x'*1)) x[:100] linux-cpython (4244e4348362): 0.102 usec linux-pep-3118 (memoryview:534f6bbe5422): 0.098 usec windows-cpython: 0.109 usec windows-pep-3118: 0.112 usec usec windows-pep-3118-pgo: 0.103 usec ./python -m timeit -n 1000 -s x = (bytearray(b'x'*1)) x[:100] linux-cpython (4244e4348362): 0.107 usec linux-pep-3118 (memoryview:534f6bbe5422): 0.109 usec windows-cpython: 0.127 usec windows-pep-3118: 0.128 usec windows-pep-3118-pgo: 0.106 usec ./python -m timeit -n 1000 -s x = memoryview(bytearray(b'x'*1)) x[:100] linux-cpython (4244e4348362): 0.127 usec linux-pep-3118 (memoryview:534f6bbe5422): 0.12 usec windows-cpython: 0.145 usec windows-pep-3118: 0.14 usec windows-pep-3118-pgo: 0.0984 usec -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13972] set and frozenset constructors don't accept multiple iterables
Raymond Hettinger raymond.hettin...@gmail.com added the comment: It is present in union and intersection because chained operations are reasonably common. I don't think it makes much sense in the constructors because it doesn't correspond to how people think of (make this a set). -- assignee: - rhettinger nosy: +rhettinger priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13972 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13968] Support recursive globs
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I would like to see this one API remain simple and leave more complex tasks to os.walk et al. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13968 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: Ezio, We are assuming that _elementtree might be missing, but what are the cases where this might actually happen? Other implementations like PyPy? Exotic platforms that can't compile _elementtree? I guess both. To make the stdlib work on PyPy without changes, it has to be able to load the pure Python modules in a fallback. As for platforms that can't compile _elementtree, keep in mind that there's also expat which _elementtree uses, so it's a lot of code to compile. Python works on some embedded systems, I'm not sure all of them can compile this code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13959] Re-implement parts of imp in pure Python
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser
Changes by Éric Araujo mer...@netwok.org: -- assignee: - bethard nosy: +bethard type: - enhancement versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser
Steven Bethard steven.beth...@gmail.com added the comment: The idea and patch seem okay to me. Needs tests though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9750] sqlite3 iterdump fails on column with reserved name
Éric Araujo mer...@netwok.org added the comment: Petri, I think you can go ahead. Lucas, thanks for your help, even though your patch is not used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: Florent, thanks for the patch - at this point code is more useful than talk :-) Anyhow, I tried to apply it and a few tests in test_xml_etree_c fail, because it can't find fromstring and fromstringlist. This gets fixed when I import fromstringlist in cElementTree.py from ElementTree, and in the same file assign: fromstring = XML Which is similar to what ElementTree itself does. In general, I agree that a good first step would be to refactor the code to extract the boostrapping from _elementtree.c to cElementTree.py. As long as the tests pass, this can be committed regardless of this issue's original intent. However, why did you leave some bootstrapping code inside? Can't all of it go away? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13959] Re-implement parts of imp in pure Python
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13981] time.sleep() should use nanosleep() if available
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13123] bdist_wininst uninstaller does not remove pycache directories
Éric Araujo mer...@netwok.org added the comment: So I had a quick look at the code and found the lines in need of a fix. The problem comes as usual from our friend “path + optimize and 'o' or 'c'”. I can read some C, so I tried to replace that with imp.cache_from_source, but a real C programmer should take it from here, especially if they find themselves on Windows so that they can recompile the wininst*.exe file and test the fix :) -- keywords: +patch nosy: +mhammond Added file: http://bugs.python.org/file24481/bdist_wininst-pycache-removal.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation
Éric Araujo mer...@netwok.org added the comment: See also #13123 for the same bug in bdist_wininst. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13953] Get rid of doctests in packaging.tests.test_version
Éric Araujo mer...@netwok.org added the comment: Thanks, I’ve got it from that point. Notes for future patches: - Tests should not check the exact contents of error messages, as they are not part of the language - Don’t use assertEqual(..., True) but assertTrue, or if you’re testing comparisons, use assertGreater and friends (or check the result of sorted(somelist) to compare a bunch of objects at once) -- Added file: http://bugs.python.org/file24482/cleanup-test_version.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12659] Add tests for packaging.tests.support
Éric Araujo mer...@netwok.org added the comment: BTW: in distutils2 I get (not because of this change): Actually I did fix that, but depending on your Python version the conditional in the test may be wrong. What’s the Python version you used? If so, could you provide a patch this time? Done. The patch is against default. packaging is only in default, so yeah :) Thanks. what about against distutils2? Do you need also a patch for it? I can port from p7g to d2, no worries. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13491] Fixes for sqlite3 doc
Éric Araujo mer...@netwok.org added the comment: No examples included in the documentation now require createdb.py to be run. Cool! These fixes should make it to 2.7 too; I can propose a patch if you don’t want to backport yourself. In the Doc/includes/sqlite3 directory there are still some scripts that require the createdb.py, so I didn't nuke the file. Do these scripts (or a README file) explain about createdb.py? I also removed the strange The arguments to :meth:`executescript` must be :func:`bytes` objects sentence from the patch. I assume it was a mistake, as it's wrong. Why not change it so that it’s correct? (Maybe looking at the file history would show where the mistake comes from.) Ah, and I added a working example of a custom text_factory function Nice. -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13491 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13180] pysetup silently ignores invalid entries in setup.cfg
Éric Araujo mer...@netwok.org added the comment: A side effect of this change will be the removal of the Extension class, which was only useful to do some typechecks/conversions on its arguments. In Python code it will be replaced by a dict (with keys 'name', 'sources', 'optional', etc.), and when building this dict from a setup.cfg the config parser will validate/convert the values read. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13972] set and frozenset constructors don't accept multiple iterables
Éric Araujo mer...@netwok.org added the comment: As a set user (not developer), I think that the proposed feature is not needed, and the change would make set/frozenset less similar to list and tuple, which would be a bad thing. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13972 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12297] Clarifications to atexit.register and unregister doc
Éric Araujo mer...@netwok.org added the comment: Maybe one of you gentlemen would like to review this. -- nosy: +ezio.melotti, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm fails
Éric Araujo mer...@netwok.org added the comment: Given that we’ve made changes to distutils for Debian multiarch or Mac OS X compiler breakage, I now think that switching distutils to only use rpmbuild would be reasonable. -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1051216] make distutils.core.run_setup re-entrant
Éric Araujo mer...@netwok.org added the comment: I’ll reopen this report if someone can provide an example that triggers the bug. -- resolution: - wont fix status: open - closed versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1051216 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Éric Araujo mer...@netwok.org added the comment: I strongly feel that existing code importing ElementTree or cElementTree should not be broken. Let’s add transparent import from _elementtree to ElementTree without breaking existing uses of cET. I think that 3.2 and 2.7 should get a doc note about cET, do we have a bug for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13991] namespace packages depending on order
Éric Araujo mer...@netwok.org added the comment: Are you using pure-stdlib namespace packages, i.e. things using distutils and pkgutil.extend_path, or setuptools’ notion of namespace packages? (I didn’t check your archive, in general we dislike binary files on this tracker and use text all the time.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13974] packaging: test for set_platform()
Éric Araujo mer...@netwok.org added the comment: :) Will commit. -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13198] Remove duplicate definition of write_record_file
Éric Araujo mer...@netwok.org added the comment: OK. Thanks for your help! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13175] packaging uses wrong line endings in RECORD files on Windows
Éric Araujo mer...@netwok.org added the comment: I just did pip install distutils2 in a virtualenv. If that doesn't work then yes, I got the wrong one :-( You need to get a development repo to make patches, not a released version, just like for CPython. Do I need to hg clone then do some magic pip incantation to get it installed? Why would you want to install it? Clone it, hack on it in place, run tests in place. :) FTR, “bin/pip install -e .” is the command to “install” a project in develop (or editable) mode with pip in a virtualenv. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13719] bdist_msi upload fails
Éric Araujo mer...@netwok.org added the comment: I don’t know if the bdist_msi command runs without user interaction. If so, then the test in the attached patch should pass on Windows. Can you please test it? -- Added file: http://bugs.python.org/file24483/fix-bdist_msi-upload-with-test.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13719 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13952] mimetypes doesn't recognize .csv
Éric Araujo mer...@netwok.org added the comment: I’ve been one to argue that additions to the mimetypes registry are clearly new features. Now if two senior devs like you think otherwise, I’m reconsidering. These additions can’t possibly break code, can they? So I can agree with a viewpoint that mimetypes should match what the IANA publishes and that adding missing types is a bugfix. (It’s less disturbing than updating HTMLParser for example, and I agree with that.) Georg’s inclusion of a registry addition for IIRC 3.2.2 would also indicate RM support for this viewpoint. About Antoine’s remark: mimetypes already reads mime.types files, so even if our internal registry is not up-to-date the module should know about all types present in /etc/mime.types. -- nosy: +eric.araujo, sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] packaging.tests.test_manifest and distutils.tests.test_filelist failures
Éric Araujo mer...@netwok.org added the comment: Attached is Vinay’s fix as a diff. Can someone test this patch on Windows or any of the other OSes that showed failures? -- keywords: +patch title: test_packaging and test_distutils failures - packaging.tests.test_manifest and distutils.tests.test_filelist failures Added file: http://bugs.python.org/file24484/fix-packaging-manifest.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
Eli Bendersky eli...@gmail.com added the comment: I strongly feel that existing code importing ElementTree or cElementTree should not be broken. Let’s add transparent import from _elementtree to ElementTree without breaking existing uses of cET. AFAICS there's currently no disagreement on this point. The import from cElementTree will keep working in 3.3 as it always had. However, the explicit mention of cElementTree should be removed from the documentation of ElementTree. The only remaining question is whether a silent deprecation warning should be added in cElementTree. I think that 3.2 and 2.7 should get a doc note about cET, do we have a bug for this? What doc note? Something in the spirit of: Note that in 3.3, the accelerated C implementation will be provided by default when importing ElementTree - or do you mean something else? I don't think there's an open bug for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13922] argparse handling multiple -- in args improperly
Changes by Warren Turkal w...@penguintechs.org: -- versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com