[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Martin Altmayer
New submission from Martin Altmayer : re.escape('\n') returns '\\\n', i.e. a string consisting of a backslash and a newline. I believe it should return '\\n', i.e. a backslash and an 'n'. If the escape-result still contains a verbatim newline, why e

[issue42668] re.escape does not correctly escape newlines

2020-12-17 Thread Martin Altmayer
Martin Altmayer added the comment: Thanks for the explanation, I did not know re.VERBOSE. I still think the behavior is a bit confusing, but it's probably not worth the effort to change this. -- type: behavior -> enhancement ___ Python

[issue42680] unicode identifiers not accessible or assignable through globals()

2020-12-18 Thread Martin Chase
New submission from Martin Chase : This behavior is best described by the code below: ``` >>> meow = 1 >>> 'meow' in globals() True >>> µmeow = 1e-6 >>> 'µmeow' in globals() False >>> globals()['woof'] = 1 >>

[issue42680] unicode identifiers not accessible or assignable through globals()

2020-12-18 Thread Martin Chase
Martin Chase added the comment: Oh, I just gave a cursory using `locals()`, and the same misbehavior is present. A workaround, for anyone needing to assign or access unicode globals, is to use `exec`, e.g. `exec("µmeow = 1e-6"

[issue42680] unicode identifiers not accessible or assignable through globals()

2020-12-18 Thread Martin Chase
Martin Chase added the comment: Ah! So then the proper code for me would be e.g.: ``` >>> globals()[unicodedata.normalize("NFKC", "µmeow")] 1e-06 ``` Yes, it's clear when I read https://www.python.org/dev/peps/pep-3131/ that the normalization is going to

[issue9694] argparse required arguments displayed under "optional arguments"

2020-12-19 Thread Martin Burger
Change by Martin Burger : -- nosy: -mburger ___ Python tracker <https://bugs.python.org/issue9694> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42816] Add str.split_iter function

2021-01-03 Thread Martin Winks
New submission from Martin Winks : Split string by given separator and return iterator as a result. The naive and not very efficient solution would be using current str.split: def split_iter(self: str, sep: str) -> 'Iterator[str]': return iter(self.split(sep)) Probably, ne

[issue17343] Add a version of str.split which returns an iterator

2021-01-03 Thread Martin Winks
Martin Winks added the comment: > Perhaps the use case is already served by re.finditer() def split_whitespace_ascii(s: str): return (pt.group(0) for pt in re.finditer(r"[A-Za-z']+", s)) solution above does not cover all possible data and is incorrect for bytes-like

[issue42874] configure errors

2021-01-09 Thread Martin Wheatley
New submission from Martin Wheatley : I'm installin Python 3.91. on a Solaris 10 system (I known it's 'old' but I have a legacy installation to support). Running ./configure the following errors are seen... checking PROFILE_TASK... -m test --pgo checking for --with-lt

[issue42874] running configure on Solaris 10 gives grep "illegal option" errors

2021-01-12 Thread Martin Wheatley
Martin Wheatley added the comment: I'll do the test it happens with a plain ./configure Many thanks Martin On Tue, 12 Jan 2021 at 15:11, Paul Ganssle wrote: > > Paul Ganssle added the comment: > > This particular grep statement is used to validate the `tzpath` variable

[issue42874] running configure on Solaris 10 gives grep "illegal option" errors

2021-01-12 Thread Martin Wheatley
Martin Wheatley added the comment: I'll do the test it happens with a plain ./configure Many thanks Martin On Tue, 12 Jan 2021 at 15:11, Paul Ganssle wrote: > > Paul Ganssle added the comment: > > This particular grep statement is used to validate the `tzpath` variable

[issue43050] threading timer memory leak

2021-01-27 Thread Martin Panter
Martin Panter added the comment: Perhaps this is caused by Issue 37788. Python 3.7.4 introduced a leak for any thread that doesn't get its "join" method called. Timer is a subclass of Thread, so to confirm, see if calling "timer.join()" after "cance

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-01-27 Thread Martin Panter
Change by Martin Panter : -- keywords: +3.7regression ___ Python tracker <https://bugs.python.org/issue37788> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43123] email MIME splitting

2021-02-04 Thread Martin Ortner
New submission from Martin Ortner : // reported via PSRT email (see timeline) // external reference: https://consensys.net/diligence/vulnerabilities/private/jcchhpke7usq8wo45vloy282phwpd9fj41imumhb8varxahz2bf9afw5mcno84gx/ cve: vendor: python vendorUrl: https://www.python.org/ authors

[issue43124] smtplib multiple CRLF injection

2021-02-04 Thread Martin Ortner
New submission from Martin Ortner : // reported via PSRT email (see timeline; last contact: Alex/PSRT) // external reference: http://consensys.net/diligence/vulnerabilities/private/z5kxjgfmja4offxbrw1miuxwezggajjfswlz9g2hfuh77we5dy727hqy5x9ii43e/ cve: vendor: python vendorUrl: https

[issue43126] IOBase.readlines(0) behaviour is inconsistent with documentation

2021-02-04 Thread Martin Larralde
New submission from Martin Larralde : The documentation for `IOBase.readlines` states that the `hint` optional argument should be used like so (https://docs.python.org/3/library/io.html#io.IOBase.readlines): > Read and return a list of lines from the stream. hint can be specified

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-10 Thread Eric Martin
New submission from Eric Martin : Run on a MacBook Pro (15-inch, 2019) 2.3 GHz 8-Core Intel Core i9 16 GB 2400 MHz DDR4 Python 3.8.7 (default, Dec 24 2020, 19:07:18) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Type "help", "copyright", "credi

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-02-11 Thread Eric Martin
Eric Martin added the comment: Many thanks Raymond for these insights and thorough explanations, I appreciate it very much. Your conclusions are of course most reasonable. For me, I cannot say that it is a real issue in practice. I have teaching notes in which I illustrate with plots the

[issue43411] wm_manage fails with ttk.Frame

2021-03-05 Thread Martin Cooper
New submission from Martin Cooper : Attempting to use a ttk.Frame with wm_manage() causes a TclError: _tkinter.TclError: window ".!frame" is not manageable: must be a frame, labelframe or toplevel The (Tcl) documentation for wm manage states "Only frame, labelframe and tople

[issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions

2021-03-09 Thread Eric Martin
Eric Martin added the comment: Thank you for letting us know, I am actually not surprised the issue would bugger you and you would change your mind... Thinking further about it and experimenting further, I thought it might not be such an edge case and there could be a significant cost in

[issue43375] memory leak in threading ?

2021-03-09 Thread Martin Panter
Martin Panter added the comment: Sounds the same as Issue 37788, which is still open. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue43

[issue43292] xml.ElementTree iterparse filehandle left open

2021-03-10 Thread Martin Panter
Martin Panter added the comment: Perhaps this can be handled with Issue 25707, which is open for adding an API to close the file, similar to how "os.scandir" iterator implements a context manager and "close" method. -- nosy: +martin.panter superseder: -> A

[issue43292] xml.ElementTree iterparse filehandle left open

2021-03-10 Thread Martin Panter
Change by Martin Panter : -- type: security -> resource usage ___ Python tracker <https://bugs.python.org/issue43292> ___ ___ Python-bugs-list mailing list Un

[issue40657] Resource leaks with threading.Thread

2020-05-23 Thread Martin Panter
Martin Panter added the comment: Perhaps this is the same as Issue 37788, introduced in 3.7. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue40

[issue40961] os.putenv should be documented as not affecting os.getenv's return value

2020-06-12 Thread Daniel Martin
New submission from Daniel Martin : I find this behavior extremely surprising: $ ABC=def python Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more infor

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w
New submission from martin w : In the ipaddress library there exists two classes IPv4Interface, and IPv6Interface. These classes' hash functions will always return 32 and 64 respectively. If IPv4Interface or IPv6Interface objects then are put in a dictionary, on for example a server st

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w
Change by martin w : -- type: -> security ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w
Change by martin w : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Python-bugs-list mailing list Unsub

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread martin w
martin w added the comment: Forgot to add, this applies to all versions, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5 -- versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-18 Thread martin w
martin w added the comment: Absolutely, go ahead Amir -- ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Python-bugs-list mailing list Unsub

[issue41254] Add to/from string methods to datetime.timedelta

2020-07-09 Thread Martin Panter
Martin Panter added the comment: I don't know how much support this will get since there is already a str(timedelta) operation defined with a different format. But I don't like that format much. The day[s] part is too verbose, the H:MM:SS part could too easily be interpreted as D:

[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Martin Borus
New submission from Martin Borus : I just installed Python 3.9.0b5 using the provided beta installer python-3.9.0b5-amd64 on a Windows7, 64bit machine. I did the installation without the Py Launcher update, into the folder "c:\python39" The installer finished without problem

[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Martin Borus
Martin Borus added the comment: Changed "component" from "resource" to "crash" because it seems to fit better. -- type: resource usage -> crash ___ Python tracker &l

[issue18861] Problems with recursive automatic exception chaining

2020-07-27 Thread Martin Panter
Change by Martin Panter : -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue18861> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41345] Remote end closed connection without response

2020-07-27 Thread Martin Panter
Martin Panter added the comment: Previous report about Requests to the Python bug tracker: Issue 33620. I suspect this is an unavoidable race condition with trying a POST (or other non-idempotent) request on an idle HTTP connection. I think it has to be up to the higher-level application or

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Martin Panter
Martin Panter added the comment: Issue 31122 is also open about fixing this long-term, but I agree it would be good to document this quirk / bug. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue41

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-08-27 Thread Daniel Martin
Daniel Martin added the comment: See also https://bugs.python.org/issue40961 - that bug is not about thread safety, but another quirk around env. variable setting that needs to be documented in the documentation for os.putenv and os.getenv, and so anyone addressing this bug should probably

[issue41695] http.cookies.SimpleCookie.parse could not parse cookies when one cookie value is json

2020-09-02 Thread Martin Panter
Martin Panter added the comment: Perhaps this is a duplicate of Issue 27674, where I think parsing is aborted when a double-quote is seen? -- nosy: +martin.panter superseder: -> Quote mark breaks http.cookies, Cookie.py processing ___ Pyt

[issue41767] KeyError exception is more difficult to read due to quoting

2020-09-11 Thread Martin Panter
Martin Panter added the comment: Perhaps a duplicate of Issue 2651, closed because it was too hard to fix without breaking compatibility. -- nosy: +martin.panter superseder: -> Strings passed to KeyError do not round trip ___ Python trac

[issue39273] ncurses does not include BUTTON5_* constants

2020-10-08 Thread Grady Martin
Grady Martin added the comment: This baffled me, as well. Does the reason involve bit-field width? By the way, look at what my Python installation does when just *pressing* button 5 (mouse wheel down) after calling `curses.mousemask()`: ``` _curses.error: getmouse() returned ERR ``` The

[issue39273] ncurses does not include BUTTON5_* constants

2020-10-08 Thread Grady Martin
Change by Grady Martin : -- versions: +Python 3.6, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue39273> ___ ___ Python-bugs-list mailin

[issue42062] Usage of HTTPResponse.url

2020-10-17 Thread Martin Panter
Martin Panter added the comment: There is a comment in the HTTPResponse class regarding these methods: # For compatibility with old-style urllib responses. They were there for the "urlopen" API in "urllib.request", not for the "http.client" module on its own. I

[issue41983] Missing Documentation AF_PACKET

2020-10-17 Thread Martin Panter
Martin Panter added the comment: According to the documentation at <https://docs.python.org/3.8/library/socket.html#socket.AF_PACKET> and Issue 25041 it is only available on Linux. What documentation are you looking at? -- nosy: +martin.

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Martin Panter
Martin Panter added the comment: There is related discussion in Issue 41254, about duration formats more generally. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue42

[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-29 Thread Martin Gfeller
New submission from Martin Gfeller : I would like to install Python in a new location, completely separate and not affecting an existing installation of the same version. Despite I use /TargetDir=newdir, the installer goes into the "Modify Setup" dialog. If I chose "Modif

[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-29 Thread Martin Gfeller
Martin Gfeller added the comment: Windows Version is Windows 10, version 1803 (build 17134.1726). -- ___ Python tracker <https://bugs.python.org/issue42

[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-30 Thread Martin Gfeller
Martin Gfeller added the comment: Thank you, Steve, for your rapid response and explanation! I would like to have my installation fully isolated in case somebody (running the machine) fiddles with the installation in the standard location. I used to do that without problems with the 2.7 .msi

[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-31 Thread Martin Gfeller
Martin Gfeller added the comment: Thanks again Steve. I will copy the installation. I require a lot of pip packaged, so the embeddable distro doesn't look right for my case. I still think the /targetdir should issue some kind of warning if used with an existing installation, but th

[issue42263] Removing thread reference in thread results in leaked reference

2020-11-04 Thread Martin Panter
Change by Martin Panter : -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue42263> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42263] Removing thread reference in thread results in leaked reference

2020-11-04 Thread Martin Panter
Martin Panter added the comment: Maybe this is related to (or duplicate of) Issue 37788? Python 3.7 has a regression where threads that are never joined cause leaks; previous code was written assuming you didn't need to join threads. Do you still see the leak even if you don't

[issue13804] Python library structure creates hard to read code when using higher order functions

2012-01-17 Thread Martin Häcker
New submission from Martin Häcker : Code that uses higher order methods is often the clearest description of what you want to do. However since the higher order methods in python (filter, map, reduce) are free functions and aren't available on collection classes as methods, using them cr

[issue13805] [].sort() should return self

2012-01-17 Thread Martin Häcker
New submission from Martin Häcker : [].sort() returns None which means you can't chain it. So for example someDict.keys().sort()[0] doesn't work but you have to use sorted(someDict.keys())[0] instead which is harder to read as you have to read the line not from the beginning to t

[issue13805] [].sort() should return self

2012-01-17 Thread Martin Häcker
Martin Häcker added the comment: It really should return self. -- ___ Python tracker <http://bugs.python.org/issue13805> ___ ___ Python-bugs-list mailin

[issue13804] Python library structure creates hard to read code when using higher order functions

2012-01-17 Thread Martin Häcker
Martin Häcker added the comment: Yes - however it has the same problem as the higher order version in the python libraries that to read it you need to constantly jump back and forth in the line. -- ___ Python tracker <http://bugs.python.

[issue13804] Python library structure creates hard to read code when using higher order functions

2012-01-18 Thread Martin Häcker
Martin Häcker added the comment: @stutzbach: I believe you got me wrong, as the example topic.questions is meant to return a list of questions that need concatenating - thus you can't save the second step. -- ___ Python tracker

[issue13804] Python library structure creates hard to read code when using higher order functions

2012-01-19 Thread Martin Häcker
Martin Häcker added the comment: Jup - oh the joys of writing code in a bugtracker :) -- ___ Python tracker <http://bugs.python.org/issue13804> ___ ___ Python-bug

[issue14157] time.strptime without a year fails on Feb 29

2012-02-29 Thread Martin Morrison
New submission from Martin Morrison : time.strptime without a year fails on Feb 29 with: >>> time.strptime("Feb 29", "%b %d") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/_strptime.py", line 454, in _strpt

Re: [issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-03-19 Thread Martin Gradwell
ragile that it can be broken by any fault at all, anywhere in the entire system, doesn't seem to me to be a sensible design. There has to be a way of listing modules without loading every module. Martin Gradwell ___ Python-bugs-list mailing list Unsu

[issue14455] plistlib unable to read json and binary plist files

2012-04-02 Thread Georges Martin
Changes by Georges Martin : -- nosy: +jrjsmrtn ___ Python tracker <http://bugs.python.org/issue14455> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3982] support .format for bytes

2012-04-14 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker <http://bugs.python.org/issue3982> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Martin Panter
Martin Panter added the comment: Problems with long-running iterators are already discussed in: Issue 31815: rejected proposal to check for interrupts Issue 33939: proposal to flag iterators as being infinite -- nosy: +martin.panter ___ Python

[issue37176] super() docs don't say what super() does

2019-06-08 Thread Martin Panter
Martin Panter added the comment: Some of the problems brought up here (which sibling or subclass, and which parameter’s MRO) also came up a few years ago in Issue 23674. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.

[issue37290] Mistranslation (Japanese)

2019-06-15 Thread Martin Panter
Change by Martin Panter : -- nosy: +cocoatomo title: Mistranslation -> Mistranslation (Japanese) ___ Python tracker <https://bugs.python.org/issue37290> ___ _

[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2019-06-16 Thread Martin Panter
Martin Panter added the comment: FYI the change here to remember all the thread objects ever created looks to be the cause of the memory leak reported in Issue 37193 -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue31

[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2019-06-16 Thread Martin Panter
Martin Panter added the comment: Looking at the code, this would be caused by Issue 31233. I expect 3.7+ is affected. 3.6 has similar code, but the leaking looks to be disabled by default. 2.7 doesn't collect a "_threads" list at all. Looks like Victor was aware of the leak

[issue37334] Add a cancel method to asyncio Queues

2019-06-19 Thread Martin Teichmann
New submission from Martin Teichmann : When working with queues, it is not uncommon that at some point the producer stops producing data for good, or the consumer stops consuming, for example because a network connection broke down or some user simply closed the session. In this situation it

[issue37334] Add a cancel method to asyncio Queues

2019-06-19 Thread Martin Teichmann
Change by Martin Teichmann : -- keywords: +patch pull_requests: +14061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14227 ___ Python tracker <https://bugs.python.org/issu

[issue37334] Add a cancel method to asyncio Queues

2019-06-20 Thread Martin Teichmann
Martin Teichmann added the comment: I also thought about `.close()` but then found `.cancel()` more intuitive. But intuition is not universal, so I am open to any wording. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37334] Add a cancel method to asyncio Queues

2019-06-24 Thread Martin Teichmann
Martin Teichmann added the comment: Given the reactions I gather "close" is a better name for the method, so I changed it accordingly. In the current implementation, items that had been put on the queue but not processed yet still get processed after the close, and I think t

[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-06-27 Thread Martin Panter
Martin Panter added the comment: Same thing going on as in Issue 30154. The shell is probably spawning the “sleep” command as a child process (grandchild of Python), and waiting for it to exit. When Python times out, it will kill the shell process, leaving the grandchild as an orphan. The

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Martin Panter
Martin Panter added the comment: Perhaps a duplicate of Issue 22107? -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue37477> ___ ___

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Martin Panter
Change by Martin Panter : -- resolution: -> duplicate superseder: -> tempfile module misinterprets access denied error on Windows ___ Python tracker <https://bugs.python.org/i

[issue37591] test_concurrent_future failed

2019-07-14 Thread Martin Bammer
New submission from Martin Bammer : When building Python 3.7.4 from source on Ubuntu 18.10 I'm getting the following error: 0:04:38 load avg: 2.40 [ 78/416] test_complex 0:04:39 load avg: 2.40 [ 79/416] test_concurrent_futures Traceback: Thread 0x7f936b7fe700 (most recent call

[issue37817] create_pipe_connection and start_serving_pipe not documented

2019-08-10 Thread Paul Martin
New submission from Paul Martin : I found these two methods in the windows_events code for asyncio. Is there a reason why they don't seem to be documented, and are not included in AbstractServer? They provide a good Windows alternative to create_unix_server & create_unix_connection

[issue27485] urllib.splitport -- is it official or not?

2017-06-13 Thread Martin Panter
Martin Panter added the comment: I don't think it is worth changing the implementations to be in terms of urlsplit or urlparse. This is proposed for splithost in <https://github.com/python/cpython/pull/1849>, but I suspect it would change the behaviour in some corner cases. See

[issue30669] json.tool does not accept an --indent flag

2017-06-14 Thread Martin Panter
Martin Panter added the comment: Issue 29636 looks related -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue30669> ___ ___ Python-bug

[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2017-06-14 Thread Martin Panter
Martin Panter added the comment: Maybe Issue 16124 is related; it mentions 64-bit values, but it sounds like an obscure use case. -- ___ Python tracker <http://bugs.python.org/issue25

[issue18140] urlparse, urlsplit confused when password includes fragment (#), query (?)

2017-06-16 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +[security] urllib connects to a wrong host ___ Python tracker <http://bugs.python.org/issue18140> ___ ___ Python-bug

[issue30625] Documentation is unclear how "y*" and "y#" format units vary

2017-06-16 Thread Martin Panter
Martin Panter added the comment: Issue 24009 proposes deprecating y# (among other units). IMO the documentation and error message aren’t specific enough regarding the reference to “bytes-like”. -- nosy: +martin.panter ___ Python tracker <h

[issue30576] http.server should support HTTP compression (gzip)

2017-06-17 Thread Martin Panter
Martin Panter added the comment: I think neither Pierre’s nor Glenn’s implementations should be added to SimpleHTTPRequestHandler. In fact I think most forms of content negotiation are only appropriate for a higher-level server. It seems too far removed from the intention of the class

[issue24465] Make shutil.make_archive have deterministic sorting

2017-06-18 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +tarfile add uses random order title: Make tarfile have deterministic sorting -> Make shutil.make_archive have deterministic sorting ___ Python tracker <http://bugs.python.org/issu

[issue30716] Failing tests with installed 3.6.2rc1 on Win 10-64

2017-06-20 Thread Martin Panter
Martin Panter added the comment: Sounds similar to Issue 27425. Did rc1 get built with mangled newlines or something? -- components: +Tests, Windows nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <h

[issue30576] http.server should support HTTP compression (gzip)

2017-06-24 Thread Martin Panter
Martin Panter added the comment: For existing “.gz” files, I wasn’t suggesting to compress them a second time, just for the server report that they are already compressed, like how it reports the Content-Type value based on the file name. Including Content-Encoding would help browsers display

[issue30754] textwrap.dedent mishandles empty lines

2017-06-26 Thread Martin Panter
Martin Panter added the comment: Some people like to avoid indented blank lines, treating them the same as trailing whitespace. I suspect this behaviour may be intentional. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.

[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-06-30 Thread Martin Panter
Martin Panter added the comment: Don’t let my minus sign suggestion stop this, especially since a couple other people said they don’t like it. The current pull request proposal is beneficial without it. Isn’t there a “Unicode writer” API that could be used? Maybe that’s another alternative

[issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6

2017-06-30 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6, test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 ___ Python

[issue30319] ConnectionResetError: [Errno 54] Connection reset by peer in socket.close on FreeBSD, Py 3.6

2017-06-30 Thread Martin Panter
Martin Panter added the comment: I think fixing all affected calls to socket.close in the world (option 3) would be too much. I just added two new reports (Issue 30652 and Issue 30391) as dependencies. These are about testing socketserver.TCPServer. As an example, to fix the socket.close call

[issue30391] test_threading_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6

2017-06-30 Thread Martin Panter
Martin Panter added the comment: These tests are supposed to: 1. Create a TCP server 2. Open a TCP connection 3. Run a custom connection handler (depending on the particular test) in a new thread 4. When the handler returns, the new thread should call “shutdown_request” 5. Shutdown_request

[issue29926] IDLE: in shell, time.sleep ignores _thread.interrupt_main()

2017-06-30 Thread Martin Panter
Martin Panter added the comment: I doubt the Gnu Readline library nor Python’s readline module are relevant. The input function only uses Readline if sys.stdin is the original stdin terminal; I suspect Idle monkey-patches sys.stdin. The readline method reads directly from the file object; it

[issue30713] Reject newline character (U+000A) in URLs in urllib.parse

2017-07-02 Thread Martin Panter
Martin Panter added the comment: It might help if you explained why you want to make these changes. Otherwise I have to guess. Is a compromise between strictly rejecting all non-URL characters (not just control characters), versus leaving it up to user applications to validate their URLs? I

[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2017-07-02 Thread Martin Panter
Martin Panter added the comment: It looks like I was fairly confident about my patch, but it was all theoretical and I was never able to analyze the failure myself. Sorry but I am unlikely to spend much time on this or open a pull request any time soon

[issue30319] Change socket.close() to ignore ECONNRESET

2017-07-05 Thread Martin Panter
Martin Panter added the comment: Thanks for handling this Victor. To answer some of your earlier questions, this is my understanding of the Free BSD behaviour (although I don't have Free BSD to experiment with): When writing to TCP sockets, I believe the data is buffered by the local O

[issue27068] Add a detach() method to subprocess.Popen

2017-07-08 Thread Martin Panter
Martin Panter added the comment: Personally, I haven’t needed this feature. But I still think it may be a decent solution for the “webbrowser” module, potentially your “asyncio” problem, and other cases that could now trigger an unwanted ResourceWarning

[issue30393] test_readline hangs

2017-07-09 Thread Martin Panter
Martin Panter added the comment: Thanks for the information. That narrows the problem down, but I still don’t exactly know why it hangs. A good workaround may be to put a timeout in the “select” call for a second or so, and if it times out, raise an exception which will fail the test but let

[issue29606] urllib FTP protocol stream injection

2017-07-21 Thread Martin Panter
Martin Panter added the comment: Serhiy, that is what Dong-hee already proposed in <https://github.com/python/cpython/pull/1214>, but someone needs to decide if we want to support RFC 2640, in which I understand LF on its own is legal, and CR is escaped by adding

[issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data

2017-07-25 Thread Martin Panter
Martin Panter added the comment: Can’t you use b.seek(0, SEEK_END)? -- nosy: +martin.panter versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue31

[issue30576] http.server should support HTTP compression (gzip)

2017-07-25 Thread Martin Panter
Martin Panter added the comment: I think chunked encoding is only meant to be used for HTTP 1.1. For HTTP 1.0, you have to either send Content-Length, or shut down the connection after sending the body. See also Issue 21224 about improving HTTP 1.1 support. Maybe you should add a “Vary

[issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length

2017-07-29 Thread Martin Panter
Martin Panter added the comment: The trouble is you would also have to parse the Transfer-Encoding field, and have special logic for responses where Content-Length is not needed or irrelevant (certain combinations of method and status code). And even then you risk breaking rare or custom

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2017-08-04 Thread Martin Panter
Martin Panter added the comment: It might help if you explained what “atrocities” are happening on your network. Is there a proxy or man-in-the-middle (or the remote peer) that shuts down TCP connections? If so, perhaps this is similar to Issue 10808. From my memory, in that case an OS “recv

[issue31136] raw strings cannot end with a backslash character r'\'

2017-08-07 Thread Martin Panter
Martin Panter added the comment: What would your proposal do where an embedded backslash is currently valid? >>> print(r'Backslash apostrophe: \'.') Backslash apostrophe: \'. >>> r'\' # Comment or string?' "\

<    1   2   3   4   5   6   7   8   9   10   >