[issue28080] Allow reading member names with bogus encodings in zipfile

2022-03-23 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I'm not going to have time to look at the PR for a couple days. I don't understand what the use case is for writing or appending with filenames in a non-UTF-8 encoding. At least in my experience, reading such files is rare, but I have never been asked

[issue39673] Map errno==ETIME to TimeoutError

2020-05-25 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: First, let me say I like Giampaolo's TimeoutExpired *much* better as the name for this kind of exception! But that ship has sailed. I don't understand Giampaolo's comment. If I understand the claim correctly, the problem is that people who should

[issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I prefer Josh's wording. The important point to me is that >>> [1, 2][2:0] = "AB" [1, 2, "A", "B"] not an error or ["B", "A"] == [1, 2][2:0:-1]. I think too much talk about the

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Sorry, I just realized this note only applies to slices with a stride (k in i:j:k). Closing. -- stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://

[issue30138] Incorrect documentation of replacement of slice of length 0

2017-04-22 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull: In section 4.6.3. "Mutable Sequence Types" of current documentation, Note 1 to the table says "[iterable] t must have the same length as the slice it is replacing." This is incorrect in the case of extension: s[len(s):] = t a

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-12-27 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Thanks for followup! I was just about to write you, now that 3.6 is out. Season's Greetings! First, how do you propose to proceed with issue28115 ("use argparse for the ZipFile module")? If you expect to commit that first (I'm i

[issue28032] --with-lto builds segfault in many situations

2016-11-20 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: FWIW, XEmacs has used a bit of m4 magic to make --with-* and --enable-* equivalent for 15 years, and nobody has ever complained. The autotools convention is a distinction without a difference, and confuses users when a program feature depends

[issue28102] zipfile.py script should print usage to stderr

2016-09-12 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: CA pending (I have received PDF, but no star in tracker yet). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28103] Style fix in zipfile.rst

2016-09-12 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull: Makes style of references to open modes 'r', 'a', ... more consistent. CA pending (I have received PDF, but no star in tracker yet). -- assignee: docs@python components: Documentation files: zipfile-doc-style messages: 276058 nosy: docs@python

[issue28102] zipfile.py script should print usage to stderr

2016-09-12 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull: Pointed out by Serhiy Storchaka in a different context. -- components: Library (Lib) files: zipfile-errmsg keywords: patch messages: 276056 nosy: sjt priority: normal severity: normal status: open title: zipfile.py script should print usage

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-12 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Cleaned up a few loose ends while it's all fresh in mind. Will ping python-dev in 4-6 weeks for review for 3.7. Thanks to Serhiy for review. The current version of the patch is much improved over the initial submission due to his efforts

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-12 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: If you have a workaround that's available to nonprogrammers, I'd like to hear about it. I have found none, that's why I went to the trouble to put together a patch even though I knew that the odds of actually getting it in to Python 3.6 was very low

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-11 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Can't reply on Rietveld? Lost 2 hours work! Patch updated (encoded-member-names-v2), most changes accepted. Not happy about name change or default to cp437, I want this API to be hard to use and not be part of the normal process (utf-8 or cp437

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-11 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Re: wait for 3.7 if reviewers are busy, understood. N.B. Contributor agreement is now on file (I received the PDF from python.org already). Re: existing patches: My patch is very similar in the basic approach to Sergey Dorofeev's patch in issue10614

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-11 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I should have a contributor agreement form on file. Ned Deily suggested that I try to get this patch in before the 12 noon deadline Sept. 12, so here it is. I believe the patch is "safe" in the sense that its functionality needs to be explicit

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-11 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Suggested NEWS/whatsnew entry: Add a new *memberNameEncoding* argument to the ZipFile constructor, allowing :mod:`zipfile` to read filenames in non-conforming encodings from the zipfile as Unicode. This implementation assumes all member names have

[issue28080] Allow reading member names with bogus encodings in zipfile

2016-09-11 Thread Stephen J. Turnbull
Changes by Stephen J. Turnbull <step...@xemacs.org>: -- components: Library (Lib) keywords: patch nosy: sjt priority: normal severity: normal status: open title: Allow reading member names with bogus encodings in zipfile type: enhancement versions: Pyth

[issue27582] Mispositioned SyntaxError caret for unknown code points

2016-07-21 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I still think the easiest thing to do would be to make all non-ASCII characters instances of "invalid_character_token", self-delimiting in the same way that operators are. That would automatically point to exactly the right place in the to

[issue27257] get_addresses results in traceback with a valid? header

2016-06-08 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: OK, I can reproduce now. $ python3.5 Python 3.5.0 (v3.5.0:374f501f4567, Sep 17 2015, 17:04:56) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin Type "help", "copyright", "credits" or "license"

[issue27257] get_addresses results in traceback with a valid? header

2016-06-08 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: In Python 3.5, both entering the problematic header by hand with a trivial body and using email.message_from_string to parse it, and calling email.message_from_file on lkml-exception.mail, produce an email.message.Message with no defects and no traceback

[issue24682] Add Quick Start: Communications section to devguide

2015-12-05 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I just reviewed again, and I agree it's ready for merge. I don't see any immediate need to add more. Unfortunately, I'm not a committer. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue24682] Add Quick Start: Communications section to devguide

2015-07-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: If the mailing list code of conduct is to be fleshed out, Paul Moore's post is a good place to start IMO: https://mail.python.org/pipermail/python-dev/2015-July/140872.html. -- nosy: +sjt ___ Python tracker

[issue24682] Add Quick Start: Communications section to devguide

2015-07-22 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I tend to disagree with Ezio about a FAQ for general questions. A pointer to appropriate alternatives for off-topic posts in the Mailman listinfo descriptions of the various list (which can be copied into the devguide, or linked from

[issue18814] Add codecs.convert_surrogateescape to clean surrogate escaped strings

2015-05-09 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Please do not add the rehandle functions to codecs. They do not change the (duck-typed) representation of data while maintaining the semantics, they change the semantics of data while retaining the representation. I suggest a validation submodule

[issue14983] email.generator should always add newlines after closing boundaries

2013-09-21 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Seems this hasn't been resolved. I have to disagree with David's interpretation of RFC 2046. The definition of a boundary says that it is terminated with a CRLF. It also clarifies that the introducing CRLF is conceptually part of the boundary. Thus

[issue14983] email.generator should always add newlines after closing boundaries

2013-09-21 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Following OpenPGP convention is clearly optional (or maybe a SHOULD, but the word elect makes it a pretty weak SHOULD). RFC 2046 is a MUST, it's not a matter of convention. The problem is that a parser that works forward in the message will swallow

[issue18891] Master patch for content manager addtion to email package.

2013-09-03 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I'm thinking this may be overengineering, but I may as well post it and find out for sure. :-) Is it worth encapsulating MIME types? They're really pairs as far as mail handling applications are concerned, but they have a string representation. So

[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I did emerge =dev-lang/python-2.7.5-r1 *twice* with the environment configuration described in msg196520, then *once* with it disabled because one of the cases you described was when you tried to revert to a non-debug Python. (Besides, I am willing

[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: OK, I backed off the aggressive CFLAGS/CXXFLAGS to -ggdb -pipe, and ran emerge =dev-lang/python-2.7.5-r1 *once* each with and without the 'EXTRA_ECONF=--with-pydebug' flag. Compiled with GCC 4.7.3. No crash, same test results as described previously

[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-08-31 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Yeah, hope is a good thing. But I've spent the last 20 years debugging an X11 application based on a Lisp interpreter, I save hope for fireflies, my dog, and my daughter these days. :-) To the OP: I don't follow Gentoo closely, but I have acquaintances

[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-08-29 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I have a gentoo host, but I'd like to know how did the OP get a debug Python in the first place? The ebuild for python 2.7.5-r1 doesn't say anything about debug options. How would preferably include information about the C compiler used, etc

[issue18606] Add statistics module to standard library

2013-08-08 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: A few small comments and nits. 1. I'm with the author on the question of a sum function in this module. The arguments that builtin sum isn't accurate enough, and neither is math.fsum for cases where all data is of infinite precision, are enough for me

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-06 Thread Stephen J. Turnbull
Stephen J. Turnbull step...@xemacs.org added the comment: I agree with you that according to RFC1428, use of unknown-8bit is implicitly recommended. However, note that the RFC itself is not standards-track. I agree with your interpretation that in this context the email module should

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-23 Thread Stephen J. Turnbull
Stephen J. Turnbull step...@xemacs.org added the comment: Re: msg124528 Yes, XEmacs installs a signal handler on what are normally fatal errors. (I don't know about GNU Emacs but they probably do too.) The handler has two functions: to display a Lisp backtrace and to output a message

[issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally

2010-10-08 Thread Stephen J. Turnbull
Changes by Stephen J. Turnbull step...@xemacs.org: -- nosy: +sjt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9873 ___ ___ Python-bugs-list

[issue6315] locale._build_localename(locale.getdefaultlocale()) returns 'C.mac-roman'

2009-06-20 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull step...@xemacs.org: Which causes the locale machinery to spit exceptions, and the program to die, usually (eg, hg). This manifests naturally on an Intel Mac, Mac OS X 10.5.7, but the problem behavior is in _build_localename. When called

[issue5252] 2to3 should detect and delete import of removed statvfs module

2009-02-14 Thread Stephen J. Turnbull
Stephen J. Turnbull step...@xemacs.org added the comment: Benjamin Peterson writes: Hmm. 2to3 doesn't currently mess with the stat module and os.stat the more common function. Also the new interface (attributes on the objects returned) has been around since 2.2. So what? You *can't

[issue5252] 2to3 should detect and delete import of removed statvfs module

2009-02-13 Thread Stephen J. Turnbull
New submission from Stephen J. Turnbull step...@xemacs.org: It should also try to convert stuff like from statvfs import F_BAVAIL, F_FRSIZE status = os.statvfs(directory) available = status[F_BAVAIL]/((1024*1024)/status[F_FRSIZE] -- components: 2to3 (2.x to 3.0 conversion tool

[issue2899] Fixers find, rfind, etc in 'string' module

2009-02-13 Thread Stephen J. Turnbull
Stephen J. Turnbull step...@xemacs.org added the comment: Maybe 2to3 could get a --pedantic or even an --annoying option? I agree that it should be noisy about removed features even if actually fixing this kind of thing would be hard to do reliably. -- nosy: +sjt