[issue1176504] locale._build_localename treatment for utf8
Gustavo De Nardin (spuk) gustav...@gmail.com added the comment: We hit this problem with system-config-printer in Mandriva Linux (https://qa.mandriva.com/show_bug.cgi?id=48158). Fixed it with this patch http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/python-2.5.2-fix_UTF-8_name.patch?view=log The UTF8 name was introduced here http://svn.python.org/view?view=revrevision=38027 (4 years and 2 months ago), to account for libc expectations, which seem to have changed again currently. This also seems related or the same as http://bugs.python.org/issue1699853. -- nosy: +spuk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1176504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4263] BufferedWriter non-blocking overage
Sever Băneșiu banesiu.se...@gmail.com added the comment: Looks like the test covering the pre-flush condition is missing. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Georg Brandl ge...@python.org added the comment: Only with security fixes IIRC. Letting Martin decide. -- assignee: pitrou - loewis nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5421] Irritating error message by socket's sendto method
New submission from Manuel Hermann manuel-herm...@gmx.net: When sending unexpected data via a socket's sentdo method, a TypeError is raised with the fallowing message: sendto() takes exactly 3 arguments (2 given). But two arguments are sufficient. Examples for Python 2.x: import socket my_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # this will succeed my_socket.sendto(Foobar, (localhost, 514)) # these will fail with above error message my_socket.sendto(uUmlaut ä, (localhost, 514)) my_socket.sendto(1, (localhost, 514)) Examples for Python 3: import socket my_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # this will succeed my_socket.sendto(No Umlaut.encode(ascii), (localhost, 514)) # these will fail with above error message my_socket.sendto(No Umlaut, (localhost, 514)) my_socket.sendto(1, (localhost, 514)) -- components: Library (Lib) messages: 83187 nosy: helduel severity: normal status: open title: Irritating error message by socket's sendto method versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon
Retro vinet...@gmail.com added the comment: I figured out why the installer didn't create an icon for the Python interpreters in the Add/Remove Programs list. If I deselect the option 'Register Extensions' at installation time, I don't get an icon in the Add/Remove Programs list. But if I leave the option 'Register Extensions' be selected, I get an icon in the Add/Remove Programs list. Please make the icon be registered in the registry even if the option 'Register Extensions' isn't selected at installation time. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Mark Dickinson dicki...@gmail.com added the comment: Would it be acceptable to use shorter float repr only on big-endian and little-endian IEEE 754 platforms, and use the full 17-digit repr on other platforms? This would greatly simplify the adaptation and testing of Gay's code. Notable platforms that would still have long repr under this scheme, in order of decreasing significance: - IBM zSeries mainframes when using their hexadecimal FPU (recent models also have IEEE 754 floating-point, and Linux on zSeries uses that in preference to the hex floating-point). - ARM, Old ABI (uses a mixed-endian IEEE 754 format; a newer set of ABIs appeared recently that use big or little-endian IEEE 754) - Cray SV1 (introduced 1998) and earlier Cray machines. Gay's code doesn't support the Cray floating-point format anyway. I believe that newer Crays (e.g., the X1, introduced in 2003) use IEEE floating-point. - VAX machines, using VAX D and G floating-point formats. More recent Alpha machines support IEEE 754 floats as well. - many ancient machines with weird and wonderful floating-point schemes As far as I can determine, apart from the IBM machines described above all new platforms nowadays use an IEEE 754 double format. Sometimes IEEE arithmetic is only emulated in software; often there are shortcuts taken with respect to NaNs and underflow, but in all cases the underlying format is still IEEE 754, so Gay's code should work. Gay's careful to avoid problems with machines that flush underflow to zero, for example. Gay's code only actually supports 3 floating-point formats: IEEE 754 (big and little-endian), IBM hex format and VAX D floating-point format. There are actually (at least?) two variants of D floating-point: the version used on VAX, which has a 56-bit mantissa and an 8-bit exponent, and the Alpha version, which only has a 53-bit mantissa (but still only an 8-bit exponent); Gay's code only supports the former. I'm quite convinced that the VAX stuff in Gay's code is not worth much to us, so really the only question is whether it's worth keeping the code to support IBM hexadecimal floating-point. Given the difficulty of testing this code and the (significant but not overwhelming) extra complexity it adds, I'd like to remove it. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5422] load pyc file with mbcs file system in update_compiled_module
New submission from 徐洲 x...@163.com: py3k 3.01 static int update_compiled_module(PyCodeObject *co, char *pathname) { PyObject *oldname, *newname; if (!PyUnicode_CompareWithASCIIString(co-co_filename, pathname)) return 0; /* string pathname related with FILE SYSTEM !!! * old code is : * newname = PyUnicode_FromString(pathname); */ newname = PyUnicode_DecodeFSDefault(pathname); if (newname == NULL) return -1; oldname = co-co_filename; Py_INCREF(oldname); update_code_filenames(co, oldname, newname); Py_DECREF(oldname); Py_DECREF(newname); return 1; } -- components: Windows messages: 83190 nosy: joexo severity: normal status: open title: load pyc file with mbcs file system in update_compiled_module type: compile error versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5422] load pyc file with mbcs file system in update_compiled_module
徐洲 x...@163.com added the comment: if directory have chinese word under windows system load .py is passed load .pyc get the utf-8 codec error... i modified this code wish this is helpful... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5422] load pyc file with mbcs file system in update_compiled_module
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I believe this issue is duplicate of issue5273, and fixed yesterday. Can you try latest svn checkout? -- nosy: +ocean-city ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached
New submission from Chris Withers ch...@simplistix.co.uk: Hi All, I'm splitting this out from [Issue1823] as it's a separate issue. Here's a minimal case to reproduce: from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText msg = MIMEMultipart() msg.attach(MIMEText('foo','plain')) msg.set_charset('utf-8') Traceback (most recent call last): File stdin, line 1, in ? File C:\python24\lib\email\Message.py, line 260, in set_charset self._payload = charset.body_encode(self._payload) File C:\python24\lib\email\Charset.py, line 366, in body_encode return email.base64MIME.body_encode(s) File C:\python24\lib\email\base64MIME.py, line 136, in encode enc = b2a_base64(s[i:i + max_unencoded]) TypeError: b2a_base64() argument 1 must be string or read-only buffer, not list NB: The exception raised can vary depending on the character set used: msg.set_charset('iso-8859-15') Traceback (most recent call last): File stdin, line 1, in ? File C:\python24\lib\email\Message.py, line 260, in set_charset self._payload = charset.body_encode(self._payload) File C:\python24\lib\email\Charset.py, line 368, in body_encode return email.quopriMIME.body_encode(s) File C:\python24\lib\email\quopriMIME.py, line 180, in encode body = fix_eols(body) File C:\python24\lib\email\Utils.py, line 62, in fix_eols s = re.sub(r'(?!\r)\n', CRLF, s) File C:\python24\lib\sre.py, line 142, in sub return _compile(pattern, 0).sub(repl, string, count) TypeError: expected string or buffer Chris -- messages: 83193 nosy: Sharebear, barry, christian.heimes, cjw296, loewis severity: normal status: open title: Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart
Chris Withers ch...@simplistix.co.uk added the comment: Okay, splitting this out a little. I've moved the exception when setting character set after adding parts out to [Issue5423]. Here's a simpler example of the problem with setting character sets on multiparts: from email.MIMEMultipart import MIMEMultipart msg = MIMEMultipart() msg.set_charset('iso-8859-15') print msg.as_string() MIME-Version: 1.0 Content-Type: multipart/mixed; charset=iso-8859-15; boundary1300027372== Content-Transfer-Encoding: quoted-printable As a programmer, I don't think I've done anything wrong, but that mail is not valid and causes some fussy MTAs to barf and show the message as blank. That said, when would you ever need or want to set the character set on a MIMEMultipart? I have this in my code, but I suspect I was just sheep/paranoia programming. When would just making set_charset on a MIMEMultipart raise an exception cause problems? -- nosy: +cjw296 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1823 ___ ___ 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
New submission from Philipp Hagemeister phi...@phihag.de: Currently, the testStringToIPv6 and testIPv6ToStrings tests in Lib/test/test_socket.py only check for variants 1 and 2 (but not 3) from RFC 4291 2.2. Furthermore, there are no assertions that check wrong inputs are appropriately refused in any of the packed IP conversion tests. The attached patch adds a number of assertions covering those. -- components: Tests files: extend-packed-ip-tests-trunk2.x.diff keywords: patch messages: 83195 nosy: phihag severity: normal status: open title: Packed IPaddr conversion tests should be extended type: feature request versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13247/extend-packed-ip-tests-trunk2.x.diff ___ 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
[issue5422] load pyc file with mbcs file system in update_compiled_module
徐洲 x...@163.com added the comment: Oh... yes this is fixed thx a lot for u check out ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5422] load pyc file with mbcs file system in update_compiled_module
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: -- dependencies: +3.0.1 crashes in unicode path resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5422] load pyc file with mbcs file system in update_compiled_module
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: -- dependencies: -3.0.1 crashes in unicode path superseder: - 3.0.1 crashes in unicode path ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5385] mmap can crash after resize failure (windows)
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Fixed in r70189. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5385 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5425] 2to3 wrong for types.StringTypes
New submission from Hagen Fürstenau hfuerste...@gmx.net: In Python 2.6 we have types.StringTypes (type 'str', type 'unicode') but 2to3 translates types.StringTypes into str, which is obviously wrong. The attached patch changes it into (str, bytes). -- components: 2to3 (2.x to 3.0 conversion tool) files: 2to3_StringTypes.patch keywords: patch messages: 83198 nosy: hagen severity: normal status: open title: 2to3 wrong for types.StringTypes type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13248/2to3_StringTypes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Guido van Rossum gu...@python.org added the comment: Sounds good to me. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1580] Use shorter float repr when possible
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: +1 on the fallback strategy for platforms we don't know how to handle. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2733] mmap resize fails on anonymous memory (Windows)
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: More two cents which I noticed. (After the patch was applied) 1. On windows, resize for anonymous map can clear its contents. import mmap m = mmap.mmap(-1, 10) m[:] = 0123456789 m[:] '0123456789' m.resize(20) m[:] '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0' 2. Anonymous map on unix also has similar problem. ftruncate() fails for fd == -1 Sorry for having clear solution for this. But I cannot say This is what mmap.resize should behave!. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2733] mmap resize fails on anonymous memory (Windows)
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: - Sorry for having clear solution for this. + Sorry for having no clear solution for this. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2733 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
New submission from Mitchell Model m...@acm.org: Line 136 of the 3.0 README and line 179 of the 3.1 README state that the executable on OSX is called python.exe. It's not. -- assignee: georg.brandl components: Documentation messages: 83203 nosy: MLModel, georg.brandl severity: normal status: open title: README slight error re OSX versions: Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
Georg Brandl ge...@python.org added the comment: So it is just called python? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
Guido van Rossum gu...@python.org added the comment: What makes you think it is not called python.exe? Maybe you're confused by the Finder's auto-hiding of externsions? -- nosy: +gvanrossum resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5198] Strange DeprecationWarning behaviour in module struct
Ilya Sandler isand...@users.sourceforge.net added the comment: It appears that the different behavior results from trying to preserve backward compatibility with earlier version of Python see: http://bugs.python.org/issue1229380 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Guido van Rossum gu...@python.org added the comment: Well, this one is technically a security fix, though I have no idea how it could be exploited unless you offer your users a facility to execute arbitrary Python code. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
Mitchell Model m...@acm.org added the comment: Nothing on OSX is ever named .exe. On OSX building and installing Python with configure --enable-framework installs an executable just called 'python' in /Library/Frameworks/Python.framework/Versions/3.1/bin (using 3.1 as an example). It also creates double-clickable applications whose real name is Python.app and IDLE.app. Whether to see the .app extensions on packages that are applications is a Finder preference, so most users won't see the .app. If the build was configured without frameworks, then an executable named in the Unix style -- just python -- is installed in /usr/local/bin (by default) or wherever else was specified with the configure --prefix option. -- -- --- Mitchell Added file: http://bugs.python.org/file13249/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___!doctype html public -//W3C//DTD W3 HTML//EN htmlheadstyle type=text/css!-- blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 } --/styletitleRe: [issue5426] README slight error re OSX/title/headbody divNothing on OSX is ever named .exe./div divbr/div divOn OSX building and installing Python with quot;configure --enable-frameworkquot; installs an executable just called 'python' in /Library/Frameworks/Python.framework/Versions/3.1/bin (using 3.1 as an example). It also creates double-clickable applications whose real name is Python.app and IDLE.app.nbsp; Whether to see the .app extensions on quot;packagesquot; that are applications is a Finder preference, so most users won't see the .app./div divbr/div divIf the build was configured without frameworks, then an executable named in the Unix style -- just python -- is installed in /usr/local/bin (by default) or wherever else was specified with the configure --prefix option./div divtt-- /tt/div div-- br br nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; --- Mitchell/div /body /html___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
Guido van Rossum gu...@python.org added the comment: That sentence however does not refer to the name of the installed Python binary, but the binary as it is built in the source tree (or a build directory). And there we chose to call it python.exe because we couldn't call it python because there is already a directory named Python, which (on the default case-insensitive filesystem) conflicts with the executable name. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3320] various doc typos
DSM dsm...@users.sourceforge.net added the comment: Commenting only to draw attention to the trivial typo in mp_distributing.py, because jnoller's post on the mailing list reminded me about it. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5427] OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o)
New submission from Mitchell Model m...@acm.org: Trying to build 3.1 in recent 'svn update's on OSX 10.5 after make clean configure --enable-framework I get the following error near the end of the build: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) I even tried deleting all the files and checking them out again, but I got the same error. -- components: Build messages: 83211 nosy: MLModel severity: normal status: open title: OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o) versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3320] various doc typos
Jesse Noller jnol...@gmail.com added the comment: Totally missed this issue, thanks for commenting. Will get on this soonish ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3320] various doc typos
Jesse Noller jnol...@gmail.com added the comment: Assigning to me to resolve final issue -- assignee: georg.brandl - jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1113328] OSATerminology still semi-broken
hhas h...@users.sourceforge.net added the comment: No idea, be honest. The original patch was created for 2.3, and I've no free time to look into it myself now. BTW, note that nobody uses this module any more; it's deprecated in 2.6, absent in 3.0, and OSAGetAppTerminology() is deprecated in OS X 10.5 as well. I've already recommended that this and other bugs related to now- deprecated MacPython-only APIs be closed as won't fix. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1113328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5425] 2to3 wrong for types.StringTypes
Benjamin Peterson benja...@python.org added the comment: It's hard to guess the intention of types.StringTypes since it may mean text strings or text and byte strings. I'm tempted to just remove the transformation at all and issue a warning. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5426] README slight error re OSX
Mitchell Model m...@acm.org added the comment: Whoops! It didn't say the executable that gets built is called python.exe, but it is in the build section, so taking things literally, yes, the executable is called python.exe and I maybe should have taken it at its word. There's a subtle problem in the wording since the executable almost always suggests the program you run. It's a little weird -- though I see your point about why it's done that way -- to build an executable that gets installed as a different name. (Well, maybe installed with version number as part of the name.) So even if the README is literally correct I do think it lays a subtle trap for the reader that could be avoided with a slight rewording. Not important -- I'm just trying to help by pointing out documentation problems as I come across them. Most of them have been real. -- -- --- Mitchell Added file: http://bugs.python.org/file13250/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5426 ___!doctype html public -//W3C//DTD W3 HTML//EN htmlheadstyle type=text/css!-- blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 } --/styletitleRe: [issue5426] README slight error re OSX/title/headbody divWhoops! It didn't say quot;the executable that gets built is called python.exequot;, but it is in the build section, so taking things literally, yes, the executable is called python.exe and I maybe should have taken it at its word./div divbr/div divThere's a subtle problem in the wording since quot;the executablequot; almost always suggests quot;the program you runquot;. It's a little weird -- though I see your point about why it's done that way -- to build an executable that gets installed as a different name. (Well, maybe installed withnbsp; version number as part of the name.) So even if the README is literally correct I do think it lays a subtle trap for the reader that could be avoided with a slight rewording.nbsp; Not important -- I'm just trying to help by pointing out documentation problems as I come across them. Most of them have been real./div divtt-- /tt/div div-- br br nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; --- Mitchell/div /body /html___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1717] Get rid of more references to __cmp__
Changes by Benjamin Peterson benja...@python.org: -- priority: release blocker - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Can't use _functools.partial() created function as method
Changes by Christophe Simonis simonis.christo...@gmail.com: -- nosy: +Christophe Simonis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4192] Subprocess error with I/O redirection to Pipes
Pascal Chambon chambon.pas...@gmail.com added the comment: Thansk a lot for reviewing the problem Indeed, p.wait() seems to do the trick in this case. Is there any global way to avoid such pipe problems ? I mean, in any case, one end of each pipe has to be closed before the other end, so such errors might occur with the child process' stdin (in case the child dies first and the parent flushes then its pipe toward the child's stdin) or with its stdout (if the parent dies first and the child flushes then its stdout). Or are we sure that there won't be errors as long as children die before the parent process ? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5334] array.fromfile() fails to insert values when EOFError is raised
Benjamin Peterson benja...@python.org added the comment: Patch looks good. Please apply. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5421] Irritating error message by socket's sendto method
Changes by Benjamin Peterson benja...@python.org: -- stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Martin v. Löwis mar...@v.loewis.de added the comment: I agree it is technically a security fix, so somebody please feel free to commit it. I will make another 2.5 release when enough of these have accumulated, or something urgent happens, or somebody wants to see a release really badly :-) -- assignee: loewis - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: works for me - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon
Martin v. Löwis mar...@v.loewis.de added the comment: I give this low priority, i.e. might not work on it for several months (or ever). Contributions are welcome. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5425] 2to3 wrong for types.StringTypes
Martin v. Löwis mar...@v.loewis.de added the comment: I agree with Benjamin. Translation into (str, bytes) is incorrect. I don't agree that it is obvious that the translation into str is incorrect. Recommend closing as reject. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()
Guido van Rossum gu...@python.org added the comment: OK, submitted. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5425] 2to3 wrong for types.StringTypes
Changes by Benjamin Peterson benja...@python.org: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5428] Pyshell history management error
New submission from Michel Weinachter mic...@weinachter.com: I have created a variable named liste_de_courses when I use Alt-P to gather a previous command and modify it I have the following error: liste_de_courses.append(’b') SyntaxError: invalid character in identifier (pyshell#21, line 1) There is no issue in the command line. -- components: IDLE messages: 83223 nosy: datamoc severity: normal status: open title: Pyshell history management error type: behavior versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4263] BufferedWriter non-blocking overage
Benjamin Peterson benja...@python.org added the comment: 2009/3/5 Sever Băneșiu rep...@bugs.python.org: Sever Băneșiu banesiu.se...@gmail.com added the comment: Looks like the test covering the pre-flush condition is missing. That test is no longer applicable because max_buffer_size is deprecated and unused. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4263 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5428] Pyshell history management error
Georg Brandl ge...@python.org added the comment: The code you pasted contains a non-ASCII quote (’). -- nosy: +georg.brandl resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5428 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5427] OSX framework make error: ld: duplicate symbol _PyExc_BlockingIOError in libpython3.1.a(_iobase.o) and libpython3.1.a(io.o)
Benjamin Peterson benja...@python.org added the comment: This should be fixed as of r70198. Make sure to run make clean. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5429] Core dumps on the Solaris buildbot
New submission from Antoine Pitrou pit...@free.fr: It has been happening for a few days now... may be related to the IO-C merge. http://www.python.org/dev/buildbot/3.x.stable/ -- components: Tests messages: 83227 nosy: benjamin.peterson, pitrou priority: high severity: normal status: open title: Core dumps on the Solaris buildbot type: crash versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5421] Irritating error message by socket's sendto method
Luk Knapen luk.kna...@telenet.be added the comment: File $python/lib/python3.0/logging/handlers.py Line 782 : a bytes object is required instead of a string. As a consequence, encoding shall be specified : but which one ? Is : self.socket.sendto(msg, self.address) Should look like : self.socket.sendto(bytes(msg,'ascii'), self.address) -- nosy: +lukknapen versions: +Python 3.1 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Tennessee Leeuwenburg tleeuwenb...@gmail.com added the comment: Patch covering all files in a single patch. * Updated warning message * Updated multiprocessing tests to avoid calls to empty and full * Placed deprecation warning in multiprocessing methods * Update wsgui to avoid deprecated calls Issues: * Noticed no warnings raised as a result of changes to multiprocessing: ergo multiprocessing.queue empty() and full() methods are not currently getting test coverage * No obvious test rig for wsgui, so code is completely untested (!), but I figured someone closer to wsgui could at least have my code for reference, so included in the patch Added file: http://bugs.python.org/file13251/queue_patch.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Tennessee Leeuwenburg tleeuwenb...@gmail.com added the comment: Hi JP, I experimented with stacklevel but to be honest nothing I saw appeared greatly more useful than the default for the tests in question. What form would the unit tests take? Trying to assert that empty() and full() raised a deprecation warning? I'm not sure how I would go about that, but I'll see what I can do. Thanks, -Tennessee On Thu, Mar 5, 2009 at 3:00 PM, Jean-Paul Calderone rep...@bugs.python.orgwrote: Jean-Paul Calderone exar...@divmod.com added the comment: Unit tests are a great thing as well. Also, the deprecation warnings you've added are the really annoying kind. They refer to users to the source of the deprecated methods themselves! A vastly preferable use of the warnings system is to refer users to the *callers* of the deprecated methods. Try passing different values for the stacklevel parameter of the warnings.warn function until you get a warning that is more helpful. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ Added file: http://bugs.python.org/file13252/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___Hi JP,brbrI experimented with stacklevel but to be honest nothing I saw appeared greatly more useful than the default for the tests in question.brbrWhat form would the unit tests take? Trying to assert that empty() and full() raised a deprecation warning? I#39;m not sure how I would go about that, but I#39;ll see what I can do.br brThanks,br-Tennesseebrbrdiv class=gmail_quoteOn Thu, Mar 5, 2009 at 3:00 PM, Jean-Paul Calderone span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; br Jean-Paul Calderone lt;a href=mailto:exar...@divmod.com;exar...@divmod.com/agt; added the comment:br br Unit tests are a great thing as well. Â Also, the deprecation warningsbr you#39;ve added are the really annoying kind. Â They refer to users to thebr source of the deprecated methods themselves! Â A vastly preferable use ofbr the warnings system is to refer users to the *callers* of the deprecatedbr methods. Â Try passing different values for the stacklevel parameter ofbr the warnings.warn function until you get a warning that is more helpful.br br --br nosy: +exarkunbr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue5420; target=_blankhttp://bugs.python.org/issue5420/agt;br ___br /div/div/blockquote/divbrbr clear=allbr-- br--brTennessee Leeuwenburgbra href=http://myownhat.blogspot.com/;http://myownhat.blogspot.com//abrquot;Don#39;t believe everything you thinkquot;br ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: rhettinger - benjamin.peterson nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Changes by Tennessee Leeuwenburg tleeuwenb...@gmail.com: Removed file: http://bugs.python.org/file13252/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Changes by Jesse Noller jnol...@gmail.com: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Jesse Noller jnol...@gmail.com added the comment: Quote: Issues: * Noticed no warnings raised as a result of changes to multiprocessing: ergo multiprocessing.queue empty() and full() methods are not currently getting test coverage ? I need to check this. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering
R. David Murray rdmur...@bitdance.com added the comment: I have now had time to test this. My use case (reading text from a pipe and wanting the most recent complete line returned immediatly as it is avaialable) is satisified by both the io.py code and the io c code from the py3k branch. I haven't been able to figure out how to write an automated test, though :(. I also had a fun time (I mean that literally) wandering through the code and docs convincing myself that the 3.1a0 docs cover all the issues I raised in this ticket. I played around with a test case that helped convince me the implementations match the 3.1a0 docs for the issues I was concerned about. So, IMO this ticket can be closed as fixed in 3.1a0. --RDM ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Benjamin Peterson benja...@python.org added the comment: You should test that the warnings are given by the deprecated methods. Look at test_py3kwarn for an example of how to do that. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue814253] Grouprefs in lookbehind assertions
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: As part of issue #2636 group references now work in lookbehinds. However, your example: (?=(...)\1)abc will fail but: (?=\1(...))abc will succeed. Why? Well, in lookbehinds it searches backwards. In the first regex it sees the group reference before the capture, whereas in the second it sees the group reference after the capture. (Hope that's clear! :-)) -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue814253 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5334] array.fromfile() fails to insert values when EOFError is raised
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Committed in r70203(py3k) -- priority: release blocker - resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5420] Queue deprecation warning patch
Tennessee Leeuwenburg tleeuwenb...@gmail.com added the comment: Now, with unit tests... :) Added file: http://bugs.python.org/file13253/queue_patch3.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue400608] just testing
Daniel Diniz aja...@gmail.com added the comment: Reviewers: , Message: While this is a test issue, the attached diff is a crude first draft of a patched upload.py that makes linking to the Python Tracker a bit easier. Here's the command line and output: $ python static/upload.py -R 400608 -F msg32813 Upload server: [...] Loaded authentication cookies [...] Issue created. URL: http://codereview.appspot.com/25073 Uploading base file for static/upload.py And the help is: $ python static/upload.py -h | tail -n5 Link options: -R ROUNDUP, --roundup=ROUNDUP Python tracker issue number to link with. -F FETCHDESCR, --fetch_descr=FETCHDESCR Tracker file or message to fetch description from. I like it :) Description: wish we could expunge the deleted ones Please review this at http://codereview.appspot.com/25073 Affected files: M static/upload.py Index: static/upload.py === --- static/upload.py(revision 402) +++ static/upload.py(working copy) @@ -61,7 +61,31 @@ # Max size of patch or base file. MAX_UPLOAD_SIZE = 900 * 1024 +fields = {'issue':'title', 'msg':'content', 'file':'description', } +def fetch_item(nodeid, kind='issue', tracker='http://bugs.python.org'): + query_tpl = [('@action', 'export_csv'), ('@filter', 'id'), + ('id', nodeid), ('@columns', fields[kind])] + item_url = '/%s?%s' % (kind, urllib.urlencode(query_tpl)) + content = urllib.urlopen(tracker + item_url).read().split('\r\n') + if content[0] == 'title': +return '[issue%s] %s' % (nodeid, content[1].strip()) + elif content[0] == 'content' or content[0] == 'description': +return content[1].strip() +def fetch(nodeid): + try: +result = fetch_item(int(nodeid)) + except ValueError: +if nodeid.startswith('msg'): + nodeid = nodeid.replace('msg', '') + result = fetch_item(int(nodeid), 'msg') +elif nodeid.startswith('file'): + nodeid = nodeid.replace('file', '') + result = fetch_item(int(nodeid), 'file') +else: + raise + return result + def GetEmail(prompt): Prompts the user for their email address and returns it. @@ -453,6 +477,14 @@ group.add_option(--send_mail, action=store_true, dest=send_mail, default=False, help=Send notification email to reviewers.) +# Link options +group = parser.add_option_group(Link options) +group.add_option(-R, --roundup, action=store, dest=roundup, + metavar=ROUNDUP, default=None, + help=Python tracker issue number to link with.) +group.add_option(-F, --fetch_descr, action=store, dest=fetch_descr, + metavar=FETCHDESCR, default=None, + help=Tracker file or message to fetch description from.) def GetRpcServer(options): @@ -1291,7 +1323,10 @@ prompt = Message describing this patch set: else: prompt = New issue subject: - message = options.message or raw_input(prompt).strip() + if options.roundup: +message = fetch(options.roundup) + else: +message = options.message or raw_input(prompt).strip() if not message: ErrorExit(A non-empty message is required) rpc_server = GetRpcServer(options) @@ -1307,11 +1342,16 @@ if @ in reviewer and not reviewer.split(@)[1].count(.) == 1: ErrorExit(Invalid email address: %s % reviewer) form_fields.append((reviewers, options.reviewers)) + tracker_email = 'rep...@bugs.python.org,' if options.cc: for cc in options.cc.split(','): if @ in cc and not cc.split(@)[1].count(.) == 1: ErrorExit(Invalid email address: %s % cc) -form_fields.append((cc, options.cc)) +if options.roundup: + cc = tracker_email + options.cc +form_fields.append((cc, cc)) + elif options.roundup: +form_fields.append((cc, tracker_email[:-1])) description = options.description if options.description_file: if options.description: @@ -1319,6 +1359,9 @@ file = open(options.description_file, 'r') description = file.read() file.close() + elif options.fetch_descr: +# XXX Add error handling as above +description = fetch(options.fetch_descr) if description: form_fields.append((description, description)) # Send a hash of all the base file so the server can determine if a copy -- nosy: +ajaksu2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue400608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2771] test issue
Daniel Diniz aja...@gmail.com added the comment: Reviewers: , Description: This is a very long line. I am wondering how it will be wrapped. What will happen to this exceedingly long line? Will it be wrapped? Will it? Really? What will happen? Here's an example: def fact(n): if n 1: return n * fact(n-1) else: assert n in (0, 1) return 1 What do you think of that? Please review this at http://codereview.appspot.com/24075 Affected files: M static/upload.py Index: static/upload.py === --- static/upload.py(revision 402) +++ static/upload.py(working copy) @@ -61,7 +61,30 @@ # Max size of patch or base file. MAX_UPLOAD_SIZE = 900 * 1024 +#python static/upload.py -R 2771 -F msg66272 --send_mail +fields = {'issue':'title', 'msg':'content', 'file':'description', } +def fetch_item(nodeid, kind='issue', tracker='http://bugs.python.org'): + query_tpl = [('@action', 'export_csv'), ('@filter', 'id'), + ('id', nodeid), ('@columns', fields[kind])] + item_url = '/%s?%s' % (kind, urllib.urlencode(query_tpl)) + content = urllib.urlopen(tracker + item_url).read().split('\r\n') + if content[0] == 'title': +return '[issue%s] %s' % (nodeid, content[1].strip()) + elif content[0] == 'content' or content[0] == 'description': +return content[1].strip() +def fetch(nodeid, debug=True): + kind = 'issue' + if nodeid.startswith('msg'): +kind = 'msg' + elif nodeid.startswith('file'): +kind = 'file' + nodeid = nodeid.replace(kind, '') + result = fetch_item(int(nodeid), kind) + if debug: +logging.info('Fetched %s: %s' % (kind, result)) + return result + def GetEmail(prompt): Prompts the user for their email address and returns it. @@ -453,6 +476,14 @@ group.add_option(--send_mail, action=store_true, dest=send_mail, default=False, help=Send notification email to reviewers.) +# Link options +group = parser.add_option_group(Link options) +group.add_option(-R, --roundup, action=store, dest=roundup, + metavar=ROUNDUP, default=None, + help=Python tracker issue number to link with.) +group.add_option(-F, --fetch_descr, action=store, dest=fetch_descr, + metavar=FETCHDESCR, default=None, + help=Tracker file or message to fetch description from.) def GetRpcServer(options): @@ -1291,7 +1322,10 @@ prompt = Message describing this patch set: else: prompt = New issue subject: - message = options.message or raw_input(prompt).strip() + if options.roundup: +message = fetch(options.roundup) + else: +message = options.message or raw_input(prompt).strip() if not message: ErrorExit(A non-empty message is required) rpc_server = GetRpcServer(options) @@ -1307,11 +1341,16 @@ if @ in reviewer and not reviewer.split(@)[1].count(.) == 1: ErrorExit(Invalid email address: %s % reviewer) form_fields.append((reviewers, options.reviewers)) + tracker_email = 'rep...@bugs.python.org,' if options.cc: for cc in options.cc.split(','): if @ in cc and not cc.split(@)[1].count(.) == 1: ErrorExit(Invalid email address: %s % cc) -form_fields.append((cc, options.cc)) +if options.roundup: + cc = tracker_email + options.cc +form_fields.append((cc, cc)) + elif options.roundup: +form_fields.append((cc, tracker_email[:-1])) description = options.description if options.description_file: if options.description: @@ -1319,6 +1358,9 @@ file = open(options.description_file, 'r') description = file.read() file.close() + elif options.fetch_descr: +# XXX Add error handling as above +description = fetch(options.fetch_descr) if description: form_fields.append((description, description)) # Send a hash of all the base file so the server can determine if a copy -- nosy: +ajaksu2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue400608] just testing
Guido van Rossum gu...@python.org added the comment: This is specific to the Python tracker, which Rietveld tries to avoid. You could maintain this as a locally modified version, but a better approach would be to make just enough changes to upload.py itself so that you can write the rest of this script as a *wrapper* around upload.py. That's how the Chrome people manage their workflow, and that's a generally recommended approach: the wrapper does the project-specific stuff, passing everything to upload.py for the actual interaction with Rietveld. PS. What do you mean by wish we could expunge the deleted ones? If you delete a Rietveld issue it is really gone. If you merely close it, you can still delete it later. But I'm probably missing something. http://codereview.appspot.com/25073 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue400608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5425] 2to3 wrong for types.StringTypes
Hagen Fürstenau hfuerste...@gmx.net added the comment: Why I considered the existing translation incorrect was because it translates something which was a tuple of types in Python 2.x into a type of Python 3.x. I fail to see how this can be useful. (A check like x in types.StringTypes gets translated into x in str, which will always fail.) I agree that translating into (str, bytes) won't always be correct, but it seems to have a much better chance of being correct than the existing translation into str. Otherwise it should at least be (str,). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5425 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5430] Must not replace LF or CR by CRLF in literals
New submission from Memeplex carlosjosep...@gmail.com: For example, after that normalization, quoted printable encoded headers (as described at rfc 2047) longer than 76 characters are splitted in two different ill-formed headers because the soft LF line break becomes a hard CRLF one. This is clearly wrong. rfc 2060 specifically allows CR and LF inside literals: A literal is a sequence of zero or more octets (including CR and LF), prefix-quoted with an octet count in the form of an open brace ({), the number of octets, close brace (}), and CRLF. -- components: Library (Lib) messages: 83241 nosy: memeplex severity: normal status: open title: Must not replace LF or CR by CRLF in literals type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5430] imaplib: must not replace LF or CR by CRLF in literals
Changes by Memeplex carlosjosep...@gmail.com: -- title: Must not replace LF or CR by CRLF in literals - imaplib: must not replace LF or CR by CRLF in literals ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5430 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com