[issue13609] Add os.get_terminal_size() function
Zbyszek Szmek zbys...@in.waw.pl added the comment: The patch is already almost there (in #13041). I'll post an updated version here in a moment. -- nosy: +zbysz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13611] Integrate ElementC14N module into xml.etree package
New submission from Stefan Behnel sco...@users.sourceforge.net: The ElementC14N.py module by Fredrik Lundh implements XML canonicalisation for the ElementTree serialiser. Given that the required API hooks to use it are already in xml.etree.ElementTree, this would make a nice, simple and straight forward addition to the existing xml.etree package. The source can be found here (unchanged since at least 2009): https://bitbucket.org/effbot/et-2009-provolone/src/tip/elementtree/elementtree/ElementC14N.py Note that the source needs some minor modifications to use relative imports at the top. Also, the 2.3 compatibility code section can be dropped. -- components: Library (Lib), XML messages: 149598 nosy: scoder priority: normal severity: normal status: open title: Integrate ElementC14N module into xml.etree package type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13611] Integrate ElementC14N module into xml.etree package
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11900] 2.7.1 unicode subclasses not calling __str__() for print statement
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: However, it is a real change from 2.6 to 2.7 that breaks code. John, this issue is not the same as the one above. The difference between Python 2.6 and Python 2.7.2 you mention only applies to % formatting. The change is clearly documented in http://docs.python.org/dev/whatsnew/2.7.html It’s now possible for a subclass of the built-in unicode type to override the __unicode__() method. This is clearly a bug in the application. There are many ways to break compatibility with bogus code... -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7652] Merge C version of decimal into py3k.
Stefan Krah stefan-use...@bytereef.org added the comment: For my part, a two-lines description of the purpose of file is enough. OK, I'll go for small comments in the files themselves and put big ones in separate files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Antoine Pitrou pit...@free.fr added the comment: Is there any reason why this issue is still open? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
New submission from Dongying Zhang zhangdongying1...@gmail.com: I've been trying to parse xml string using python, codes following: #-*- coding: utf-8 -*- import xml.etree.ElementTree as xmlet s = '?xml version=1.0 encoding=GBK?info/info' xmlet.fromstring(s) Then: $ python2.6 test.py or: $ pypy test.py Traceback message came out like this: Traceback (most recent call last): File test.py, line 4, in module xmlet.fromstring(s) File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/etree/ElementTree.py, line 963, in XML parser.feed(text) File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/etree/ElementTree.py, line 1245, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: unknown encoding: line 1, column 30 I've seen this in following cases: Python2.5.6 on Mac OS X Lion Python2.6.5 on Ubuntu 10.04 pypy1.7.0 on Mac OS X Lion But not in these cases: Python2.6.7 on Mac OS X Lion Python2.7.1 on Mac OS X Lion -- components: Library (Lib) files: test.py messages: 149602 nosy: dongying priority: normal severity: normal status: open title: xml.etree.ElementTree says unknown encoding of a regular encoding versions: Python 2.6 Added file: http://bugs.python.org/file23974/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Changes by Dongying Zhang zhangdongying1...@gmail.com: -- versions: +3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Changes by Dongying Zhang zhangdongying1...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___ 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
Antoine Pitrou pit...@free.fr added the comment: fullname is technically wrong: import logging.bar Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named 'bar' module_name sounds fine and explicit enough to me. Also, as Eric points out, there are many places where an ImportError is raised. You might want to create a private helper API. -- ___ 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
[issue11379] Remove lightweight from minidom description
Stefan Behnel sco...@users.sourceforge.net added the comment: I started a mailing list thread on the same topic: http://thread.gmane.org/gmane.comp.python.devel/127963 Especially see http://thread.gmane.org/gmane.comp.python.devel/127963/focus=128162 where I extract a proposal from the discussion. Basically, there should be a note at the top of the xml.dom documentation as follows: [[Note: The xml.dom.minidom module provides an implementation of the W3C-DOM whose API is similar to that in other programming languages. Users who are unfamiliar with the W3C-DOM interface or who would like to write less code for processing XML files should consider using the xml.etree.ElementTree module instead.]] I think this should go on the xml.dom.minidom page as well as the xml.dom package page. Hand-wavingly, users who are new to the DOM are more likely to hit the package page first, whereas those who know it already will likely find the MiniDOM page directly. Note that I'd still encourage the removal of the misleading word lightweight until it makes sense to put it back in a meaningful way. I therefore propose the following minimalistic changes to the first paragraph on the minidom page: xml.dom.minidom is a [-XXX: light-weight] implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also [+XXX: provide a] significantly smaller [+XXX: API]. Additionally, the documentation on the xml.sax page would benefit from the following paragraph: [[Note: The xml.sax package provides an implementation of the SAX interface whose API is similar to that in other programming languages. Users who are unfamiliar with the SAX interface or who would like to write less code for efficient stream processing of XML files should consider using the iterparse() function in the xml.etree.ElementTree module instead.]] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Nadeem Vawda nadeem.va...@gmail.com added the comment: Yes, almost half of the buildbots still don't have the xz-utils headers installed, and thus are not building/testing the lzma module. I've kept the issue open as a reminder to myself to follow up on this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1785] inspect gets broken by some descriptors
Antoine Pitrou pit...@free.fr added the comment: Updated patch for 3.2. -- stage: - patch review versions: +Python 3.2 -Python 2.6 Added file: http://bugs.python.org/file23975/inspect-and-pydoc-bug2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1785] inspect gets broken by some descriptors
Antoine Pitrou pit...@free.fr added the comment: Updated patch that adds a test for classifying builtin types (checks that ``inspect.classify_class_attrs(type)`` does not throw as in issue13581). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1785] inspect gets broken by some descriptors
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file23976/inspect-and-pydoc-bug3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12809] Missing new setsockopts in Linux (eg: IP_TRANSPARENT)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12809 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13610] On Python parsing numbers.
Charles-François Natali neolo...@free.fr added the comment: Can this be fixed? More or less. The following patch does the trick, but is not really elegant: --- a/Parser/tokenizer.c2011-06-01 02:39:38.0 + +++ b/Parser/tokenizer.c2011-12-16 08:48:45.0 + @@ -1574,6 +1576,10 @@ } } tok_backup(tok, c); +if (is_potential_identifier_start(c)) { +tok-done = E_TOKEN; +return ERRORTOKEN; +} *p_start = tok-start; *p_end = tok-cur; return NUMBER; python -c 1and 0 File string, line 1 1and 0 ^ SyntaxError: invalid token Note that there are other - although less bothering - limitations: python -c 1 and@ 2 File string, line 1 1 and@ 2 ^ SyntaxError: invalid syntax This should be catched by the lexer, not the parser (i.e. it should raise an Invalid token error). That's a limitation of the ad-hoc scanner. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6695] PyXXX_ClearFreeList for dict, set, and list
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 57f0af61da53 by Antoine Pitrou in branch 'default': Issue #6695: Full garbage collection runs now clear the freelist of set objects. http://hg.python.org/cpython/rev/57f0af61da53 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6695 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6695] PyXXX_ClearFreeList for dict, set, and list
Antoine Pitrou pit...@free.fr added the comment: The clearing the dict and list freelists has been added independently, so I committed the part of the patch pertaining to sets. Thank you! -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6695 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Ezio Melotti ezio.melo...@gmail.com added the comment: xml.dom.minidom is a [-XXX: light-weight] implementation of the Document Object Model interface. This is ok. It is intended to be simpler than the full DOM and also [+XXX: provide a] significantly smaller [+XXX: API]. Doesn't simpler here refer to the API already? Another option is to add somewhere a section like: If you have to work with XML, ElementTree is usually the best choice, because it has a simple API and it's efficient [or whatever]. xml.dom.minidom provides a subset of the W3C-DOM API, and xml.sax a SAX interface., possibly expanding a bit on the differences and showing a minimal example with the 3 different implementations, and then link to it from the other modules' pages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5424] Packed IPaddr conversion tests should be extended
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Actually, this fails on 2.6 and 2.7 on wide unicode builds, and passes with narrow unicode builds (on my 64bit Linux box). In pyexpat.c, PyUnknownEncodingHandler accesses 256 characters of a unicode buffer, without checking its length... which happens to be 192 chars long. So buffers overflow, etc. The function has a comment supports only 8bit encodings; indeed. Versions 3.2 and 3.3 happen to pass the test, probably by pure luck. Supporting multibytes codecs won't be easy: pyexpat requires to fill an array which specifies the number of bytes needed by each start byte (for example, in utf-8, 0xc3 starts a 2-bytes sequence, 0xef starts a 3-bytes sequence). Our codecs framwork does not provide this information, and some codecs (gb18030 for example) need the second char to determine whether it will need 4 bytes. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Denilson Figueiredo de Sá denilso...@gmail.com added the comment: Zbyszek, I just looked at [1] and I disagree that the environment variable should have higher precedence. In fact, I believe it should have lower precedence, and should be used as a fallback. [1]: http://bugs.python.org/file23241/patch1.1.diff Reason? Imagine a program is launched, and thus it has COLUMNS set to some value. While the program is running, the user resizes the terminal. I believe (though I have not tested) that the envvar will keep the old value, and this function would return wrong dimensions. In my opinion, the system-specific code (termios/windll) should be tried first, and then the envvars (as fallback). If all else fails, maybe it would be better to return (None, None) and let the caller of this function handle that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10350] errno is read too late
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6a966179c73a by Antoine Pitrou in branch '3.2': Issue #10350: Read and save errno before calling a function which might overwrite it. http://hg.python.org/cpython/rev/6a966179c73a New changeset 8e0b2e75ca7a by Antoine Pitrou in branch 'default': Issue #10350: Read and save errno before calling a function which might overwrite it. http://hg.python.org/cpython/rev/8e0b2e75ca7a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10350] errno is read too late
Antoine Pitrou pit...@free.fr added the comment: Committed in 3.x. I won't bother backporting to 2.x. Thank you! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 3.3 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9975] Incorrect use of flowinfo and scope_id in IPv6 sockaddr tuple
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Giampaolo Rodola' g.rod...@gmail.com added the comment: http://bugs.python.org/file23241/patch1.1.diff This looks like something which would fit better into shutil module rather than os. Also, the Windows implementation should not rely on ctypes. -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13041] argparse: terminal width is not detected properly
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- dependencies: +Add os.get_terminal_size() function versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Giampaolo Rodola' g.rod...@gmail.com added the comment: Plus, you should provide also heigth, not only width, possibly as a namedtuple: import shutil shutil.get_terminal_size() size(width=80, heigth=170) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12809] Missing new setsockopts in Linux (eg: IP_TRANSPARENT)
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12809 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Improve tools for iterating over filesystem directories
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13584] argparse doesn't respect double quotes
Steven Bethard steven.beth...@gmail.com added the comment: Closing then. Thanks for checking it again! -- assignee: - bethard resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
New submission from Edmund Eyles ho...@heddonsgate.co.uk: The documentation for Python 2.7.2 has a section of examples for the regular expression match() function, based on a poker hand, at section 7.2.6.1. These examples show a suit of cards as having 14 cards! The ace is counted twice, as '1' and 'a'. Remind me not to play poker against the author. I would suggest changing the range of the characters that represent the cards' denominations to [2-9tjqka], with a 't' representing a 10, rather than using a '0', and not using either the '0' or the '1'. -- assignee: docs@python components: Documentation messages: 149619 nosy: Eddie E, docs@python priority: normal severity: normal status: open title: Small error in regular expression poker hand example type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: docs@python - ezio.melotti keywords: +patch nosy: +ezio.melotti stage: - commit review type: behavior - enhancement versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23977/issue13613.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Changes by Ezio Melotti ezio.melo...@gmail.com: Removed file: http://bugs.python.org/file23977/issue13613.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Changes by Ezio Melotti ezio.melo...@gmail.com: Added file: http://bugs.python.org/file23978/issue13613.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Zbyszek Szmek zbys...@in.waw.pl added the comment: One reply to three comments: [To myself]: I'll post an updated version here in a moment. Hm, it's not so simple. The implementation is simple, but the configure defines are harder than I thought. But I'm getting there :) Zbyszek, I just looked at [1] and I disagree that the environment variable should have higher precedence. In fact, I believe it should have lower precedence, and should be used as a fallback. I disagree. $COLUMNS will usually _not_ be set: $ echo $COLUMNS 119 $ ./python -c 'import os; print(COLUMNS in os.environ)' False As I wrote before, the shell only sets COLUMNS for use in the shell, without exporting. Giving a precedence to the environment variable (if it is set by the user) allows to do something like this: $ COLUMNS=80 python program.py ... do whatever is to be dome for 80 columns ... and the normal case (with dynamic checking) will also work correctly. Anyway, I think that two functions should be provided: a raw one, which does the ioctl, and the normal one, which queries $COLUMNS and the the raw function. If different behaviour is wanted, than just the raw one can be called. Also, the Windows implementation should not rely on ctypes. Of course. For windows I have: #include conio.h ... GetConsoleScreenBufferInfo(handle, csbi) ... This looks like something which would fit better into shutil module rather than os. This is problematic. The docstring for shutil says: Utility functions for copying and archiving files and directory trees. So it doesn't seem to fit at all. OTOH, there's termios and tty, but they are UNIX only. Module curses is also UNIX only, and slightly different topic, because get_terminal_width should be independent of curses. Plus, you should provide also heigth, not only width, possibly as a namedtuple. Agreed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8373] socket: AF_UNIX socket paths not handled according to PEP 383
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1f23bb74f4bc by Antoine Pitrou in branch 'default': Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem http://hg.python.org/cpython/rev/1f23bb74f4bc -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8373] socket: AF_UNIX socket paths not handled according to PEP 383
Antoine Pitrou pit...@free.fr added the comment: Patch committed in 3.3 (default branch), thank you! -- nosy: +pitrou resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 3.3 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13604] update PEP 393 (match implementation)
Jim Jewett jimjjew...@gmail.com added the comment: Why is the utf-8 representation not cached when it is generated for ParseTuple et alia? My error -- I read something backwards. When a string is created from a wchar_t array, who is responsible for releasing the original wchar_t array? The caller. OK, I'll document that. As I read it now, Python doesn't release the buffer, and the caller can't because maybe Python just pointed to it as memory shared with the canonical representation. But Python won't; it will always make a copy for itself. I thought I found an example each way, but it is possible that the shared version was something python had already copied. If not, I'll raise that as a separate issue to get the code changed. (Note that I may not be able to look at this again until after Christmas, so I'm likely to go silent for a while.) -- Added file: http://bugs.python.org/file23979/pep-0393.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Edmund Eyles ho...@heddonsgate.co.uk added the comment: Changes proposed in file 23978 look good to me! On 16/12/2011 13:28, Ezio Melotti wrote: Changes by Ezio Melottiezio.melo...@gmail.com: Added file: http://bugs.python.org/file23978/issue13613.diff ___ Python trackerrep...@bugs.python.org http://bugs.python.org/issue13613 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13604] update PEP 393 (match implementation)
Changes by Jim Jewett jimjjew...@gmail.com: Added file: http://bugs.python.org/file23980/pep-0393_20111216.txt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13610] On Python parsing numbers.
Mark Dickinson dicki...@gmail.com added the comment: Can this be fixed? Not without breaking backwards compatibility, I would think. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13610] On Python parsing numbers.
Benjamin Peterson benja...@python.org added the comment: I think it's fairly harmless. Perhaps Python 4. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Giampaolo Rodola' g.rod...@gmail.com added the comment: The docstring for shutil says: Utility functions for copying and archiving files and directory trees. So it doesn't seem to fit at all. Well... shutil should stand for shell utilities and it already contains stuff which is not strictly related to file/directory direct operations (see shutil.disk_usage and upcoming shutil.which). But maybe you're right... I don't know... My point is that a function which attempts different fallbacks (ask OS - ask os.environ - return (None, None) / raise exception) sounds more like an utility function rather than something belonging to os module, where you tipically see 1-to-1 interfaces for the underlying system functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ 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
Brian Curtin br...@python.org added the comment: I think I'm going to stick with name unless anyone is super opposed. If we can eventually import something else (sausages?), then setting module_name with a sausage name will seem weird. I'll work up a more complete patch. The private helper is a good idea. -- ___ 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
[issue13604] update PEP 393 (match implementation)
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Zbyszek Szmek zbys...@in.waw.pl added the comment: This is proof-of-concept implementation. This adds two modules: termsize (python) and _termsize (C). The first one contains the get_terminal_size user-facing function and namedtuple definition. The second on contains the function query_terminal_size which does the real job. Two simple tests are added. I'm not sure if it is feasible to test with different terminal sizes: it certainly _could_ be done, e.g. by launching an xterm with a specified geometry, but this would be much more complicated than this implementation, so probably not worth it. This was only tested on 64-bit linux, seems to work. I'm not sure how to the configure tests should be done: right now the presence of sys/ioctl.h is checked, and it is used. If not available, conio.h is checked, and used. Otherwise NotImplementedError is thrown. Would be nice to test on a mac and other systems, but I don't have one available at the moment unfortunately. I think that the python part (termsize.py) should be either merged with os.py (or whatever home we find for this function), or rewritten in C in _termsizemodule.c and only imported into os. But since it hasn't yet been decided where this should go, keeping it separate is easier for now. -- keywords: +patch Added file: http://bugs.python.org/file23981/termsize.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Don't forget the Windows platform... here is an implementation: https://bitbucket.org/hpk42/py/src/980c8d526463/py/_io/terminalwriter.py#cl-284 But it would be better written in C, of course. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13607] Move generator specific sections out of ceval.
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1785] inspect gets broken by some descriptors
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Antoine Pitrou pit...@free.fr added the comment: Ok, a couple of general comments: - there is no point having a separate module for a single function; I think the os module (and posixmodule.c for the C side) is a reasonable place where to put this - C code should be indented with 4 spaces increments and no tabs (see PEP 7) - constants in C code should be uppercase - C code should be C89-compliant and therefore we don't use named struct initializers (such as .m_size = 0) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13610] On Python parsing numbers.
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue818201] distutils: clean does not use build_base option from build
Josh josh.david...@lmco.com added the comment: Where was this fixed? It is still a problem in Python 2.6.6. For example, if I do: python setup.py build_ext --compiler=mingw32 build --build-platlib=build\win64 Then follow it up with: python setup.py clean --build-base=build\win64 -a This is what it does: running clean 'build\lib.win-amd64-2.6' does not exist -- can't clean it removing 'build\bdist.win-amd64' (and everything under it) 'build\scripts-2.6' does not exist -- can't clean it As you can see, the base directory argument is ignored. -- nosy: +davidsj2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue818201 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13611] Integrate ElementC14N module into xml.etree package
Martin v. Löwis mar...@v.loewis.de added the comment: Code added to the standard library should be contributed by its author, with an explicit statement of plans to support it in an ongoing manner, and preferably also with plans to stop providing standalone releases over time. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5424] Packed IPaddr conversion tests should be extended
Martin v. Löwis mar...@v.loewis.de added the comment: I agree with Antoine: a single test testing that we actually raise exceptions properly should be sufficient. OTOH, the patch doesn't hurt (AFAICT), so I wouldn't mind if it was applied as-is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Martin v. Löwis mar...@v.loewis.de added the comment: If you have to work with XML, ElementTree is usually the best choice, because it has a simple API and it's efficient [or whatever]. I still object such a wording, for many reasons. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13614] `setup.py register` fails with traceback
New submission from anatoly techtonik techto...@gmail.com: It seems that invalid ReST in long_description causes traceback in distutils `register` command. See attached log. More details: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/905500 -- assignee: tarek components: Distutils files: traceback.txt messages: 149636 nosy: eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: `setup.py register` fails with traceback versions: Python 2.7 Added file: http://bugs.python.org/file23982/traceback.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13614 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13615] `setup.py register` fails with -r argument
New submission from anatoly techtonik techto...@gmail.com: $ python setup.py sdist register -r https://pypi.python.org/pypi upload ... Creating tar archive removing 'pager-0.2' (and everything under it) running register Traceback (most recent call last): File setup.py, line 17, in module 'Operating System :: OS Independent', File /usr/lib/python2.7/distutils/core.py, line 152, in setup dist.run_commands() File /usr/lib/python2.7/distutils/dist.py, line 953, in run_commands self.run_command(cmd) File /usr/lib/python2.7/distutils/dist.py, line 972, in run_command cmd_obj.run() File /usr/lib/python2.7/distutils/command/register.py, line 47, in run self._set_config() File /usr/lib/python2.7/distutils/command/register.py, line 82, in _set_config raise ValueError('%s not found in .pypirc' % self.repository) ValueError: https://pypi.python.org/pypi not found in .pypirc --- $ python setup.py register -h ... Options for 'register' command: --repository (-r) url of repository [default: http://pypi.python.org/pypi] ... usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] ... -- assignee: tarek components: Distutils messages: 149637 nosy: eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: `setup.py register` fails with -r argument versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13615] `setup.py register` fails with -r argument
anatoly techtonik techto...@gmail.com added the comment: Ubuntu 11.10 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 766a21ebf82e by Ezio Melotti in branch '2.7': #13613: fix example in re doc. http://hg.python.org/cpython/rev/766a21ebf82e New changeset 0b86da9d6964 by Ezio Melotti in branch '3.2': #13613: fix example in re doc. http://hg.python.org/cpython/rev/0b86da9d6964 New changeset f2e1867f33b8 by Ezio Melotti in branch 'default': #13613: merge with 3.2. http://hg.python.org/cpython/rev/f2e1867f33b8 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13613] Small error in regular expression poker hand example
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13616] Never ending loop in in update_refs Modules/gcmodule.c
New submission from David Butler croe...@gmail.com: CPU will sit a 100% indefinitely, this is also pretty tough (takes several hours) to reproduce if you step through the program it is stuck between 290 and 292 Modules/gcmodule.c: /* Set all gc_refs = ob_refcnt. After this, gc_refs is 0 for all objects * in containers, and is GC_REACHABLE for all tracked gc objects not in * containers. */ static void update_refs(PyGC_Head *containers) { PyGC_Head *gc = containers-gc.gc_next; for (; gc != containers; gc = gc-gc.gc_next) { -- line 290 assert(gc-gc.gc_refs == GC_REACHABLE); gc-gc.gc_refs = Py_REFCNT(FROM_GC(gc)); -- line 292 /* Python's cyclic gc should never see an incoming refcount * of 0: if something decref'ed to 0, it should have been * deallocated immediately at that time. * Possible cause (if the assert triggers): a tp_dealloc * routine left a gc-aware object tracked during its teardown * phase, and did something-- or allowed something to happen -- * that called back into Python. gc can trigger then, and may * see the still-tracked dying object. Before this assert * was added, such mistakes went on to allow gc to try to * delete the object again. In a debug build, that caused * a mysterious segfault, when _Py_ForgetReference tried * to remove the object from the doubly-linked list of all * objects a second time. In a release build, an actual * double deallocation occurred, which leads to corruption * of the allocator's internal bookkeeping pointers. That's * so serious that maybe this should be a release-build * check instead of an assert? */ assert(gc-gc.gc_refs != 0); } } GDB backtrace: #0 0xb7750fcb in update_refs (generation=2) at Modules/gcmodule.c:290 #1 collect (generation=2) at Modules/gcmodule.c:873 #2 0xb77515e3 in collect_generations (basicsize=20) at Modules/gcmodule.c:996 #3 _PyObject_GC_Malloc (basicsize=20) at Modules/gcmodule.c:1457 #4 0xb775163e in _PyObject_GC_NewVar (tp=0xb77a0640, nitems=2) at Modules/gcmodule.c:1477 #5 0xb76df4b7 in PyTuple_New (size=2) at Objects/tupleobject.c:90 #6 0xb77230fd in PyEval_EvalFrameEx (f= Frame 0x889acdc, for file /usr/lib/python2.7/site-packages/twisted/python/failure.py, line 443, in __getstate__ (self=Failure(count=3460, tb=traceback at remote 0x9884fa4, value=exceptions.AttributeError(DeferredList instance has no attribute 'resultList',), parents=['exceptions.AttributeError', 'exceptions.StandardError', 'exceptions.Exception', 'exceptions.BaseException', '__builtin__.object', 'exceptions.AttributeError'], frames=[['_runCallbacks', '/usr/lib/python2.7/site-packages/twisted/internet/defer.py', 542, [('chain', [Deferred(_chainedTo=None, called=True, _canceller=None, callbacks=[], result=..., _runningCallbacks=False) at remote 0x9f1cb2c]), ('callback', instancemethod at remote 0x9dbf98c), ('self', ...), ('args', (1, True)), ('current', ...), ('item', ((instancemethod at remote 0x9dbf98c, (...), None), (instancemethod at remote 0x9f1e11c, (1, False), None))), ('finished', True), ('kw', {})], [('AlreadyCalledError', type at remote 0x885dd6c), (' DeferredFilesystemLock', type...(truncated), throwflag=0) at Python/ceval.c:2178 #7 0xb772489a in fast_function (f= Frame 0x889ab84, for file /usr/lib/python2.7/site-packages/twisted/python/failure.py, line 452, in cleanFailure (self=Failure(count=3460, tb=traceback at remote 0x9884fa4, value=exceptions.AttributeError(DeferredList instance has no attribute 'resultList',), parents=['exceptions.AttributeError', 'exceptions.StandardError', 'exceptions.Exception', 'exceptions.BaseException', '__builtin__.object', 'exceptions.AttributeError'], frames=[['_runCallbacks', '/usr/lib/python2.7/site-packages/twisted/internet/defer.py', 542, [('chain', [Deferred(_chainedTo=None, called=True, _canceller=None, callbacks=[], result=..., _runningCallbacks=False) at remote 0x9f1cb2c]), ('callback', instancemethod at remote 0x9dbf98c), ('self', ...), ('args', (1, True)), ('current', ...), ('item', ((instancemethod at remote 0x9dbf98c, (...), None), (instancemethod at remote 0x9f1e11c, (1, False), None))), ('finished', True), ('kw', {})], [('AlreadyCalledError', type at remote 0x885dd6c), (' DeferredFilesystemLock', type...(truncated), throwflag=0) at Python/ceval.c:4099 #8 call_function (f= Frame 0x889ab84, for file /usr/lib/python2.7/site-packages/twisted/python/failure.py, line 452, in cleanFailure (self=Failure(count=3460, tb=traceback at remote 0x9884fa4, value=exceptions.AttributeError(DeferredList instance has no attribute 'resultList',), parents=['exceptions.AttributeError', 'exceptions.StandardError', 'exceptions.Exception', 'exceptions.BaseException', '__builtin__.object', 'exceptions.AttributeError'], frames=[['_runCallbacks',
[issue13571] Backup files support in IDLE
Terry J. Reedy tjre...@udel.edu added the comment: I agree with Roger that developing an extension elsewhere is the proper first step. I suspect that you will want to experiment with the exact behavior and interface. So I am closing this for now, though you can reopen later if there is a renewed proposal to change IDLE as distributed. But I would sooner incorporate some of the other extensions that have already been written and tested as part of IdleX. Because I don't usually do the things that cause IDLE to crash, at least not while coding, and do use a fairly short code/F5-run test cycle, I am not sure I would need this much. On the other hand, a 5 or 10 minute timed backup might not be a bad idea. -- nosy: +terry.reedy resolution: - later status: open - closed versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13573] csv.writer uses str() for floats instead of repr()
Terry J. Reedy tjre...@udel.edu added the comment: Is this complete and ready to close, or does the doc need a note? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13616] Never ending loop in in update_refs Modules/gcmodule.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Are you sure that the program is really stuck in the gc module? The loop you mention has to go through all objects of the process. It's possible that it allocated many objects, that one garbage collection takes a few seconds, and even that most of the time is spent inside the garbage collector. But can you check whether this function terminates? For example, you could put a breakpoint in the collect() function. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13579] string.Formatter doesn't understand the !a conversion specifier
Terry J. Reedy tjre...@udel.edu added the comment: At line 237 of string.py: def convert_field(self, value, conversion): # do any conversion on the resulting object if conversion == 'r': return repr(value) elif conversion == 's': return str(value) elif conversion is None: return value add elif conversion == 'a': return ascii(value) The alternatives should be ordered by decreasing frequency. I suspect that should be None, 's', 'r', 'a'. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13579] string.Formatter doesn't understand the !a conversion specifier
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - needs patch type: - behavior versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13583] sqlite3.Row doesn't support slice indexes
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ghaering versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13573] csv.writer uses str() for floats instead of repr()
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The code is fixed. Am leaving this open until I have a chance to see if anything in the docs need to be updated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13586] Replace selected not working/consistent with find
Terry J. Reedy tjre...@udel.edu added the comment: In 3.2 on Win 7, selected text *is* put in the 'find' field of Replace boxes, just as with Find boxes, just as it should be. So there is something specific either to 2.7 (which is unusual, since the code base in mostly the same, but possible) or to your OS. What are you running Python with? -- nosy: +terry.reedy stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13586] IDLE: Replace selected not working/consistent with find
Changes by Terry J. Reedy tjre...@udel.edu: -- title: Replace selected not working/consistent with find - IDLE: Replace selected not working/consistent with find ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13587] Correcting the typos error in Doc/howto/urllib2.rst
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13587] Correcting the typos error in Doc/howto/urllib2.rst
Terry J. Reedy tjre...@udel.edu added the comment: Error is in 3.2 docs as well. 2.6/3.1 only get security patches. 3.4 is for future enhancements what will not even go into 3.3. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] Prebuilt python-2.7.2 binaries for macosx can not compile c extensions
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +ned.deily ___ 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
[issue13592] repr(regex) doesn't include actual regex
Terry J. Reedy tjre...@udel.edu added the comment: but if #11957 is fixed, the result will look like re.Regex('abc', re.I|re.S) That is what I would like to see. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13592 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13607] Move generator specific sections out of ceval.
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13607] Move generator specific sections out of ceval.
Benjamin Peterson benja...@python.org added the comment: Seems mostly fine to me. -- assignee: - benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13607 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13610] On Python parsing numbers.
Terry J. Reedy tjre...@udel.edu added the comment: The proposal is to change the definition of numbers literals from X to one that is context-sensitive: X followed by whitespace or a syntactic symbol but not anything else, in particular, not by an identifier_start character. I am +-0 at the moment. 1 and@ 2 I presume this is parsed as 1 and @ 2, which is a syntax error. -- nosy: +terry.reedy type: - enhancement versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding
Terry J. Reedy tjre...@udel.edu added the comment: 3.2, Win7 (a narrow build) it indeed works and returns Element 'info' at 0x3389128 -- nosy: +terry.reedy versions: +Python 2.7 -3rd party, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13609] Add os.get_terminal_size() function
Zbyszek Szmek zbys...@in.waw.pl added the comment: Here's updated version: termsize.diff.1 Ok, a couple of general comments: - there is no point having a separate module for a single function; I think the os module (and posixmodule.c for the C side) is a reasonable place where to put this Done. (But posixmodule.c is so enourmous... I feel bad making it even longer.) - C code should be indented with 4 spaces increments and no tabs (see PEP 7) - constants in C code should be uppercase - C code should be C89-compliant and therefore we don't use named struct initializers (such as .m_size = 0) All done, I hope. This version was tested on linux/amd64 and win32 (XP). -- Added file: http://bugs.python.org/file23983/termsize.diff.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1294232] Error in metaclass search order
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1294232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize
STINNER Victor victor.stin...@haypocalc.com added the comment: changeset: 74002:279b0aee0cfb user:Victor Stinner victor.stin...@haypocalc.com date:Fri Dec 16 23:56:01 2011 +0100 files: Doc/c-api/unicode.rst Include/unicodeobject.h Modules/_localemodule.c Modules/main.c Modules/timemodule.c description: Add PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() * PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string from the current locale encoding * _Py_char2wchar() writes an error code in the size argument to indicate if the function failed because of memory allocation failure or because of a decoding error. The function doesn't write the error message directly to stderr. * Fix time.strftime() (if wcsftime() is missing): decode strftime() result from the current locale encoding, not from the filesystem encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 88198b93ff2f by Victor Stinner in branch 'default': Issue #13560: Add PyUnicode_EncodeLocale() http://hg.python.org/cpython/rev/88198b93ff2f New changeset 51412b4b81ae by Victor Stinner in branch 'default': Issue #13560: os.strerror() now uses the current locale encoding instead of UTF-8 http://hg.python.org/cpython/rev/51412b4b81ae -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13617] Reject embedded null characters in wchar* strings
New submission from STINNER Victor victor.stin...@haypocalc.com: The curses module (only since Python 3.3), locale.strcoll(), locale.strxfrm(), time.strftime() and imp.NullImporter() (only on Windows) accept embedded null characters, whereas they convert the Unicode string to a wide character (wchar_t*) string. The problem is that the null character truncates the string. Example: locale.strxfrm('a') 'a' locale.strxfrm('a\0b') 'a' Attached patch fixes these functions. I wrote the patch for Python 3.3. -- components: Library (Lib), Unicode files: embedded_nul.patch keywords: patch messages: 149656 nosy: ezio.melotti, haypo priority: normal severity: normal status: open title: Reject embedded null characters in wchar* strings versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23984/embedded_nul.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13617] Reject embedded null characters in wchar* strings
STINNER Victor victor.stin...@haypocalc.com added the comment: PyUnicode_AsWideCharString() documentation should also warn about this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 07802351ccad by Victor Stinner in branch 'default': Issue #13560: Locale codec functions use the classic errors parameter, http://hg.python.org/cpython/rev/07802351ccad -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13618] bytes.deocde() UnicodeEncodeError on Apple iOS characters
New submission from Silverback Networks silverback...@gmail.com: I've searched high and low to find a way to make Python accept Apple's iOS characters, but it looks like Python is not supporting greater than 16-bit characters correctly. If you look at the leading character of each group, it's \xf0, indicating a 4-character sequence, which also indicates greater than 16-bit characters. I've tried all three errors arguments to decode - ignore, replace, and strict - and still get this error each time: UnicodeEncodeError: 'charmap' codec can't encode characters in position 140: character maps to undefined So I have no way to proceed short of rolling my own corrected unicode decoder. My assumption is that Python should convert a character regardless of whether it's found in the internal lookup database, or at a minimum there should be a way to signal Python to do so. Below is a sample bytes string that will reproduce the problem: b'?xml version=\'1.0\' encoding=\'utf-8\'?\n dict\n key\n average-user-rating\n /key\n real\n1\n /real\n key\n text\n /key\n string\n \xf0\x9f\x8e\x84\xf0\x9f\x8e\x85\xf0\x9f\x8e\x81\xf0\x9f\x8e\x84\xf0\x9f\x8e\x85\xf0\x9f\x8e\x81 if you haven#39;t checked this out yet please do. download APP TRAILERS and go to videos use promo code FREE4U and enjoy free apps courtesy of apple MERRY CHRISTMAS \xf0\x9f\x8e\x84\xf0\x9f\x8e\x85\xf0\x9f\x8e\x81\xf0\x9f\x8e\x84\xf0\x9f\x8e\x85\xf0\x9f\x8e\x81\n /string\n key\ntitle\n /key\n string\n4. IF YOU LOVE FREE STUFF (v1.5)\n /string\n key\ntype\n /key\n string\n review\n /string\n key\nuser-name\n /key\n string\n Freenesss on Dec 16, 2011\n /string\n /dict\n dict\n key\n average-user-rating\n /key\n real\n0.8\n /real\n key\n text\n /key\n string\nThis application is very cool .. I hope only be added to the dictionary other languages \xe2\x80\x8b\xe2\x80\x8b..\n /string\n key\ntitle\n /key\n string\n8. the dictionary (v1.5)\n /string\n key\ntype\n /key\n string\nreview\n /string\n key\nuser-name\n /key\n string\nRnaa on Dec 16, 2011\n /string\n /dict\n dict\n key\naverage-user-rating\n /key\n real\n1\n /real\n key\ntext\n /key\n string\nHey I#39;m 13 trying to b discovered plz check my 1st video out on you tube its called speak now cover by Bekka burton thnx and I luv luv luv this app\n /string\n key\ntitle\n /key\n string\n9. Love this app+check me out on you tube (v1.5)\n /string\n key\ntype\n /key\n string\n review\n /string\n key\nuser-name\n /key\n string\n Lol\xee\x84\x86 on Dec 16, 2011\n /string\n /dict\n' (Obviously, stripped down to not-well-formed XML, but for conversion purposes that's irrelevant.) -- components: Unicode messages: 149659 nosy: ezio.melotti, silverbacknet priority: normal severity: normal status: open title: bytes.deocde() UnicodeEncodeError on Apple iOS characters type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13618] bytes.decode() UnicodeEncodeError on Apple iOS (16-bit) characters
Changes by Silverback Networks silverback...@gmail.com: -- title: bytes.deocde() UnicodeEncodeError on Apple iOS characters - bytes.decode() UnicodeEncodeError on Apple iOS (16-bit) characters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13618] bytes.decode() UnicodeEncodeError on Apple iOS (16-bit) characters
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13618 ___ ___ 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
New submission from STINNER Victor victor.stin...@haypocalc.com: To factorize the code and to fix encoding issues in the time module, I added functions to decode/encode from/to the locale encoding: PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and PyUnicode_EncodeLocale() (issue #13560). During tests, I realized that os.strerror() should also use the current locale encoding. Do you think that the codec should be exposed in Python? -- The C functions are used by: * the locale module to decode result of locale functions * Py_Main() to decode the PYTHONWARNING environment variable (PyUnicode_DecodeFSDefault can be used here, but PyUnicode_DecodeFSDefault would just call PyUnicode_DecodeLocale because the Python codec is not loaded yet, a funny bootstrap issue) * PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefault[AndSize]() before the locale encoding is known and the Python codec is fully ready * os.strerror() and PyErr_SetFromErrno*() to decode the error message * time.strftime() to encode the format and decode the result if the wcsftime() function is not available and on Windows. On Windows, wcsftime() is available but avoided to workaround an encoding issue in the timezone (see the issue #10653) * time to decode time.tzname The codec can be useful for developers interacting with C functions depending on the locale. Examples: strerror(), strftime(), ... Use the filesystem encoding would be wrong for such function because the locale encoding can be changed by setlocale() with LC_CTYPE or LC_ALL. Use the filesystem encoding would lead to mojibake. Even if the most common usecases of C functions depending on the locale are already covered by the Python standard library, developers may want to bind new functions using ctypes (or something else), and I believe that the locale encoding would be useful for these bindings. -- The problem with a new codec is that it becomes more difficult to choose the right encoding: * filesystem encoding: filenames, directory names, hostname, environment variables, command line arguments * mbcs (ANSI code page): (basically, it is just an alias of the filesystem encoding) * locale: write bindings for new C functions? I suppose that this issue can be solve by writing documentation explaining the usage of each codec. -- Attached patch adds the new locale codec. The major limitation of the current implementation is that the codec only supports the strict and the surrogateescape error handlers. I don't plan to implement other error handlers because I don't think that they would be useful, but it would be possible to implement them. -- I would be nice to fix os.strerror() and time.strftime() in Python 3.2, but I don't want to fix them because it would require to add the locale codec and I don't want to do such change in a stable version. The issue only concerns few people changing their locale encoding at runtime. I hope that everybody uses UTF-8 and never change their locale encoding to something else ;-) -- components: Library (Lib) messages: 149660 nosy: haypo, loewis priority: normal severity: normal status: open title: Add a new codec: locale, the current locale encoding versions: Python 3.3 ___ 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
[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, I think that the current code is good enough to close the issue. I opened a more global issue about the Python codec: #13619. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13560 ___ ___ 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
Changes by STINNER Victor victor.stin...@haypocalc.com: -- keywords: +patch Added file: http://bugs.python.org/file23985/locale_encoding.patch ___ 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
[issue13619] Add a new codec: locale, the current locale encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: # On FreeBSD, Solaris and Mac OS X, b'\xff' can be decoded in # the C locale. The C locale is something like ISO-8859-1, not # 7-bit ASCII. On FreeBSD, it *is* the ISO-8859-1 encoding. -- ___ 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
[issue13586] IDLE: Replace selected not working/consistent with find
Marco Scataglini atlant...@gmx.com added the comment: Win 7 Pro 32bit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13618] bytes.decode() UnicodeEncodeError on Apple iOS (16-bit) characters
Ezio Melotti ezio.melo...@gmail.com added the comment: I tried to decode this with utf-8 and I got '...\U0001f384\U0001f385\U0001f381\U0001f384\U0001f385\U0001f381 if you haven#39;t checked this out yet please do. download APP TRAILERS and go to videos use promo code FREE4U and enjoy free apps courtesy of apple MERRY CHRISTMAS \U0001f384\U0001f385\U0001f381\U0001f384\U0001f385\U0001f381...' How did you get that error? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13618 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com