[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1
New submission from Kristján Valur Jónsson krist...@ccpgames.com: These two socket modules link to a different winsock api, thus pulling two potentially incompatible dlls in to the process. There is no guarantee that they interact. I'll see if there is a simple patch for select module -- components: IO messages: 120308 nosy: krisvale priority: normal severity: normal status: open title: _socket.pyd uses winsock2, select.pyd uses winsock 1 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Here is a patch -- keywords: +patch Added file: http://bugs.python.org/file19475/select.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Changes by Ron Adam ron_a...@users.sourceforge.net: Removed file: http://bugs.python.org/file16517/pydoc_gui.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Changes by Ron Adam ron_a...@users.sourceforge.net: Removed file: http://bugs.python.org/file18165/pydoc_server3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Changes by Ron Adam ron_a...@users.sourceforge.net: Removed file: http://bugs.python.org/file18271/pydoc_server4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2001] Pydoc interactive browsing enhancement
Ron Adam ron_a...@users.sourceforge.net added the comment: Here you go Nick. One file with Underscores for the new class's and functions. Where there was some overlap in names, like where some of the older server class's were reused, but don't have exactly the same behavior, I started those with underscores also. This should make it easier for you to review and/or make adjustments where it's needed. -- Added file: http://bugs.python.org/file19476/pydoc_r86133.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9919] gdbinit lineno result is one line in excess
Georg Brandl ge...@python.org added the comment: Right. Fixed in r86134. Thanks :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10296] ctypes catches BreakPoint error on windows 32
New submission from Kristján Valur Jónsson krist...@ccpgames.com: import ctypes ctypes.windll.kernel32.DebugBreak() This used to be a handy way to attach a debugger to a running program, by way of JIT debugging. Now ctypes catches and handles this exception so a debugger is never invoked. Bummer. -- messages: 120312 nosy: krisvale priority: normal severity: normal status: open title: ctypes catches BreakPoint error on windows 32 type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10296 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9015] array.array.tofile cannot write arrays of sizes 4GB, even compiled for amd64
Christoph Gohlke cgoh...@uci.edu added the comment: This seems to be related: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/7c913001-227e-439b-bf07-54369ba07994 -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9015 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1
Martin v. Löwis mar...@v.loewis.de added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10297] decimal module documentation is misguiding
New submission from hafiza jameel fizabre...@gmail.com: the documentation does not show the import statement of decimal module in the introduction: http://docs.python.org/library/decimal.html import should have been done like this: from decimal import * -- assignee: d...@python components: Documentation messages: 120315 nosy: d...@python, hafiza.jameel priority: normal severity: normal status: open title: decimal module documentation is misguiding versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9995] setup.py register sdist upload requires pass to be saved
anatoly techtonik techto...@gmail.com added the comment: python setup.py build sdist register upload ... Save your login (y/N)?n running upload Submitting dist\review-r585.zip to http://pypi.python.org/pypi Upload failed (401): You must be identified to edit package information -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10263] python -m site does not print path details
Nick Coghlan ncogh...@gmail.com added the comment: Ah, yes, I see what you mean - because runpy ignores the sys.modules cache (by design), it won't see the precached module instance placed there by the bootstrap code. We actually *could* make this work on our end: if we find an existing module in sys.modules, derive the file to be executed from the __file__ attribute of that module rather than searching the whole path again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] get_shape0 in memoryobject.c not checked for error return
Roger Upole rup...@hotmail.com added the comment: While on the subject, the docs for PyMemoryView_FromBuffer state that the resulting memoryview takes ownership of the Py_buffer struct and is responsible for freeing any associated memory. It does not do so, which is not surprising. The absence of a standard for allocation makes it absolutely impossible for it to do so safely. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] get_shape0 in memoryobject.c not checked for error return
Nick Coghlan ncogh...@gmail.com added the comment: Hmm, if we're ever creating a new copy of a Py_buffer without calling GetBuffer again on the original object, then *that* is a bug (exactly comparable to copying a PyObject pointer without incrementing the reference count - it's OK if you can guarantee the lifecycle of your borrowed pointer is shorter than the lifecycle of the original, but disallowed otherwise). This still doesn't sound like a problem with the spec to me, it sounds like a problem with the implementation strategy that was originally used when integrating the spec into the interpeter core (which I readily agree received far less attention than the spec itself did). It really sounds like we should be creating a _Py_ManagedBuffer internal object, with each instance containing a PyObject* and a Py_buffer instance. We don't need to alter PEP 3118 to do that - such a change is entirely consumer side, so the objects providing the buffers don't need to care how the lifecycle of the Py_buffer struct is managed. When we need another reference to the buffer, we can then just increment the refcount of the _Py_ManagedBuffer instance rather than having to call GetBuffer again on the original object. The contents of Py_buffer objects that have been passed to GetBuffer really shouldn't be getting modified at all - for those cases, we should maintain *two* Py_buffer structs, one (unmodified) with the original results of the GetBuffer call, and a second owned by the caller (for manipulation). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Changes by Nick Coghlan ncogh...@gmail.com: -- title: get_shape0 in memoryobject.c not checked for error return - Problems with Py_buffer management in memoryobject.c (and elsewhere?) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10263] python -m site does not print path details
Éric Araujo mer...@netwok.org added the comment: Sounds good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: It doesn't help that neither PEP 3118 nor the Py_buffer docs mention the obj member of the Py_buffer struct that refers back to the original object providing the buffer - that's fairly fundamental to understanding how PyBuffer_Release and PyMemoryView_FromBuffer can work even in theory. (Given that, an additional _PyManagedBuffer object shouldn't be necessary - MemoryView just needs to call ReleaseBuffer and GetBuffer at the appropriate times) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: So the overall to-do list here is sounding like: 1. Document Py_buffer-obj appropriately in both the C API documentation and in PEP 3118 2. Ensure GetBuffer/ReleaseBuffer are used as the moral equivalent of INCREF/DECREF for Py_buffer objects. 3. Check builtin types correctly manage the lifecycle of all elements of their exported Py_buffer structs 4. Check return values and throw exceptions as noted in the original post -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
R. David Murray rdmur...@bitdance.com added the comment: assertEquals existed forever, too, but we deprecated that :) (with no intent to remove it, as I understand it). There is no more ambiguity in assertLessThan than there is in assertLT, one just has more letters. True, you have to look it up the first time, but you have to do that anyway, so I don't see that as a big deal. Once you've looked it up the first time you know the naming rule and you can figure out all the other names. (Which is not true now, since instead of 'LessThan' we have Less, which does *not* correspond to to the special method name by a simple rule). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements
Changes by Tod Olson t...@uchicago.edu: -- nosy: +tod ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1
Kristján Valur Jónsson krist...@ccpgames.com added the comment: committed as revision 86136 -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9981] let make_buildinfo use a temporary directory on windows
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Committed to 3.2 in revision 86137 -- resolution: - accepted status: open - closed versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10298] zipfile: incorrect comment size will prevent extracting
New submission from rep m...@mwcollect.org: Opening (and thus extracting) zip files with appended junk data is not possible with the way the current zipfile implementation checks validity. Basically the problem comes down to the comment size in the end-of-central-directory record being different from the size of the data following that record. Unix unzip and similar utilities handle that case by looking at the eocd-record and taking that as the correct value. Zip files with data appended to them will be extracted just fine with these tools. In python's zipfile the _EndRecData function will return None if the comment size does not match the record's value. The patch modifies this behaviour and takes only the portion of trailing data that the record specifies and due to that it does not raise BadZipfile exceptions if there's any junk data appended to a zip file. -- components: Library (Lib) files: zipfile_recover_commentsize.patch keywords: patch messages: 120326 nosy: rep priority: normal severity: normal status: open title: zipfile: incorrect comment size will prevent extracting type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19477/zipfile_recover_commentsize.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10299] Add index with links section for built-in functions
New submission from nestor nestornis...@gmail.com: The built-in function page (http://docs.python.org/dev/py3k/library/functions.html) is pretty long. Each function has an anchor but unlike the built-in types section there is no quick way to get an overview or jump to a specific function (like open or print) short of scrolling through 22 pages. It would be nice to have an index of all built-in functions linked to the specific entry on the built-in functions page. This could be either somehow added to the index page (http://docs.python.org/dev/py3k/library/index.html) or to the top of the built-in functions page itself. For efficient use of real-estate multiple function names could be on one single line alphabetically sorted and separated by spaces. -- assignee: d...@python components: Documentation messages: 120327 nosy: d...@python, georg.brandl, nestor priority: normal severity: normal status: open title: Add index with links section for built-in functions type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10299] Add index with links section for built-in functions
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10300] Documentation of three PyDict_* functions
New submission from Hagen Fürstenau ha...@zhuliguan.net: The documentation of the functions PyDict_Items, PyDict_Keys and PyDict_Values is incorrect: They do return PyListObject, but in Python 3.x this is not the same as dict.items() etc. -- assignee: d...@python components: Documentation messages: 120328 nosy: d...@python, hagen priority: normal severity: normal status: open title: Documentation of three PyDict_* functions versions: Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10284] NNTP should accept bytestrings for username and password
Changes by Antoine Pitrou pit...@free.fr: -- resolution: invalid - stage: committed/rejected - needs patch status: closed - open title: Exception raised when decoding NNTP newsgroup descriptions - NNTP should accept bytestrings for username and password ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2281] Enhanced cPython profiler with high-resolution timer
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +krisvale ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9995] setup.py register sdist upload requires pass to be saved
anatoly techtonik techto...@gmail.com added the comment: Do you have a list of more important tasks than this one. I'd like to elaborate, because for me alone it could take a lot of time. What I need now is SVN URL to checkout distutils code and some advice where to start. No guarantees though - if the code is too complicated, I won't be able to dedicate much time for exploration. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10299] Add index with links section for built-in functions
Ezio Melotti ezio.melo...@gmail.com added the comment: The attached patch adds a 4-columns table that lists the functions without args. -- assignee: d...@python - ezio.melotti keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file19478/issue10299.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10299] Add index with links section for built-in functions
Changes by Fred L. Drake, Jr. fdr...@acm.org: -- nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10297] decimal module documentation is misguiding
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception
5houston cadab...@gmail.com added the comment: I vote for the latter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10281] Exception raised when an NNTP overview field is absent
Julien ÉLIE jul...@trigofacile.com added the comment: Er, so you're disagreeing with your previous message? Or am I missing something? :) I was saying that if an empty string is returned, then it means that the header exists and is empty. An example was User-Agent: \r\n. And my remark I believe None is better. concerned your initial question Should the field be totally absent [...] regarding how to deal with a header that does not exist. Therefore, User-Agent: \r\n becomes a real '', not None. None is only when the User-Agent: header field is absent from the headers. Here is a patch trying to better handle whitespace. Would it be ok for you? Yes Antoine, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10281] Exception raised when an NNTP overview field is absent
Julien ÉLIE jul...@trigofacile.com added the comment: My conclusion in working on the email package is that only the first space after the ':', if it exists, should be stripped. That is, even though the RFC (for email) reads as if the space after the colon is part of the value, in practice it is part of the delimiter, but is optional (and almost always present, in email). That is why the RFC (for netnews) explicitly mentions that the space after the colon is not part of the value. See the grammar for OVER in RFC 3977: hdr-n-content = [(header-name : / metadata-name) SP hdr-content] So yes, only the first space should be stripped. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1926] NNTPS support in nntplib
Julien ÉLIE jul...@trigofacile.com added the comment: * starttls() should probably test the `tls_on` attribute first and raise a ValueError if True (as you point out, a client mustn't attempt to start a new TLS session if one is already active). ...I actually meant to do exactly that, but forgot to put the check in. Thank you. And it should also make sure the user is not already authenticated. And that STARTTLS is advertised (if nntp_version =2). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1926 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10281] Exception raised when an NNTP overview field is absent
Antoine Pitrou pit...@free.fr added the comment: Ok, committed in r86139. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10282] IMPLEMENTATION token differently delt with in NNTP capability
Antoine Pitrou pit...@free.fr added the comment: Rather than special casing the dict item, I would rather add an nntp_implementation attribute containing the desired value. Besides, shouldn't it be checked that the line is not empty, before splitting it? If the line is empty, the server is non-conformant. Then it's a matter of taste whether all errors should be wrapped in higher-level exceptions; I tend to think it's useless clutter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10171] Ugly buttons in some Tkinter objects in Windows
Éric Araujo mer...@netwok.org added the comment: Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10171 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10285] Other status field flags in documentation for NNTP LIST command
Antoine Pitrou pit...@free.fr added the comment: Improvement committed in r86140, thank you! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10282] IMPLEMENTATION token differently delt with in NNTP capability
Julien ÉLIE jul...@trigofacile.com added the comment: The nntp_implementation attribute would be great. OK for the exception. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9807] deriving configuration information for different builds with the same prefix
Barry A. Warsaw ba...@python.org added the comment: @rpetrov: reusing $LDVERSION does make sense, but then I think the variable is misnamed. I don't like $ABIVERSION either but maybe $BUILDVERSION? Also I think we need to let the substitution for $LDVERSION happen in the Makefile rather than in the configure script. I tried it the way you suggested and IIRC, it had some problems, but I don't remember the details. @doko: Agreed. I'll have an updated patch that fixes python.pc. I'll look at INSTALL_SCHEME/headers too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10284] NNTP should accept bytestrings for username and password
R. David Murray rdmur...@bitdance.com added the comment: What I meant by saying that the spec was broken is that the user is going to be typing the password at a keyboard. The keyboard will generate scan codes. Those scan codes will get interpreted through a system-specific chain of processes until some bytes or some unicode characters are generated. What's to say that the password typed on the keyboard where the password is set up is going to be a binary match for the password entered on the keyboard used for authentication? Which doesn't change the fact that if the spec calls for binary, nttplib should support binary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9995] setup.py register sdist upload requires pass to be saved
anatoly techtonik techto...@gmail.com added the comment: Fix attached. Also on Rietveld - http://codereview.appspot.com/2874041 Could you also backport it to other Python distributions to avoid questions like these: http://stackoverflow.com/questions/3773613/pypi-issues-upload-failed-401-you-must-be-identified-to-edit-package-informa http://stackoverflow.com/questions/1750186/weird-pypi-authentication-behavior -- keywords: +patch Added file: http://bugs.python.org/file19479/issue9995.distutils-forces-developers-to-store-password-in-cleartext.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10284] NNTP should accept bytestrings for username and password
Julien ÉLIE jul...@trigofacile.com added the comment: OK, I understand. I believe it works fine in practice, because people often use ASCII-only characters... I assume it is going to be a problem when the passwords contain 8-bit characters. I doubt it will work fine if I use different news readers on different localized systems... Interesting question. I will ask how it should be handled. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1500504] Alternate RFC 3986 compliant URI parsing module
Éric Araujo mer...@netwok.org added the comment: Sure, adding tests is a no-brainer. Regarding the module, I’m a bit reluctant. I see value in providing low-level building blocks (think OS calls) and high-level utilities for regular use, but here it seems that urllib.parse and urischemes are at the same level. I’m not opposed to the functionality itself—I would like to use a class simply named “URI” (and generally get better names, that is RFC names instead of specific inventions), have components normalization and such goodies—but I think the existing module can get fixes and improvements. I fear the confusion that could be caused by having two modules for the same task, unless you want to propose that the new module deprecate urllib.parse. Senthil, what is your opinion? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1500504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception
Ask Solem a...@opera.com added the comment: Since you can't specify the return code, `self.terminate` is less flexible than `sys.exit`. I think the original intent is clear here, the method is there for the parent to control the child. You are of course welcome to argue otherwise. By the way, I just read the code and noticed that it handles SystemExit well, and supports using it to set the return code: class X(Process): def run(self): if not frobulating: raise SystemExit(255) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10301] Zipfile cannot be used in with Statement
New submission from t.steinruecken t.steinruec...@service4every1.de: Using a ZipFile as a with-context dosnt work (Im using the standard Ubuntu version of Python3.1) Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. from zipfile import ZipFile with ZipFile(test.zip,w) as z: ... z.close() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'ZipFile' object has no attribute '__exit__' -- components: Extension Modules messages: 120346 nosy: t.steinruecken priority: normal severity: normal status: open title: Zipfile cannot be used in with Statement type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10300] Documentation of three PyDict_* functions
Benjamin Peterson benja...@python.org added the comment: r86144 -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10301] Zipfile cannot be used in with Statement
Alex alex.gay...@gmail.com added the comment: Context manager support was added in 3.2 -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10301] Zipfile cannot be used in with Statement
Changes by Benjamin Peterson benja...@python.org: -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1500504] Alternate RFC 3986 compliant URI parsing module
Nick Coghlan ncogh...@gmail.com added the comment: Just to be clear, even *I* don't think adding urischemes as it stands is a particularly great idea, and I wrote it. The only reason I haven't closed the issue is because I'd like to see it mined for additional tests in test_urlparse and perhaps even implementation or API enhancements in url.parse first. (The latter becomes a lot more likely if the urischemes implementation passes tests that url.parse fails) I also think, since I wrote this, the various urllib parsing methods were updated to return named tuple instances with properties, so a lot of the awkwardness of extracting partial values went away. (i.e. returning structured objects already raised the level of the urllib APIs from the tuple-of-strings level they used to be sitting at) I do still assert that urischemes is slightly higher level than the current incarnation of similar functionality in urllib.parse. Universal Resource Identifiers are more encompassing than Universal Resource Locators and Universal Resource Names, and the new APIs explicitly deal with both kinds of URI. There are subtle differences in the assumptions you're allowed to make when you may have a URN rather than a URL, so I believe the current module sometimes does the wrong thing when given one of the former. That said, it's been a long time since I've needed to remember the details, so I don't recall exactly where the current module gets URI handling wrong (or at least, did back in 2006). The intro to RFC 3986 is a good place to start in learning the differences though - Sir Tim writes good docs :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1500504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10284] NNTP should accept bytestrings for username and password
Julien ÉLIE jul...@trigofacile.com added the comment: I quote what Russ Allbery has just answered on news.software.nntp: It's completely unspecified what encoding to use for AUTHINFO USER/PASS, which is one of the problems fixed by SASL. Clients should always use SASL where possible because of things like this. None of the legacy authentication mechanisms (for protocols besides NNTP, as well) support character sets. If they have to fall back to AUTHINFO USER/PASS, they're unfortunately just going to have to guess. Most clients previously probably just sent whatever bytes across the wire that corresponded to the local character set encoding of the username and password. In practice, using anything other than ASCII in passwords with AUTHINFO USER/PASS is not going to be portable and won't work reliably. ** How do current news readers send them to news servers? ** And how news servers should decode them? News servers probably can't do anything better than just accepting them as a byte stream and doing a byte-by-byte comparison against local configuration. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10301] Zipfile cannot be used in with Statement
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8886] zipfile.ZipExtFile is a context manager, but that is not documented
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10302] Add class-functions to hash many small objects with hashlib
New submission from Lukas Lueg lukas.l...@gmail.com: The objects provided by hashlib mainly serve the purpose of computing hashes over strings of arbitrary size. The user gets a new object (e.g. hashlib.sha1()), calls .update() with chunks of data and then finally uses .digest() or .hexdigest() to get the hash. For convenience reasons these steps can also be done in almost one step (e.g. hashlib.sha1('foobar').hexdigest()). While the above approach basically covers all use-cases for hash-functions, when computing hashes of many small strings it is yet inefficient (e.g. due to interpreter-overhead) and leaves out the possibility for performance improvements. There are many cases where we need the hashes of numerous (small) objects, most or all of which being available in memory at the same time. I therefor propose to extend the classes provided by hashlib with an additional function that takes an iterable object, computes the hash over the string representation of each member and returns the result. Due to the aim of this interface, the function is a member of the class (not the instance) and has therefor no state bound to an instance. Memory requirements are to be anticipated and met by the programmer. For example: foo = ['my_database_key1', 'my_database_key2'] hashlib.sha1.compute(foo) ('\x00\x00', '\xff\xff') I consider this interface to hashlib particular useful, as we can take advantage of vector-based implementations that compute multiple hashes in one pass (e.g. through SSE2). GCC has a vector-extension that provides a *somewhat* standard way to write code that can get compiled to SSE2 or similar machine code. Examples of vector-based implementations of SHA1 and MD5 can be found at https://code.google.com/p/pyrit/issues/detail?id=207 Contigency plan: We compile to code iterating over OpenSSL's EVP-functions if compiler is other than GCC or SSE2 is not available. The same approach can be used to cover hashlib-objects for which we don't have an optimized implementation. -- components: Library (Lib) messages: 120351 nosy: ebfe priority: normal severity: normal status: open title: Add class-functions to hash many small objects with hashlib type: feature request versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Suggestions: * new name: assertCountEqual(a, b) or:assertElementCountEqual(a, b) this name captures the essential service: - unordered comparison where duplicates matter - inputs are elements, not items which means key/value pairs * O(n) implementation with O(n**2) fallback: try: a_cnt = collections.Counter(a) b_cnt = collections.Counter(b) except TypeError: # do current O(n**2) fallback else: if a_cnt == b_cnt: # test passed else: in_a_but_not_in_b = a - b in_b_but_not_in_a = b - a # display nice diff * documentation should emphasize the new name: assertElementCountEqual(a, b) obsolete alias: assertItemsEqual(a, b) -- assignee: rhettinger - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9796] Add summary tables for unittest API
Ezio Melotti ezio.melo...@gmail.com added the comment: I committed the patch in r86141 and a few other fixes in r86142 and r86143. There are still more things I want to fix before I backport all the patches to 3.1 and 2.7 and close the issue. -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10155] Add fixups for encoding problems to wsgiref
Phillip J. Eby p...@telecommunity.com added the comment: Committed to Py3K in r86146, with added docs and a larger list of transcodable CGI variables. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10155 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I'd be inclined to insert a check that falls back to the unorderable_list_difference approach in the case where expected != sorted(reversed(expected)). Too fragile and subtle. The method need to be absolutely straight-forward. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input
Michael Foord mich...@voidspace.org.uk added the comment: assertElementCountEqual is good name and I like your implementation suggestion. I'll put this in. I think the implementation fix can go into 2.7 as well but not the rename/aliasing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
Michael Foord mich...@voidspace.org.uk added the comment: Renaming and aliasing methods has a cost. It confuses users of the old names (including future users - the current API is now baked into django 1.3 unless I can get an update done in time for them to change the version they're using). People who use autocomplete or introspection (dir) to explore the APIs will also still come across the old names. Given that unittest has just changed a lot a further radical change is 'unfortunate'. However, for both the regexp methods and the Items method the names are actually misleading. For assertItemsEqual Raymond suggests assertElementCountsEqual. See issue 10242. For the regexp methods we should use assertRegexp - this is shorter, not misleading and consistent with assertRaisesRegexp. We should leave the gt / le / lt methods as they are. There is less consensus that these methods should be changed anyway. The documentation can be improved by moving *all* the deprecated methods (new and old) out of the main documentation and into a separate section at the end of the documentation. The type specific asserts we should also move into their own section and out of the main documentation. This means users who discover don't have to go to the source (there are online references) but they are out of the main documentation. Hopefully everyone is only equally unhappy with this resolution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10243] Packaged Pythons
Max Skaller max.skal...@gmail.com added the comment: On Sat, Oct 30, 2010 at 6:40 PM, Martin v. Löwis rep...@bugs.python.orgwrote: It may be there is none. You need to read the bit where I explain that I am not building Python, I'm grabbing pre-made packages, for OSX and for Ubuntu. The problem is that these packages don't seem to supply a dynamic link version. My problem cannot be solved by telling me I can build Python myself with the --enable-shared switch, because I am not the client. I am a vendor supplying a tool that can generate Python shared libraries which cannot run unless the CLIENT has a shared library version of libpython. So you're telling me to tell THEM to build Python with --enable-shared switch which is out of the question for many of them, who may, for example, be programmers working in a shop where they do not have the ability to change the system installed by their system admin. So the problem is that the *packagers* are not supplying the dynamic lib. Surely that is not the Python dev's issue directly, but it IS an issue the Python dev's can do something about, by talking to the packagers. Anyhow, I will give up. I can't test the feature of the compiler I have implemented because I don't have a libpython.so and I have no intention of building one, because I can't expect all those Python users out there to do it either. It seems you really don't understand the requirements for dynamic linking: my application code is exclusively in a dlopen()d shared library, so if it is used AS a python module or it wants itself to USE a Python extension module OR Python interpreter itself, it cannot do so. The top level application is a fixed mainline which does not include libpython.a or any such symbols. It's a basic design principle, Meyer called it the principle of explicit interfaces which means: if you depend on something make the dependency explicit. Extension modules which do not *explicitly* link against libpython break this rule. -- Added file: http://bugs.python.org/file19480/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10243 ___brbrdiv class=gmail_quoteOn Sat, Oct 30, 2010 at 6:40 PM, Martin v. Löwis span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; br Martin v. Löwis lt;a href=mailto:mar...@v.loewis.de;mar...@v.loewis.de/agt; added the comment:br div class=imbr gt; Python 2.6, for example, does ship a shared library.brbr/div br I fail to see the bug in this report.brbr/blockquotedivbrIt may be there is none. You need to read the bit where I explain that I am not building Python, I#39;m grabbing pre-made packages, for OSX and for Ubuntu.br brThe problem is that these packages don#39;t seem to supply a dynamic link version.brbrMy problem cannot be solved by telling me I can build Python myself withbrthe --enable-shared switch, because I am not the client. I am a vendor supplying a tool that can generate Python shared libraries which cannot run unless the CLIENT has a shared library version of libpython. So you#39;re telling me to tell THEM to build Python with --enable-shared switch which is out of the question for many of them, who may, for example, be programmers working in a shop where they do not have the ability to change the system installed by their system admin.br  brSo the problem is that the *packagers* are not supplying the dynamic lib.brbrSurely that is not the Python dev#39;s issue directly, but it IS an issue the Python dev#39;s can do something about, by talking to the packagers.br brAnyhow, I will give up. I can#39;t test the feature of the compiler I have implementedbrbecause I don#39;t have a libpython.so and I have no intention of building one,brbecause I can#39;t expect all those Python users out there to do it either.br brIt seems you really don#39;t understand the requirements for dynamic linking:brmy application code is exclusively in a dlopen()d shared library, so if it isbrused AS a python module or it wants itself to USE a Python extensionbr module OR Python interpreter itself, it cannot do so.brbrThe top level application is a fixed mainline which does not includebrlibpython.a or any such symbols.brbrIt#39;s a basic design principle, Meyer called it quot;the principle of explicit interfacesquot;br which means: if you depend on something make the dependency explicit.brbrExtension modules which do not *explicitly* link against libpython breakbrthis rule.brbrbr/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3699] test_bigaddrspace broken
Sandro Tosi sandro.t...@gmail.com added the comment: After quite a bit of discussion with Antoine on IRC, here it is a preliminary patch: it uses byte instead of string, but at least it works :) I'll work on a string (additional) test class hopefully tomorrow -- keywords: +patch nosy: +sandro.tosi Added file: http://bugs.python.org/file19481/issue3699-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3699 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
Antoine Pitrou pit...@free.fr added the comment: For assertItemsEqual Raymond suggests assertElementCountsEqual. See issue 10242. Why replace a long awkward name with an even longer and more awkward name? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6081] str.format_from_mapping()
Eric Smith e...@trueblade.com added the comment: Updated patch which adds tests and minimal docs. Named changed to format_map. I'll commit this before 3.2b1 unless I hear a complaint. -- keywords: +easy, needs review resolution: - accepted Added file: http://bugs.python.org/file19482/issue6081-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10303] small inconsistency in tutorial
New submission from Malte Helmert helm...@informatik.uni-freiburg.de: Section 3.1.2. Strings says *Once again*, the print() function produces the more readable output., but as far as I can see (or grep), this is the first time that this aspect of print() is mentioned. -- assignee: d...@python components: Documentation messages: 120362 nosy: d...@python, maltehelmert priority: normal severity: normal status: open title: small inconsistency in tutorial versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
Ezio Melotti ezio.melo...@gmail.com added the comment: An alternative would be adding check_order and check_duplicates to assertSameElements and de-deprecate it. Python 2.7 could be left unchanged because it's too late to add/rename/deprecate methods (it has assertItemsEqual but not assertSameElements). Py3.2 would also be unchanged (assertItemsEqual and the deprecation of assertSameElements are both new in 3.2, assertSameElements has been introduced in 3.1). They would end up with two different methods though. The assertSameElements name seems quite good, and providing extra args will make it more flexible (it will cover all the 4 cases listed in msg100685) and the behavior would be clear without clumsy method names. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10303] small inconsistency in tutorial
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10304] error in tutorial triple-string example
New submission from Malte Helmert helm...@informatik.uni-freiburg.de: From Section 3.1.2 of the tutorial: print( Usage: thingy [OPTIONS] -hDisplay this usage message -H hostname Hostname to connect to ) produces the following output: _ Usage: thingy [OPTIONS] -hDisplay this usage message -H hostname Hostname to connect to _ That doesn't quite match the behaviour: there should be an extra blank line prepended to the output. -- assignee: d...@python components: Documentation messages: 120364 nosy: d...@python, maltehelmert priority: normal severity: normal status: open title: error in tutorial triple-string example versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10304] error in tutorial triple-string example
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10304] error in tutorial triple-string example
Malte Helmert helm...@informatik.uni-freiburg.de added the comment: Here's a related one if you want to get the sample output really 100% correct. In the last example of Section 3, the output in { a, b = 0, 1 while b 1000: ... print(b, end=' ') ... a, b = b, a+b ... 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987} should have an extra space at the end. (Granted, this is very very minor, but this may make a Python 2.x oldtimer like me wonder if print's end= does the same as old Python 2.x's print b, including suppression of the softspace.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9732] Addition of getattr_static for inspect module
Changes by Michael Foord mich...@voidspace.org.uk: Removed file: http://bugs.python.org/file18699/static.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9732] Addition of getattr_static for inspect module
Changes by Michael Foord mich...@voidspace.org.uk: Removed file: http://bugs.python.org/file18701/test_static.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9732] Addition of getattr_static for inspect module
Michael Foord mich...@voidspace.org.uk added the comment: Updated implementation that handles instances with inherited __slots__ members and attributes from C descriptors correctly. I think is both good enough and useful enough to add to inspect. (The remaining constraints are rare or pathological.) -- Added file: http://bugs.python.org/file19483/static.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9732] Addition of getattr_static for inspect module
Changes by Michael Foord mich...@voidspace.org.uk: Added file: http://bugs.python.org/file19484/test_static.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10305] Cleanup up ResourceWarnings in multiprocessing
New submission from Brian Curtin cur...@acm.org: As shown in a debug run of test_multiprocessing, at least two places in managers.py apparently leave open sockets. Lines 786 and 805 are the culprits, both util log lines. -- components: Library (Lib) messages: 120367 nosy: asksol, brian.curtin priority: normal severity: normal stage: needs patch status: open title: Cleanup up ResourceWarnings in multiprocessing type: resource usage versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10305 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1926] NNTPS support in nntplib
StevenJ sjohn...@sakuraindustries.com added the comment: I too was just looking at NNTPS support because I have a need for it. The latest patch looks like great work and I think the things it implements are needed for this library. But it seems to me that the latest patch combines 3 things which might otherwise be able to be separately considered. NNTPS, START_TLS (RFC 4642) extension and AUTHINFO extension (RFC 4643). It may be that START_TLS and AUTHINFO are indivisible, I need to read those more, but shouldn't that be a new topic of discussion as this feature request is for NNTPS support? I also don't understand the difficulty with plain NNTPS as it doesn't need a new interface a very simple patch (attached) achieves NNTPS?? (Most of the patch is test case and variant defaults. The actual NNTPS code is just: +# Make sure we can actually use ssl if its attempted. +if ssl_context: + self.sslcontext = ssl_context + self.sock = self.sslcontext.wrap_socket(self.sock) I also don't understand why START_TLS and AUTHINFO need to change how the module is interfaced to (separating log in/authentication, etc), my reading of START_TLS and AUTHINFO seem to me that it should all be under the covers. It even explains this in Section 7 of Using TLS with IMAP, POP3 and ACAP [TLS-IMAPPOP]. That the idea is It just works. So surely if someone uses this module and they do not specify NNTPS and it supports START_TLS and AUTHINFO and so does the server then it just works. Otherwise it seems a bunch of NNTP Extension requirements and processing spills over to the users of this module when they can probably be contained locally?? Perhaps there needs to be a separate feature request START_TLS and AUTHINFO extension support for nntplib so the issues and any necessary interface changes can be considered in isolation from simple NNTP over SSL? I think it would be nice to have NNTPS in for 3.2. -- nosy: +StevenJ Added file: http://bugs.python.org/file19485/nntps_only_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1926 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: For the regexp methods we should use assertRegexp assertRegex is better. it matches the name used in other unittest implementations, there is not confusion with camel casing RegExp vs Regexp, and it matches the former name of Python's own regex module. We should leave the gt / le / lt methods as they are. The assertLessEqual name is non-standard, it will never be spelled right by someone who hasn't used it recently. The documentation can be improved by moving *all* the deprecated methods (new and old) out of the main documentation and into a separate section at the end of the documentation See issue 10242 for a suggestion on how to handle renaming (document the new and old name in the same entry, noting that one name is old). For assertItemsEqual Raymond suggests assertElementCountsEqual. Why replace a long awkward name with an even longer and more awkward name? If length is an issue, assertCountsEqual will also do fine. The important virtue is clarity. The problem with ItemsEqual is that it doesn't tell you anything about what it does (unordered comparison where duplicates matter). Also, the term items in Python usually means key/value pairs. That is why we use the term elements in sets, itertools, etc. In contrast, assertCountsEqual tells you what it does, compares the element counts. It is the same as Counter(a)==Counter(b) for hashable elements and an equivalent for unhashable elements. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
R. David Murray rdmur...@bitdance.com added the comment: assertCountsEqual is IMO much clearer than assertItemsCountsEqual (or however you spell it). I was unclear on what the latter did, but the former is fairly clear. Ezio's suggestion is also clearer. Raymond, since you said 'never' your statement about assertLessEqual is clearly false :). I don't have any problem remembering it (it's just __le__ spelled out using the standard unittest camelcase). assertLess, on the other hand, I often get wrong, since it is *not* __lt__ spelled out. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10260] Add a threading.Condition.wait_for() method
Jeffrey Yasskin jyass...@gmail.com added the comment: On Tue, Nov 2, 2010 at 4:29 AM, Antoine Pitrou rep...@bugs.python.org wrote: I spent some time thinking of a name. I tried wait_predicate and predicate_wait, but wait_for seemed natural. Any other ideas? How about wait_until_true? wait_for is ok IMO. Agreed. My original method had this as a free function, but I moved it into the Condition because I could see no other kind of primitive that would use it. I agree that it is unfortunate to pull what is essentially a utility function into the Condition variable, so I am leaning towards keeping it a module function. I'm not sure I see the point. It's an operation on a Condition variable, so it's natural to have it as a Condition method. A module function would feel rather weird. Yeah, it should primarily be used as a Condition method. I was suggesting implementing that Condition method in terms of a threading function, which would also help other people trying to, say, mock Condition objects. But that's not a big deal, and I could be wrong about whether it's useful at all. As I said earlier, I'm happy with this patch either way. (Note that Condition.wait_for is helpful to people mocking Condition anyway, since the number of calls is much more fixed than the calls to Condition.wait.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10273] Clean-up Unittest API
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: assertLess, on the other hand, I often get wrong, since it is *not* __lt__ spelled out. Right. Even Michael gets that one wrong. Meditate on why Guido created the special method __lt__ instead of __less_than__. Regardless of why Guido made that choice, we do already have a standard way to spell less-than in Python, and it would be good to stick with it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: One nuance, it may be better to implement as: a_cnt = collections.Counter(iter(a)) b_cnt = collections.Counter(iter(b)) That will bypass the special handling the Counter constructor has if the argument is a Mapping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1602] windows console doesn't print utf8 (Py30a2)
Changes by David Sankel cam...@gmail.com: -- nosy: +David.Sankel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6058] Add cp65001 to encodings/aliases.py
Changes by David Sankel cam...@gmail.com: -- nosy: +David.Sankel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6058 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6058] Add cp65001 to encodings/aliases.py
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6058 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7317] Display full tracebacks when an error occurs asynchronously
Julian python_...@somethinkodd.com added the comment: Amaury asks: Is there an already existing flag that could control this behaviour? I wonder if the warnings module could be used. -- nosy: +oddthinking ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10306] Weakref callback exceptions should be turned into warnings.
New submission from Julian python_...@somethinkodd.com: If a weakref callback raises an exception, weakref writes out some text (to stderr, I think) and ignores it. I think it would be more appropriate if weakref emitted that text using the Python warning module, to allow it to be better controlled. Consider this code with two foolish mistakes in it: - import warnings import weakref warnings.simplefilter('ignore') # Whoops, ignoring warnings is foolish. def callback(condemned_object): raise Exception(Failure) # Whoops, raising an exception in a callback is foolish. class RandomObject(object): pass strong_ref = RandomObject() wr = weakref.proxy(strong_ref, callback) print Removing the only strong reference strong_ref = None # No guarantee that the garbage collector will trigger # in practice, in CPython, it does. print Shutting down now. - When I run this I get: Removing the only strong reference Exception Exception: Exception('Failure',) in function callback at 0x0280A1B0 ignored Shutting down now. The exception text is output even though I don't want it to be. To help me debug, I want for the exception text to be manageable (not by ignoring it, like in the example above, but using the other warnings module features.) -- components: Library (Lib) messages: 120375 nosy: oddthinking priority: normal severity: normal status: open title: Weakref callback exceptions should be turned into warnings. type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10307] compile error in readline.c
New submission from Senthil Kumaran orsent...@gmail.com: /py3k/Modules/readline.c: In function flex_complete: /py3k/Modules/readline.c:877: error: on_completion undeclared (first use in this function) -- assignee: orsenthil messages: 120376 nosy: orsenthil priority: normal severity: normal status: open title: compile error in readline.c type: compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10155] Add fixups for encoding problems to wsgiref
And Clover a...@doxdesk.com added the comment: Thanks. Some of those additions in _needs_transcode are potentially controversial, though. I'm not wholly sure it's the right thing to transcode these. Some of them may not actually come from the request, eg `REMOTE_USER` may be filled in by IIS's Windows authentication using a native-Unicode string from the Windows user database. Is it the right thing to turn it into UTF-8-bytes-in-Unicode for consistency with Apache? Maybe. (At least for most of the other new envvars there will never see a non-ASCII character. Or in `REMOTE_IDENT`'s case never be used for anything.) The case with the REDIRECT_HTTP_ and SSL_ envvars is an interesting one. Whilst transcoding them at some point will very probably be what applications need to do if they want to actually use them, is it within CGIHandler's remit to change Apache mod-specific variables that are not specified by CGI or WSGI? (There might, after all, be lots of these to catch for other mods and servers, and it's *conceivable* that somebody might be re-using one of these names to set in the environment for some other purpose, in which case transcoding would be adding an unexpected mangling. We can't in the general case expect users to know to avoid envvar names are used as non-standard extensions in all servers.) REDIRECT_HTTP_ at least comes from the HTTP request, so I guess the consistency is good there. (But then I think the only header that actually may contain non-ASCII is REDIRECT_URL, which replaces the unescaped SCRIPT_NAME and PATH_INFO; that one isn't caught at the moment.) -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10155 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10307] compile error in readline.c
Senthil Kumaran orsent...@gmail.com added the comment: The problem was in py3k, due to a minor overlook in r85680. Fixed in r86153. -- components: +Build resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9015] array.array.tofile cannot write arrays of sizes 4GB, even compiled for amd64
Martin Spacek pyt...@mspacek.mm.st added the comment: NumPy is addressing this with a workaround in its ndarray, calling fwrite multiple times in reasonably sized chunks. See http://projects.scipy.org/numpy/ticket/1660 -- nosy: +mspacek type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9015 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com