[issue30437] SSL_shutdown can return meaningless SSL_ERROR_SYSCALL

2017-05-23 Thread Martin Panter
Martin Panter added the comment: Maybe Issue 10808? -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue30437> ___ ___ Python-bugs-list mailin

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-24 Thread Martin Panter
Martin Panter added the comment: Previous report: Issue 25641. At least in Posix, the “putenv” function is not required to be thread safe. -- nosy: +martin.panter ___ Python tracker <http://bugs.python.org/issue30

[issue30477] tuple.index error message improvement

2017-05-26 Thread Martin Panter
Martin Panter added the comment: Also discussed in Issue 13349 -- nosy: +martin.panter superseder: -> Non-informative error message in index() and remove() functions ___ Python tracker <http://bugs.python.org/issu

[issue30476] Add _GenerateCRCTable() to zipfile.py to pre-compute CRC Table

2017-05-26 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30476> ___ ___

[issue30393] test_readline hangs

2017-05-26 Thread Martin Panter
Martin Panter added the comment: Perhaps if you ran the tests in verbose mode, that could narrow down which test it hangs at. Also, if you can capture a KeyboardInterrupt stack trace, that may help. Not sure if it works with your build setup, but maybe you can run something like ./python -m

[issue30304] TestCase.assertMultiLineEqual only registered for Unicode strings in 2.7

2017-05-26 Thread Martin Panter
Martin Panter added the comment: I think the simplest way forward would be to add the word “Unicode” back in. You could look at making a Git Hub pull request for this if you want. Hopefully somebody else can merge it though, because I probably won’t be in a position to do so for a while

[issue30500] urllib connects to a wrong host

2017-05-28 Thread Martin Panter
Martin Panter added the comment: See also Issue 18140, where it looks like people _want_ the hash (#) to be part of the username and/or password. Another option may be to raise an exception. -- nosy: +martin.panter ___ Python tracker <h

[issue29596] Unfinished sentence in howto/clinic.rst

2017-05-29 Thread Martin Panter
Martin Panter added the comment: Currently for the “buffer” destination, it says Suppress . . ., write . . . to ``block``, and write everything else to ``file``. Would it be more correct to change “file“ to “buffer”? I.e. Suppress . . ., write . . . to ``block``, and write everything else to

[issue30516] Documentation for datetime substract operation incorrect?

2017-05-30 Thread Martin Panter
Martin Panter added the comment: The C "_datetime" implementation seems to handle this as documented. But either way, the "timedelta" range is greater than the "datetime" range, so it seems to be just a difference in OverflowError messages, not a big practi

[issue13359] urllib2 doesn't escape spaces in http requests

2017-06-02 Thread Martin Panter
Martin Panter added the comment: I think this could be merged with Issue 14826. Maybe it is sensible to handle all control characters the same way. -- nosy: +martin.panter resolution: -> duplicate superseder: -> urlopen URL with unescaped

[issue30458] CRLF Injection in httplib

2017-06-03 Thread Martin Panter
Martin Panter added the comment: You can also inject proper HTTP header fields (or do multiple requests) if you omit the space after the CRLF: urlopen("http://localhost:8000/ HTTP/1.1\r\nHEADER: INJECTED\r\nIgnore:") Data sent to the server: >>> server = socket(A

[issue30558] [Suggestion] Improve documentation for set() API

2017-06-03 Thread Martin Panter
Martin Panter added the comment: Did you see <https://docs.python.org/3.6/library/stdtypes.html#set-types-set-frozenset>? -- assignee: -> docs@python components: +Documentation nosy: +docs@python, martin.panter status: open -> pending __

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

2017-06-03 Thread Martin Panter
Martin Panter added the comment: Making this an index of related reports: Issue 30319: test_imap Issue 30315: test_ftplib Issue 30543: test_timeout Issue 30328: test_ssl Issue 27784: test_asyncore.TestAPI_UseIPv6Select.test_handle_accept, test_socketserver Issue 30106

[issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2017-06-03 Thread Martin Panter
Martin Panter added the comment: See <https://bugs.python.org/issue30319#msg295109> about the “socket.close” exception, which should only affect 3.6+. But the 2.7 “recv” exception is a bit different. -- nosy: +martin.panter ___ Python t

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

2017-06-05 Thread Martin Panter
Martin Panter added the comment: Why do you want to this? Encoding files on the fly seems out of scope of the SimpleHTTPRequestHandler class to me, but perhaps a more flexible API that could be plugged in by the user could be beneficial. See

[issue12067] Doc: remove errors about mixed-type comparisons.

2017-06-05 Thread Martin Panter
Martin Panter added the comment: Yes I think I committed all the documentation. Someone needs to decide whether to use Andy’s tests as they are, or perhaps modify or drop some or all of them. -- ___ Python tracker <http://bugs.python.org/issue12

[issue23019] pyexpat.errors wrongly bound to message strings instead of message codes

2017-06-05 Thread Martin Panter
Martin Panter added the comment: Also, even in the Py 3 docs, the ErrorCode parser attribute is said to be numeric, but there is a suggestion to compare it with “constants” defined in the “errors” (module) object. I guess it should be clarified that you can’t compare it directly; perhaps

[issue36050] Why does http.client.HTTPResponse._safe_read use MAXAMOUNT

2019-02-24 Thread Martin Panter
Martin Panter added the comment: The 1 MiB limit was added for Issue 1296004; apparently some platforms were overallocating multiple buffers and running out of memory. I suspect the loop in "_safe_read" was inherited from Python 2, which has different kinds of file objects. Th

[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-03-01 Thread Martin Panter
Martin Panter added the comment: In Issue 28503, “crypt_r” was added to Python 3.7 and 3.8+, and it looks like it is still there. Regarding error handling for “crypt”, it is not documented, but the Python function returns None on error. You would have to consider backwards compatibility to

[issue36172] csv module internal consistency

2019-03-03 Thread Martin Panter
Martin Panter added the comment: The documentation <https://docs.python.org/dev/library/csv.html#module-contents> says you should “open the files with newline=''.” IMO this is an unfortunate quirk of the CSV module. Everything else that I know of in the Python built-in libra

[issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect

2019-03-07 Thread Martin Panter
Martin Panter added the comment: Probably the same as Issue 29353. I remember than enabling "headersonly" can create inconsistencies in the message object. But I don't remember the details. According to Issue 29991 (another duplicate), my patch for Issue 24363 might help. Bu

[issue36246] csv.writer lineterminator affects csv escaping

2019-03-08 Thread Martin Panter
Martin Panter added the comment: This is the result that I see: >>> output = StringIO() >>> csv.writer(output, lineterminator='\n').writerow(["Whoa!\rNewlines!"]) 16 >>> output.getvalue() 'Whoa!\rNewlines!\n' For comparison, this is th

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2019-03-15 Thread Martin Panter
Change by Martin Panter : -- stage: -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.org/issue25476> ___ ___ Python-bugs-list

[issue36293] Nonblocking read sys.stdin raises error

2019-03-15 Thread Martin Panter
Martin Panter added the comment: This is the same story as in Issue 35762. Both “sys.stdin” and “subprocess.Popen.stderr” (when universal_newlines=True is enabled) use the TextIOWrapper class, which I don’t think was implemented with non-blocking mode in mind. Issue 24560 is similar, but is

[issue36294] `io.BufferedIOBase` returns `None`

2019-03-15 Thread Martin Panter
Martin Panter added the comment: The general problem of non-blocking reads with BufferedIOBase is covered by Issue 13322. The documentation and implementations do not agree. I suggest to not rely on any particular behaviour reading BufferedIOBase objects in non-blocking mode. The problem of

[issue36300] eval of generator expressions cannot access local variables

2019-03-15 Thread Martin Hosken
New submission from Martin Hosken : The following code fails: >>> lcls = {'w': 100} >>> eval('[w for x in ("hello", "world")]', None, lcls) Traceback (most recent call last): File "", line 1, in File &

[issue36300] eval of generator expressions cannot access local variables

2019-03-15 Thread Martin Hosken
Change by Martin Hosken : -- versions: +Python 3.6 ___ Python tracker <https://bugs.python.org/issue36300> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36304] When using bz2 and lzma in mode 'wt', the BOM is not written

2019-03-15 Thread Martin Panter
Martin Panter added the comment: I suspect this is caused by TextIOWrapper guessing if it is writing the start of a file versus in the middle, and being confused by “seekable” returning False. GzipFile implements some “seek” calls in write mode, but LZMAFile and BZ2File do not. Using this

[issue33319] `subprocess.run` documentation doesn't tell is using `stdout=PIPE` safe

2019-03-22 Thread Martin Panter
Martin Panter added the comment: This is a regression in the 3.7+ documentation. It previously said “To [capture output], pass PIPE for the ‘stdout’ and/or ‘stderr’ arguments”. This was removed by Bo Bayles in Issue 32102. -- keywords: +3.7regression nosy: +bbayles, gregory.p.smith

[issue36464] Python 2.7 build install fails intermittently with -j on MacOS

2019-03-30 Thread Martin Panter
Martin Panter added the comment: On Linux, Gnu’s “install” command is happy if the target directory already exists; it just changes the mode (-m) etc. So the race isn’t a big deal. This is like the race I described (theoretical at the time) at <https://bugs.python.org/issue25696#msg255

[issue36483] Missing line in documentation example

2019-03-30 Thread Martin Panter
Martin Panter added the comment: Did you read the bracketed paragraph directly below, or try running the code with your “break” statement? I expect it would stop at the first prime number (two). But the output continues with more prime numbers. -- nosy: +martin.panter resolution

[issue35403] support application/wasm in mimetypes and http.server

2019-03-30 Thread Martin Panter
Martin Panter added the comment: According to Issue 34758, this was already added to 3.8’s “mimetypes”. -- nosy: +martin.panter resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue35403] support application/wasm in mimetypes and http.server

2019-03-30 Thread Martin Panter
Change by Martin Panter : -- superseder: -> http.server module sets incorrect mimetype for WebAssembly files ___ Python tracker <https://bugs.python.org/issu

[issue36293] Nonblocking read sys.stdin raises error

2019-03-30 Thread Martin Panter
Martin Panter added the comment: I wasn’t sure about closing it, in case Cyker came back with more details. E.g. what was the use case? Were they mislead by the documentation? Do they just think the error should be different, or do they think there should be no error in this case? But I

[issue36293] Nonblocking read sys.stdin raises error

2019-03-30 Thread Martin Panter
Change by Martin Panter : -- resolution: -> duplicate ___ Python tracker <https://bugs.python.org/issue36293> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-04-10 Thread Martin Panter
Martin Panter added the comment: Gregory, I haven’t tried recent Python code, but I expect the problem with percent decoding is still there. If you did try my example, what results did you see? Be aware that these techniques only work if the OS co-operates and connects to localhost when you

[issue36600] re-enable test in nntplib

2019-04-12 Thread Martin Panter
Martin Panter added the comment: Does the test still depend on real-world posts? If so, see Issue 19613. I don’t think the problem has been fixed. -- nosy: +martin.panter superseder: -> test_nntplib: sporadic failures, test_article_head_b

[issue17267] datetime.time support for '+' and '-'

2019-04-13 Thread Martin Panter
Martin Panter added the comment: A real use case that I have had was with a protocol to activate a device with a daily schedule. The protocol takes start and end hours and minutes of the day. To test the device by activating it over the next few minutes, my ideal way would have taken the

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

2019-04-13 Thread Martin Panter
Martin Panter added the comment: Victor, if you run the test suite, one of the test cases should trigger the overflow. I used to compile with Undefined Behaviour Sanitizer to print messages when these errors occur; see <https://bugs.python.org/issue1621#msg271118> for my setup at the t

[issue36701] module 'urllib' has no attribute 'request'

2019-04-23 Thread Martin Panter
Martin Panter added the comment: The “urllib” package also contains “urllib.parse”, which is a lot more lightweight than “urllib.request”. In a quick experiment, importing “urllib.request” is more than 2 times slower than importing “urllib.parse” on its own. And importing “urllib” by itself

[issue36711] duplicate method definition in Lib/email/feedparser.py

2019-04-24 Thread Martin Panter
Martin Panter added the comment: This is caused by Serhiy’s first change to 2.7 in Issue 21448. Compare Mercurial rev. 1b1f92e39462 (3.4 branch) with ba90bd01c5f1 (2.7). In 2.7, he applied the Python 3 version of the code, which used “str.splitlines” rather than a regular expression

[issue22742] IDLE shows traceback when printing non-BMP character

2019-04-24 Thread Martin Panter
Martin Panter added the comment: I haven’t looked at the code, but I suspect Idle implements a custom “sys.displayhook”: >>> help(sys.displayhook) Help on function displayhook in module idlelib.rpc: displayhook(value) Override standard display hook to use non-locale

[issue23298] Add ArgumentParser.add_mutually_dependence_group

2019-04-24 Thread Martin Panter
Change by Martin Panter : -- superseder: -> Add "necessarily inclusive" groups to argparse ___ Python tracker <https://bugs.python.org/issue23298> ___

[issue23930] http.cookies.SimpleCookie doesn't parse comma-only separated cookies correctly

2019-04-24 Thread Martin Panter
Change by Martin Panter : -- resolution: -> rejected status: open -> pending ___ Python tracker <https://bugs.python.org/issue23930> ___ ___ Python-bugs-

[issue1564508] RFC 2965 BaseCookie does not support "$Port"

2019-04-24 Thread Martin Panter
Martin Panter added the comment: The original report comes from <https://code.djangoproject.com/ticket/2806>. Anders was trying to parse a HTTP request Cookie field, something like: BaseCookie('sessionid=a2be2e7debe71af8d88d350c4d14d768;$Path=/;$Domain=192.168.0.2;$Port="8000

[issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set

2019-04-25 Thread Martin Panter
Martin Panter added the comment: Karthikeyan, it looks like your test will pass even when the bug is not fixed. A test calling code that writes error message does not necessarily mean the test itself will fail, I don’t think. I suggest you look at raising an exception when the UserWarning is

[issue33017] Special set-cookie setting will bypass Cookielib

2019-04-25 Thread Martin Panter
Martin Panter added the comment: I think LCatro is saying that Python should accept the cookies and discard only the offending attributes. This makes sense to me and tends to agree with the specifications, but the three cases seem all seem unimportant to me. PoC 1, Max-age: >>> fro

[issue35824] http.cookies._CookiePattern modifying regular expressions

2019-04-25 Thread Martin Panter
Martin Panter added the comment: Test_http_cookies line 19 has the following test case: {'data': 'keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"', 'dict': {'keebler' : 'E=mc2; L="Loves"; fudge=\012;'}, 'repr&#

[issue36726] Empty select() on windows gives error.

2019-04-25 Thread Martin Panter
Martin Panter added the comment: I think this is a duplicate of Issue 29256. Issue 25680 also discusses platform differences with no file descriptors. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Windows sel

[issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

2019-04-30 Thread Martin Panter
Martin Panter added the comment: Python 3.7 added the "capture_output" parameter, for Issue 32102. Before that change, you could use "subprocess.PIPE": https://docs.python.org/3.6/library/subprocess.html#subprocess.run “To [capture output], pass PIPE for the ‘stdout’ and/o

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-06 Thread Sam Martin
Change by Sam Martin : -- keywords: +patch pull_requests: +13054 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33110> ___ ___ Py

[issue36863] argparse doesn't like options in the middle of arguments

2019-05-10 Thread Martin Panter
Martin Panter added the comment: The “cmd” module doesn’t use “argparse” as far as I can see. You might have to provide more information or code for someone to make sense of or reproduce your bug. Also, see Issue 14191 which added new “parse_[known]_intermixed_args” APIs in 3.7, and have a

[issue32537] multiprocessing.pool.Pool.starmap_async - wrong parameter name

2018-01-12 Thread Martin Panter
Martin Panter added the comment: This was supposed to be fixed in 3.6+ by Issue 31304. In general, 3.5 only gets security fixes at this stage. I’m not sure if it is easy or worth back porting this. -- nosy: +martin.panter ___ Python tracker

[issue32475] Add ability to query number of buffered bytes available on buffered I/O

2018-01-15 Thread Martin Panter
Martin Panter added the comment: If I remember the implementation of “peek” right, it may do what you want. But the documentation doesn’t guarantee much about its behaviour; see Issue 5811. Anyway, I agree that a “getbuffn” method (or property) would be nice. (Perhaps with a better name

[issue32561] Add API to io objects for non-blocking reads/writes

2018-01-15 Thread Martin Panter
Martin Panter added the comment: BufferedIOBase is an abstract class and, despite the name, doesn’t necessitate a buffer or cache. Adding methods and properties might break compatibility with third-party implementations, or get ugly with optional methods and multiple versions of the API. It

[issue32561] Add API to io objects for non-blocking reads/writes

2018-01-15 Thread Martin Panter
Change by Martin Panter : -- dependencies: +Add ability to query number of buffered bytes available on buffered I/O ___ Python tracker <https://bugs.python.org/issue32

[issue32600] SpooledTemporaryFile should implement IOBase

2018-01-19 Thread Martin Panter
Martin Panter added the comment: There is apparently some work done on this already in Issue 26175. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fully implement IOBase abstract on SpooledT

[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2018-01-19 Thread Martin Panter
Martin Panter added the comment: It may also be worth implementing BufferedIOBase and TextIOBase. (It seems buffering=0 isn’t reliable, e.g. rollover with limited disk space, so it may not be worth implementing RawIOBase.) To implement BufferedIOBase, “read1” and “readinto1” should be added

[issue32634] Message parsing fails where it has incompele headers

2018-01-23 Thread Martin Panter
Martin Panter added the comment: Looks like a dupe of Issue 27321 -- nosy: +martin.panter resolution: -> duplicate superseder: -> Email parser creates a message object that can't be flattened ___ Python tracker <https://bugs.python.

[issue32668] deepcopy() fails on ArgumentParser instances

2018-01-25 Thread Martin Kolman
New submission from Martin Kolman : We (the Anaconda OS intaller team) are in the process of switching to a new version of a library (Pykickstart), which among other things switched from using optparse to argparse. And during this endeavour we found that it's apparently not possib

[issue32673] update tutorial dict part to reflect dict is ordered

2018-01-25 Thread Martin Panter
Martin Panter added the comment: See Issue 32337 -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue32673> ___ ___ Python-bugs-list mailin

[issue32698] Improper gzip compression if output file extension is not "gz"

2018-01-28 Thread Martin Panter
Martin Panter added the comment: According to the documentation, you can use the lower-level GzipFile constructor’s “filename” argument: >>> with open(output_path, 'wb') as f_out, \ ... gzip.GzipFile(fileobj=f_out, mode='wb', filename=input_path) as f_out, \

[issue20104] expose posix_spawn(p)

2018-01-28 Thread Martin Panter
Martin Panter added the comment: Pablo’s code looked unfinished to me. As well as missing documentation, I suspect there may be memory leaks and poor error handling. The two calls above the “fail:” label look like dead code. The “parse_envlist” result appears to be leaked. I’m curious why

[issue20104] expose posix_spawn(p)

2018-01-29 Thread Martin Panter
Martin Panter added the comment: Does the PySequence_Fast result need releasing if the following “for” loop fails? There is a Py_DECREF only in the successful case, which seems inconsistent. Does Python still support non-UTF-8 locales and bytes filenames? I haven’t been keeping up, but I

[issue20104] expose posix_spawn(p)

2018-01-29 Thread Martin Panter
Martin Panter added the comment: TypeError if “posix_spawn_file_actions_init” fails doesn’t seem right. I suggest OSError, MemoryError, or even plain Exception instead. “File_actionsp” is set to point to a local variable “_file_actions”, but the variable goes out of scope before the pointer

[issue20104] expose posix_spawn(p)

2018-01-29 Thread Martin Panter
Martin Panter added the comment: Your assumption about calling “file_actions_destroy” would be okay if the posix_spawn_file_actions_t object was a simple object or structure. But I imagine most implementations would allocate memory when you call one of the “add” methods. Especially “addopen

[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2018-01-31 Thread Cyril Martin
New submission from Cyril Martin : - LoggerAdapter processes only extra kwargs given during its __init__ So extra kwargs, given to Logger#log are ignored when we configure a LoggerAdapter (same for: debug, info, warning etc). - I expect extras are merged. More precisely, I expect local extra

[issue32875] Add __exit__() method to event loops

2018-02-23 Thread Martin Panter
Martin Panter added the comment: Maybe already discussed in Issue 24795? -- nosy: +martin.panter superseder: -> Make event loops with statement context managers ___ Python tracker <https://bugs.python.org/issu

[issue32867] argparse assertion failure with multiline metavars

2018-02-23 Thread Martin Panter
Martin Panter added the comment: This looks like the same assertion failure as described in Issue 16360. Paul pointed to a patch in Issue 11874, so that may also be relevant. However I agree that embedding newlines in a metavar doesn’t make much sense. What’s the use case? -- nosy

[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2018-02-28 Thread Cyril Martin
Cyril Martin added the comment: Hi Stéphane, I ask you a question about the change you suggest. The PR has not progress. Do you wait something from me? -- ___ Python tracker <https://bugs.python.org/issue32

[issue32732] LoggingAdapter ignores extra kwargs of Logger#log()

2018-03-01 Thread Cyril Martin
Cyril Martin added the comment: Hello Vinay, I strongly disagree with you. In the Python documentation (https://docs.python.org/3/library/logging.html), we can read the following for the debug function: > The third keyword argument is extra which can be used to pass a dictionary > wh

[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-11 Thread Martin Panter
Martin Panter added the comment: Hi Yao, I tend to agree with Ned. The support for “file:” URLs is by design. I don’t see any security problems. I suggest to close this. In Issue 11662, it was decided that a web server redirecting to a “file:” URL was a security problem. This is because the

[issue33062] ssl_renegotiate() doesn't seem to be exposed

2018-03-13 Thread Martin Panter
Martin Panter added the comment: I have also wanted to force renegotation for testing with Python. As a workaround, I have used the "openssl s_server" program, which I described at <https://bugs.python.org/issue25919#msg257508> (use the lower-case "r" command). Mor

[issue27069] webbrowser creates zombi processes in the background mode

2018-03-17 Thread Martin Panter
Martin Panter added the comment: It does look similar. They probably could be merged. The main difference is in Issue 5993 Eivind suggested to somehow use a “wait” system call, while here Victor suggested “fork” (perhaps to orphan a grandchild process

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2018-03-20 Thread Sam Martin
New submission from Sam Martin : Whilst working with concurrent.futures and ThreadPoolExecutors, my colleague and I have noted some undocumented behaviour. When adding a done_callback to a future that has already completed, we note that that callback is executed directly, outside of any try

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-03-25 Thread Martin Panter
Change by Martin Panter : -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue32270> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-03-25 Thread Martin Panter
Martin Panter added the comment: The close_fds= in that signature seems fine to me. If you read the documentation, it says the default mode depends on the platform, and on other parameters. However I think the signature at <https://docs.python.org/release/3.6.4/library/subprocess.h

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-25 Thread Martin Panter
Martin Panter added the comment: There is no “open_fds” parameter as far as I know. I presume you meant heritable descriptors are still closed with close_fds=True (not open_fds=False). Are you sure about the second part? In my experiments on Linux, unless I use “pass_fds” or one of the

[issue22781] ctypes: Differing results between Python and C.

2018-04-01 Thread Martin Panter
Martin Panter added the comment: Eryk Sun’s explanation makes this sound like a duplicate of Issue 15453, which shows GCC on Linux packing structures into a single byte, and ctypes using the size of the expanded integer type. -- nosy: +martin.panter resolution: -> duplic

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-04-01 Thread Martin Panter
Martin Panter added the comment: Siddhesh, it looks like your fixes make the C function signatures match the signature expected in the PyMethodDef structure. If so, I suggest to remove the (PyCFunction) casts from those structure definitions as well. For instance, now that we have

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-04-04 Thread Martin Panter
Martin Panter added the comment: Sorry, I realize there is a problem remaining with the pointer types for "Noddy_name" (Noddy vs PyObject pointers), so you can't remove the cast there. But my suggestion should still apply to other places, for instance the "error_out&

[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-07 Thread Martin Falatic
New submission from Martin Falatic : The documentation for the tempfile module in Python 3.x for the `buffering` option is incorrect: https://docs.python.org/3/library/tempfile.html TemporaryFile, NamedTemporaryFile, and SpooledTemporaryFile all take the `buffering` option, which in turn

[issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer

2018-04-08 Thread Louis Martin
Change by Louis Martin : -- components: Tkinter nosy: louis-martin priority: normal severity: normal status: open title: Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer versions: Python 3.6

[issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer

2018-04-08 Thread Louis Martin
New submission from Louis Martin : Tested with : from appJar import gui with gui() as app: app.label('hello world', tip="help me") app.addLabel("l1", "text") app.setLabelTooltip("l1", "more help") -- __

[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-08 Thread Martin Falatic
Martin Falatic added the comment: The correction of `buffering=None` --> `buffering=-1` for the defaults definitely needs to happen. A reference to `open()` is already present in the 3.x documentation: "buffering, encoding and newline are interpreted as for open()." Given t

[issue33294] Support complex expressions for py-print command.

2018-04-17 Thread Martin Liška
New submission from Martin Liška : The patch is based on a blog post: http://kouk.surukle.me/2014/09/25/debugging-python-objects-and-fields-with-gdb/. Adding him: @kouk Purpose of the pull request is to support more complex expressions for py-print command. Small example: (gdb) py-print self

[issue33300] Bad usage example in id() DocString

2018-04-17 Thread Martin Panter
Martin Panter added the comment: It is supposed to be a function signature, similar to the syntax when you define your own function, rather than a usage example of calling the function. In this case, the slash notation is described by PEP 457. It is supposed to indicate that “obj” is a

[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks

2018-04-20 Thread Martin Panter
Martin Panter added the comment: This looks like it may be covered by Issue 31940, about the “shutil.copystat” API. See Anthony’s initial proposal at <https://bugs.python.org/issue31940#msg305528>. Max: I think you need the “else” branch to reraise the exception if “errno” doesn’t

[issue33384] Build does not work with closed stdin

2018-04-29 Thread Martin Husemann
New submission from Martin Husemann : When building python extensions in the background w/o stdin (and stderr and stdout redirected to a log file), the invocation of setup.py fails. Normal build in a shell: Example from pyexpat: > /usr/pkg/bin/python3.6 setup.py build running build runn

[issue33413] asyncio.gather should not use special Future

2018-05-02 Thread Martin Teichmann
New submission from Martin Teichmann : asyncio.gather() returns a _GatheringFuture, which inherits from asyncio.Future. This is weird in current asyncio, as futures are supposed to be created with loop.create_future(). So I tried to reimplement gather() without this weird special future. I

[issue33413] asyncio.gather should not use special Future

2018-05-02 Thread Martin Teichmann
Change by Martin Teichmann : -- keywords: +patch pull_requests: +6388 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33413> ___ ___ Py

[issue33411] All console message are in the error output in bash interpretor

2018-05-05 Thread Martin Panter
Martin Panter added the comment: The exception message and stack trace is documented to go to stderr: <https://docs.python.org/2/library/sys.html#sys.excepthook>. Whether the prompt “>>>” goes to stderr or stdout depends on quirks of the environment. Issue 1927 currently prop

[issue20104] expose posix_spawn(p)

2018-05-06 Thread Martin Panter
Martin Panter added the comment: To wrap “posix_spawnattr_setschedparam” perhaps you could combine it with the scheduler policy: # Inherit current policy and parameters: posix_spawn(..., scheduler=None) # Set new policy with parameters: posix_spawn(..., scheduler=(policy, param)) # Inherit

[issue20104] expose posix_spawn(p)

2018-05-06 Thread Martin Panter
Martin Panter added the comment: Can you use the existing sched_param class? https://docs.python.org/3/library/os.html#os.sched_param -- ___ Python tracker <https://bugs.python.org/issue20

[issue33294] Support complex expressions for py-print command.

2018-05-09 Thread Martin Liška
Martin Liška added the comment: May I please ping patch review.. -- ___ Python tracker <https://bugs.python.org/issue33294> ___ ___ Python-bugs-list mailin

[issue33413] asyncio.gather should not use special Future

2018-05-10 Thread Martin Teichmann
Martin Teichmann added the comment: I looked a bit into the details, and found that bpo-30048 created the described weird behavior. There they fixed the problem that a cancel is ignored if a coroutine manages to cancel its own task and return immediately. As shown in the discussion there

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Martin Panter
Martin Panter added the comment: I suggested the “scheduler” tuple to bring the two related parameters (scheduling policy and sched_param) together, similar to how they are paired as the second and third parameters to “os.sched_setscheduler”, and because I thought it would imply that a

[issue32393] nav menu jitter in old documentation

2018-05-14 Thread Martin Panter
Martin Panter added the comment: Maybe related to Issue 24712? -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue32393> ___ ___ Python-bug

[issue33481] configparser.write() does not save comments.

2018-05-14 Thread Martin Panter
Martin Panter added the comment: Looks like Issue 1410680 has a new function to merge comments with new config values (among other things). -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue33

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread Martin Panter
Martin Panter added the comment: I’m curious how you manage to trigger the warning in the “closed” state. The Python I have handy is half a year out of date, but all my attempts to trigger the warning either produce the less confusing version, ResourceWarning: unclosed or there is no

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