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

2017-09-29 Thread Martin Panter
Martin Panter added the comment: Regarding the compressed data generator, it would be better if there were no restrictions on the generator yielding empty chunks. This would match how the upload “body” parameter for HTTPConnection.request can be an iterator without worrying about empty

[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-30 Thread Martin Panter
Martin Panter added the comment: I prefer Cornelius’s current proposal (rev 4f8137b) because it fixes both sites, rather than just patching the immediate problem site. I don’t think read(1) is a big problem, just less efficient. But if you prefer to do larger reads, that should be fine too

[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter
Martin Panter added the comment: The change in handling KeyboardInterrupt was my intention in Issue 23430. I hope it isn’t a problem on its own :) Running the module with “python -m http.server” uses the HTTPServer class, based on socketserver.TCPServer. This only accepts one connection at a

[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter
Martin Panter added the comment: . Actually take back a lot of what I wrote above. I forgot that SimpleHTTPRequestHandler only supports HTTP 1.0; I don’t think it uses keep-alive or persistent connections, so it should close its TCP connections promptly. There may be something else going on

[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter
Change by Martin Panter : -- Removed message: https://bugs.python.org/msg303440 ___ Python tracker <https://bugs.python.org/issue31639> ___ ___ Python-bugs-list m

[issue31656] Bitwise operations for bytes-type

2017-10-01 Thread Martin Panter
Martin Panter added the comment: There’s already a bug open for this: Issue 19251. Only equal-length strings should be supported. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue31

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-06 Thread Martin Panter
Martin Panter added the comment: Presumuing your file descriptor 3 is the read end of the pipe to the child’s output, then there is probably a process somewhere that could still write to the write end. Normally “check_output” waits until it has read all possible output from the pipe(s

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-07 Thread Martin Panter
Martin Panter added the comment: Scanning over the Open SSH commits for 7.3p1 https://github.com/openssh/openssh-portable/compare/V_7_2_P2...V_7_3_P1 it looks like this commit https://github.com/openssh/openssh-portable/commit/d2d6bf864e52af8491a60dd507f85b74361f5da3 may fix your problem

[issue31760] Re-definition of _POSIX_C_SOURCE with Fedora 26.

2017-10-15 Thread Martin Panter
Martin Panter added the comment: Looks the same as Issue 31374 -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> expat: warning: "_POSIX_C_SOURCE" redefined ___

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Martin Panter
Martin Panter added the comment: Sorry, I meant Net BSD not Free BSD -- ___ Python tracker <https://bugs.python.org/issue31800> ___ ___ Python-bugs-list mailin

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-16 Thread Martin Panter
Martin Panter added the comment: FWIW it looks like “strptime” in glibc, and Open and Free BSD support parsing this and even more formats (RFC 822 and RFC 3339; includes “Z”, U.S. time zones, ±HH). Also, there is Issue 24954 for adding “%:z” like Gnu “date”. -- nosy: +martin.panter

[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2017-10-27 Thread Martin Panter
Martin Panter added the comment: The patches would mask an OSError raised by the “readfp” call, which would be a change in behaviour. But moving the call does not seem to be necessary; why not leave it outside the “try” statement? -- nosy: +martin.panter

[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2017-10-27 Thread Martin Panter
Martin Panter added the comment: Closing because I understand it is too late to do anything for 3.5 now. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue22671] Typo in class io.BufferedIOBase docs

2017-10-28 Thread Martin Panter
Martin Panter added the comment: I’m unlikely to soon, but I don’t mind if someone else uses my patch. -- ___ Python tracker <https://bugs.python.org/issue22

[issue31749] Request: Human readable byte amounts in the standard library

2017-10-29 Thread Martin Panter
Martin Panter added the comment: Ken Kundert started a related discussion a while back on Python-ideas: <https://www.mail-archive.com/search?l=mid&q=20160830203427.ge2...@kundert.designers-guide.com>. This was about SI-prefixed units in general; not restricted to bytes. Also, t

[issue31894] test_timestamp_naive failed on NetBSD

2017-10-29 Thread Martin Panter
Martin Panter added the comment: Are you sure it is a “system” bug? As far as I understand, at least Posix does not require support for local time before 1970. See <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>. But why is localtime(14400) relevan

[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-03 Thread Martin Ritter
New submission from Martin Ritter : Hi, I tried to use subprocess.run(..., stdout=subprocess.PIPE, timeout=N) to run some test scripts with a given timeout. This works as expected with simple scripts. However if the script itself creates other children which write to stdout then

[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-03 Thread Martin Panter
Martin Panter added the comment: This proposal sounds like a race condition. Closing the output pipe as a child exits means you risk missing recent output. On the other hand, if you don’t care about the output any more, close the pipe first and then wait for the child. Related discussions

[issue21790] Change blocksize in http.client to the value of resource.getpagesize

2017-11-05 Thread Martin Panter
Martin Panter added the comment: Issue 31945 proposes adding a “blocksize” parameter to HTTPConnection objects, so I suggest to closing in favour of that one. -- resolution: -> rejected superseder: -> Configurable blocksize in HTTP(S)Conn

[issue29710] Incorrect representation caveat on bitwise operation docs

2017-11-05 Thread Martin Panter
Martin Panter added the comment: I find the model in terms of “bit_length” hard to understand. You have to understand what bit_length returns, and why you added 1. Bit_length is awkward for negative numbers. It only uses the absolute value, which would give off-by-one problems with negative

[issue25942] subprocess.call SIGKILLs too liberally

2017-11-05 Thread Martin Panter
Martin Panter added the comment: https://github.com/python/cpython/pull/4283 adds a secondary timeout, which defaults to 1 s when there is no main timeout. But this seems complicated and arbitrary. As I understand, the main use case discussed here was waiting without a timeout for a child

[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Martin Panter
Martin Panter added the comment: The documentation says “On . . . destruction of the temporary directory object the newly created temporary directory and all its contents are removed”. If you had enabled warnings, you may have seen a hint: $ python -Wdefault -c 'import tempfile;

[issue31959] Directory at `TemporaryDirectory().name` does not exist

2017-11-06 Thread Martin Panter
Change by Martin Panter : -- nosy: +serhiy.storchaka resolution: wont fix -> not a bug stage: -> resolved ___ Python tracker <https://bugs.python.org/i

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2017-11-10 Thread Martin Panter
Martin Panter added the comment: Perhaps you can compress the tar file using the “gzip.GzipFile” class. It accepts a custom “mtime” parameter (see Issue 4272, added in 2.7 and 3.1+): >>> gztar = BytesIO() >>> tar = GzipFile(fileobj=gztar, mode="w", mtime=0) >&g

[issue32009] seg fault when using Cntrl-q keymap to exit app

2017-11-11 Thread Martin Panter
Martin Panter added the comment: This looks the same as Issue 25259. The trigger is that multiple lines are generated at the same time, but Python only expects the first line. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed s

[issue32028] Syntactically wrong suggestions by the new custom print statement error message

2017-11-14 Thread Martin Drawitsch
New submission from Martin Drawitsch : I think I found a bug in the new print syntax suggestion introduced by https://bugs.python.org/issue30597. When the following code is executed by Python 3.6.3 inside of a .py file: def f(): print '%d' % 2 , then Python gives the

[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2017-11-24 Thread Martin Panter
Martin Panter added the comment: If it helps, here is a basic test case I wrote for “pty.spawn”. I hope that it exposes the problem on Free BSD, but I have only tested it on Linux. parent = r'''\ import pty, sys pty.spawn((sys.executable, "-c", sys.argv[1])) &#x

[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2017-11-24 Thread Martin Panter
Martin Panter added the comment: Victor opened Issue 32128 with the same complaint. I think I found the offending article: >>> server = NNTP_SSL("nntp.aioe.org") >>> [response, count, first, last, name] = server.group("comp.lang.python") >>>

[issue28778] wsgiref HTTP Response Header Injection: CRLF Injection

2017-11-25 Thread Martin Panter
Martin Panter added the comment: Issue 11671 is closely related and has a patch proposing to ban control characters including CRLF (but not spaces). Also see Issue 22928 which added header field validation to the HTTP client module. -- dependencies: +Security hole in

[issue30458] CRLF Injection in httplib

2017-11-25 Thread Martin Panter
Change by Martin Panter : -- type: -> security ___ Python tracker <https://bugs.python.org/issue30458> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2017-11-25 Thread Martin Panter
Martin Panter added the comment: The square □ in the strings represents a space. Issue 1 (CRLF in HTTP request path): it looks like the %0D%0A would have to be decoded by an earlier step in the chain to "http://127.0.0.1:25/\r\nHELO . . .". This becomes like the header injection I

[issue30458] CRLF Injection in httplib

2017-11-25 Thread Martin Panter
Martin Panter added the comment: Actually, the CRLF + space can be injected via percent encoding, so just dealing with literal CRLFs and spaces wouldn’t be enough. You would have to validate the hostname after it is decoded. urlopen("http://127.0.0.1%0D%0A%20SLAVEOF . . .

[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter
Martin Panter added the comment: The first two bugs ("foo/dir?baz" and "foo/dir?baz/") were solved by Issue 23112. The third (".../foo.html/") was solved by Issue 17324. That leaves the fourth complaint, which I don’t understand: ‘translate_path() does not

[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2017-11-25 Thread Martin Panter
Martin Panter added the comment: Maybe a good fix would be to “escape” the double slash with “/.”: if os.path.isdir(path): url = self.path if url.startswith('//'): # E.g. "//www.python.org/%2f.." url = "/." + url # Becomes "

[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter
Martin Panter added the comment: I read in PEP 11 that Mac OS 9 support was dropped in Python 2.4. I agree that eliminating “.” and “..” components makes sense, since that is how they should be handled when resolving relative URLs. But it seems low priority, since this doesn’t happen on

[issue32143] os.statvfs lacks f_fsid

2017-11-26 Thread Martin Panter
Martin Panter added the comment: The doc string for the result object, and the main Python 2 documentation, both say that the result is a 10-tuple. So perhaps any new field should only be an attribute, and the tuple should stay the same size, to maintain compatibility. This was done in other

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-11-30 Thread Martin Richard
Martin Richard added the comment: FWIW, PyOpenSSL allows to load certificates and keys from a memory buffer and much more. It's also fairly easy to switch from ssl to PyOpenSSL. It's probably a viable alternative in many cases. --

[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2017-12-01 Thread Martin Panter
Martin Panter added the comment: Issue 32185 proposes to stop sending IP addresses in the TLS SNI protocol. Maybe this will help; it depends if it will catch IP address strings with with whitespace or if there are other ways to inject invalid hostnames. -- dependencies

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-01 Thread Martin Panter
Martin Panter added the comment: Michael Felt: if you still want the code compatible with Python 2 and 3 (and others are happy with that), I suggest documenting that in a code comment. -- ___ Python tracker <https://bugs.python.org/issue26

[issue25054] Capturing start of line '^'

2017-12-02 Thread Martin Panter
Martin Panter added the comment: The new “finditer” behaviour seems to contradict the documentation about excluding empty matches if they touch the start of another match. >>> list(re.finditer(r"\b|:+", "a::bc")) [, , , , ] An empty match at (1, 1) is incl

[issue29710] Incorrect representation caveat on bitwise operation docs

2017-12-02 Thread Martin Panter
Martin Panter added the comment: FWIW I find Mark’s suggestion pretty good: “Each bitwise operation has the same result as though carried out in two's complement using a bit-width that's large enough to represent the inputs.” -- ___ Pyth

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-04 Thread Martin Panter
Martin Panter added the comment: P-ganssle seems to be proposing to limit parsing to exactly what “datetime.isoformat” produces; i.e. whole number of seconds, milliseconds or microseconds. Personally I would prefer it without this limitation, like in Mathieu’s patches. But P-ganssle has done

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-04 Thread Martin Panter
Martin Panter added the comment: The other difference is Mattieu guarantees ValueError for invalid input strings, which I think is good. -- ___ Python tracker <https://bugs.python.org/issue15

[issue28185] Tabs in C source code

2017-12-08 Thread Martin Panter
Martin Panter added the comment: Similar changes were made in Issue 32150 and PR 3892 (tabs) and Mercurial revision 98d1788c905c (trailing space and indentation). All the other tabs in these patches appear to have been removed with other work: #29524, #31891, #30747, #31373, PR 4275, #25658

[issue32247] shutil-copytree: Create dst folder only if it doesn't exist

2017-12-08 Thread Martin Panter
Change by Martin Panter : -- superseder: -> add exist_ok to shutil.copytree ___ Python tracker <https://bugs.python.org/issue32247> ___ ___ Python-bugs-lis

[issue17972] inspect module docs omits many functions

2017-12-09 Thread Martin Panter
Change by Martin Panter : -- dependencies: +Online doc does not include inspect.classify_class_attrs ___ Python tracker <https://bugs.python.org/issue17

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-17 Thread Martin Panter
Martin Panter added the comment: Regarding Matthieu’s RFC 3339 parser, Victor wanted to use the round-half-to-even rule to get a whole number of microseconds. But considering the “time” class cannot represent 24:00, how do you round up in the extreme case past 23:59? time.fromisoformat(&qu

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-17 Thread Martin Panter
Martin Panter added the comment: Not if the time is associated with a particular day. Imagine implementing datetime.fromisoformat by separately calling date.fromisoformat and time.fromisoformat. The date will be off by one day if you naively rounded 2017-12-18 23:59 “up” to 2017-12-18 00:00

[issue32352] `inspect.getfullargspec` doesn't work fine for some builtin callable objects

2017-12-17 Thread Martin Panter
Martin Panter added the comment: This was documented for the “getfullargspec” function in Issue 7422 (long before “signature” existed). The error message was also clarified in Issue 6905. However IMO the term “Python function” is too subtle and ambiguous. -- nosy: +martin.panter

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-27 Thread Martin Liska
New submission from Martin Liska : The documentation for pathlib.Path.resolve says: "Make the path absolute, resolving any symlinks." On Windows, the behavior doesn't always match the first part of the statement. Example: On a system with an existing, but empty directory C:\Te

[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2018-01-02 Thread Martin Panter
Martin Panter added the comment: My guess is there is no message because in Python 3, errors are encoded according to PYTHONIOENCODING. Perhaps it works as you expect if you bypass sys.excepthook: $ PYTHONIOENCODING=undefined python -c 'import sys, os; sys.excepthook = lambda *exc: os.

[issue32413] Document that locals() may return globals()

2018-01-02 Thread Martin Panter
Martin Panter added the comment: FWIW a few years ago I wrote a patch for Issue 17546 that documents three personalities of “locals”, including: * At the module level, the dictionary returned is the global symbol table, also returned by :func:`globals`. -- nosy: +martin.panter

[issue32491] base64.decode: linebreaks are not ignored

2018-01-03 Thread Martin Panter
Martin Panter added the comment: I wrote an incremental base-64 decoder for the "codecs" module in Issue 27799, which you could use. It just does some preprocessing using a regular expression to pick four-character chunks before passing the data to a2b_base64. Or maybe imple

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: In the server, the send_header("Connection", "close") call sets the “close_connection” flag. This shuts down the connection once “do_GET” returns. Without the flag set, the server will wait and read another request. If you want th

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: Sorry William, I forgot the client was waiting to read. But I don’t understand why your Connection field (which comes after the status line) allows the Python client to read the status line. Perhaps there is some malware scanner, firewall, or other proxy that

[issue25095] test_httpservers hangs since Python 3.5

2018-01-05 Thread Martin Panter
Martin Panter added the comment: Thanks, although the fact that “Content-Length: 0” doesn’t work kills my theory about the proxy. The “close_connection” flag is also a documented public API of Python: <https://docs.python.org/3/library/http.server.h

[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-01-07 Thread Martin Panter
Martin Panter added the comment: FWIW there was documentation in the README about the Setup files, removed in Subversion r57681 (= Git revision 1c896e3). It looks like it still survives in the 2.7 version. -- nosy: +martin.panter ___ Python

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread Martin Panter
Martin Panter added the comment: Perhaps this can be treated as a duplicate of Issue 31639. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue32

[issue32518] HTTPServer can't deal with persistent connection properly

2018-01-08 Thread Martin Panter
Change by Martin Panter : -- superseder: HTTPServer can't deal with persistent connection properly -> http.server and SimpleHTTPServer hang after a few requests ___ Python tracker <https://bugs.python.org

[issue32529] Call readinto in shutil.copyfileobj

2018-01-10 Thread Martin Panter
Martin Panter added the comment: Looks like you want to use a "readinto" method to reduce data copying. One problem is that it is not specified exactly what kind of object "copyfileobj" supports reading from. The documentation only says "file-like". Accordi

[issue33341] python3 fails to build if directory or sysroot contains "*icc*" string

2018-05-17 Thread Martin Panter
Martin Panter added the comment: Maybe this is the same as Issue 28584, about the ${CC} variable rather than “sysroot”. In any case, the patch looks unrelated. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue33

[issue12486] tokenize module should have a unicode API

2018-05-18 Thread Martin Panter
Martin Panter added the comment: Don’t forget about updating __all__. -- ___ Python tracker <https://bugs.python.org/issue12486> ___ ___ Python-bugs-list mailin

[issue1621] Do not assume signed integer overflow behavior

2018-05-18 Thread Martin Panter
Martin Panter added the comment: Sorry I haven’t made a PR for ctypes_v2.patch, but I don’t mind if someone else takes over. I understand the HAVE_LONG_LONG check may no longer necessary for newer Python versions. -- ___ Python tracker <ht

[issue33321] Add a Linux clang ubsan undefined behavior sanitizer buildbot

2018-05-18 Thread Martin Panter
Martin Panter added the comment: Perhaps your “ctypes” problems may be helped by my ctypes_v2.patch in Issue 1621. Or perhaps they are already documented in Issue 15119 and/or Issue 28169. -- nosy: +martin.panter ___ Python tracker <ht

[issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'

2018-05-18 Thread Martin Panter
Martin Panter added the comment: Maybe worth checking if this is fixed due to the changes in Issue 31373 for 3.6+. -- nosy: +martin.panter resolution: -> out of date superseder: -> demoting floating float values to unrepresentable types is undefined be

[issue20941] pytime.c:184 and pytime.c:218: runtime error, outside the range of representable values of type 'long'

2018-05-18 Thread Martin Panter
Martin Panter added the comment: I don’t know; I haven’t tested it. I was anticipating that it is fixed, but perhaps I should leave the resolution alone instead? -- ___ Python tracker <https://bugs.python.org/issue20

[issue33384] Build does not work with closed stdin

2018-05-19 Thread Martin Husemann
Martin Husemann added the comment: You need to exit the parent shell, to get the original stdin revoke(2)'d. That is: the Ctrl-D in the original descritpion is not line noise. Sorry, should have been more explicit (or used "exit" or so

[issue33342] urllib IPv6 parsing fails with special characters in passwords

2018-05-19 Thread Martin Panter
Martin Panter added the comment: I presume this is about parsing a URL like >>> urlsplit("//user:[@host") Traceback (most recent call last): File "", line 1, in File "/home/proj/python/cpython/Lib/urllib/parse.py", line 431, in urlsplit raise Va

[issue33579] calendar.timegm not always an inverse of time.gmtime

2018-05-19 Thread Martin Panter
Martin Panter added the comment: According to Wikipedia, there were 24 leap seconds before Feb 2009. So my guess is Eitan’s “gmtime” implementation is calculating the date as if the timestamp (1234567899) includes leap seconds, as in <https://en.wikipedia.org/wiki/Unix_time#TAI-based_vari

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2018-05-24 Thread Martin Panter
Martin Panter added the comment: Looks like this is what my thread.patch was fixing in <https://bugs.python.org/issue1621#msg271057>. You’re welcome to use my patch, but I won’t have time to work on it myself. -- nosy: +martin.panter ___

[issue33693] test test_webbrowser failed

2018-05-30 Thread Martin Panter
Martin Panter added the comment: This sounds like the existing bug Issue 31014 -- nosy: +martin.panter superseder: -> webbrowser._synthesize uses outdated calling signature for webbrowser.register ___ Python tracker <https://bugs.pyth

[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2018-06-09 Thread Martin Panter
Martin Panter added the comment: I was making suggestions, not demanding anything. Except for the quirk with __del__, Gary’s changes (revision fb28362) look okay to add on their own as a bug fix. I wouldn’t claim that IOBase is “fully implemented” however, until the return values for “seek

[issue33762] temp file isn't IOBase

2018-06-09 Thread Martin Panter
Martin Panter added the comment: I think it is an implementation detail whether the result subclasses IOBase or just implements its API. Why do you want to check the base class, and why IOBase in particular, rather than BufferedIOBase, RawIOBase, or TextIOBase

[issue33687] uu.py calls os.path.chmod which doesn't exist

2018-06-10 Thread Martin Panter
Martin Panter added the comment: What is your use case, Poul-Henning? It looks like the module has never set the file mode, at least since it was added to Python in 1994. I suggest just remove the dead code and fix the documentation. At least you shouldn’t make this change in bug fix

[issue33830] example output error

2018-06-11 Thread Martin Panter
Martin Panter added the comment: Looks like poor application of a Python 3 patch in Issue 24118. The second request was meant to be for /parrot.spam. -- nosy: +benjamin.peterson, martin.panter ___ Python tracker <https://bugs.python.

[issue33837] Closing asyncio.Server on asyncio.ProactorEventLoop causes all active servers to stop listening

2018-06-11 Thread Martin Liska
New submission from Martin Liska : When calling asyncio.Server.close, the method calls asyncio.AbstractEventLoop._stop_serving for each of its sockets in turn. The implementation of this method in asyncio.ProactorEventLoop calls the _stop_accept_futures method which seems to cancel "a

[issue24415] SIGINT always reset to SIG_DFL by Py_Finalize()

2018-06-15 Thread Martin Panter
Martin Panter added the comment: It is worth checking if at least the first half of the report was fixed by Issue 30654 -- nosy: +martin.panter superseder: -> signal module always overwrites SIGINT on interpreter shutdown ___ Python trac

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2018-06-16 Thread Martin Panter
Martin Panter added the comment: Issue 33550 was opened about Mike’s case of ignoring broken pipe conditions. BTW a side effect of closing sys.stderr is that error messages reported by interpreter shutdown will be missing (even if there was no broken pipe). For example, exception messages

[issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x

2018-06-16 Thread Martin Panter
Martin Panter added the comment: I doubt it is a race condition. “Waitpid” only returns after the child has terminated, and the file should be created as the child starts, before it terminates. Surely it is just the buggy glibc opening the DBDBDB file, when the test case expects it to create

[issue33878] Doc: Assignment statement to tuple or list: case missing.

2018-06-16 Thread Martin Panter
Martin Panter added the comment: I think I intended the third option to include all comma-separated lists, including: a, b, c = x # No brackets (a, b, c) = x # Round brackets [a, b, c] = x # Square brackets a, = x # Single target with comma Perhaps something like this would be clearer

[issue33878] Doc: Assignment statement to tuple or list: case missing.

2018-06-16 Thread Martin Panter
Martin Panter added the comment: I think it is okay to leave out the options for the unpacking case. But I think it is worth clarifying that the single-target case also applies without parentheses, but that it doesn’t apply if there is a trailing comma. So: ‘‘‘ If the target list is a single

[issue24935] LDSHARED is not set according when CC is set.

2018-06-25 Thread Martin Scherer
Change by Martin Scherer : -- keywords: +patch pull_requests: +7517 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue24935> ___ ___ Py

[issue31839] datetime: add method to parse isoformat() output

2018-07-06 Thread Martin Panter
Change by Martin Panter : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> datetime: add ability to parse RFC 3339 dates and times ___ Python tracker <https://bugs.python

[issue32401] No module named '_ctypes'

2018-07-07 Thread Martin Panter
Change by Martin Panter : -- superseder: -> make install fails: no module _ctypes ___ Python tracker <https://bugs.python.org/issue32401> ___ ___ Python-

[issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux

2018-07-07 Thread Martin Panter
Martin Panter added the comment: Ctypes is meant to be (at least it used to be) an optional module. If you don’t actually care about building ctypes, this might be the same as Issue 31652. Using “configure --without-ensurepip” was suggested as a workaround. If you do want ctypes to be built

[issue31652] make install fails: no module _ctypes

2018-07-07 Thread Martin Panter
Martin Panter added the comment: In <https://bugs.python.org/issue32401#msg308926> Chi-Hsuan suggests “configure --without-ensurepip” as a workaround. -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/i

[issue34091] REPL does not work in msys2, ConEmu terminals on windows

2018-07-11 Thread Martin Panter
Martin Panter added the comment: The problem as I understand it is that Msys uses a pipe, but Python by default limits interactive REPL mode to terminals only. The same thing happens if you start Python on a pipe some other way, for instance “cat | python” vs “cat | python -i”. I would

[issue34128] Do not block threads when pickle/unpickle

2018-07-16 Thread Martin Bammer
New submission from Martin Bammer : Hi, the old and slow python implementation of pickle didn't block background thread. But the newer C-implementation blocks other threads while dump/load is running. Wouldn't it be possible to allow other threads during this time? Especially could

[issue34128] Release GIL periodically in _pickle module

2018-07-17 Thread Martin Bammer
Martin Bammer added the comment: Maybe an optional parameter with the desired interval would be good idea. So that the coder can decide if he wants/needs that feature and which interval he needs for his application. Otherwise it is hard to define a specific interval which fits for everyone

[issue18397] Python with MinGW

2018-07-18 Thread Martin Panter
Change by Martin Panter : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> mingw-meta: build interpeter core ___ Python tracker <https://bugs.python

[issue29253] Fix test_asyncore tests on Cygwin

2018-07-18 Thread Martin Panter
Martin Panter added the comment: Similar to Issue 31882 -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue29253> ___ ___ Python-bug

[issue29253] Fix test_asyncore tests on Cygwin

2018-07-19 Thread Martin Panter
Change by Martin Panter : -- superseder: -> Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin ___ Python tracker <https://bugs.python.org/issu

[issue33154] subprocess.Popen ResourceWarning should have activation-deactivation flags

2018-07-22 Thread Martin Panter
Martin Panter added the comment: Can’t you use Python’s existing CLI <https://docs.python.org/3.6/using/cmdline.html#cmdoption-w> and environment variable <https://docs.python.org/3.6/using/cmdline.html#envvar-PYTHONWARNINGS> to control the ResourceWarning messages? Warnings w

[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2018-07-22 Thread Martin Panter
Martin Panter added the comment: Closing in faviour of Issue 30154, which suggests documentation or adjusting the timeout implementation. There is also Issue 26534 proposing a new “kill_group” option when using the timeout feature. -- resolution: -> duplicate stage: -> re

[issue34158] Documentation of datetime '%z' format code is odd

2018-07-22 Thread Martin Panter
Martin Panter added the comment: FWIW more oddities with this paragraph could be fixed by: * removing the first “and” from “HH is . . ., [and] MM is . . ., SS is . . . and uu is”, * changing the condition for omitting “uu” from “a whole number of [minutes]” to “seconds”, and

[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-28 Thread Martin Altmayer
Change by Martin Altmayer : -- keywords: +patch pull_requests: +8048 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34263> ___ ___ Py

[issue34263] asyncio: "relative *delay* or absolute *when* should not exceed one day"

2018-07-28 Thread Martin Altmayer
Martin Altmayer added the comment: Added a small PR. Shall we update the doc? With this PR there is no reason anymore to disallow timeouts greater than one day in asyncio. Greetings from the sprints @ Edinburgh! -- nosy: +MartinAltmayer

[issue34281] "Go to Line" broken on OS X

2018-07-30 Thread Eric Martin
New submission from Eric Martin : After entering a line number, clicking OK brings to the foreground and makes active the first hidden window (in the simplest case where we have just one window for a .py file and the Shell window, the former being in the foreground, clicking OK brings the

[issue34276] urllib.parse doesn't round-trip file URI's with multiple leading slashes

2018-07-30 Thread Martin Panter
Martin Panter added the comment: This may be a very old regression (from 2002) caused by Issue 591713 and Mercurial rev. 554f975073a0. The original check for the double slash, added in 0d6bd391acd8, “escapes” a path beginning with a double slash by prefixing it with two more slashes (empty

[issue23505] Urlparse insufficient validation leads to open redirect

2018-07-30 Thread Martin Panter
Martin Panter added the comment: Issue 34276 was opened about a similar case for “file:” URLs. I believe both “file:” scheme and no-scheme cases are a regression and could be fixed by adding another pair of slashes (an empty “netloc” part): >>> urlparse("foo.com&

<    3   4   5   6   7   8   9   10   11   12   >