[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-06 Thread Jan Niklas Hasse
Jan Niklas Hasse added the comment: > Can you please tell me if these variables are set and if yes, give me their > value? None of these variables are set (with `docker run -it fedora:25 /bin/bash`). -- ___ Python tracker

[issue29159] Regression in bytes constructor

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 505cc50ddc82 by INADA Naoki in branch '3.6': Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception. https://hg.python.org/cpython/rev/505cc50ddc82 -- nosy: +python-dev ___ Python tr

[issue29159] Regression in bytes constructor

2017-01-06 Thread INADA Naoki
INADA Naoki added the comment: > patch LGTM except that arguments of assertEqual are in reversed order. fixed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread ita1024
New submission from ita1024: Please try the attached testcase with `python3.6 test.py`; Python 3.6 displays unnecessary warnings of the following form: $ ../test.py Exception ignored in: > Traceback (most recent call last): File "/usr/local/lib/python3.6/subprocess.py", line 761, in __del__ T

[issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset b14a1e81c34a by Victor Stinner in branch '3.6': Fix subprocess.Popen.__del__() fox Python shutdown https://hg.python.org/cpython/rev/b14a1e81c34a -- ___ Python tracker

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue29175] Documentation for File objects missing

2017-01-06 Thread Jonathan Roach
New submission from Jonathan Roach: The file documentation (as seen in python.org) went missing in 3.3. In 2.7.13 it can be found in 'The Python Standard Library' as section '5.9 File Objects', between '5.8 Mapping Types' and '5.10 memory view type'. In 3.3 and onwards this section is no longe

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 140f0459fe80 by Victor Stinner in branch 'default': Issue #29157: dev_urandom() now calls py_getentropy() https://hg.python.org/cpython/rev/140f0459fe80 New changeset 69b23952d122 by Victor Stinner in branch 'default': Issue #29157: Simplify dev_ura

[issue29169] update zlib to 1.2.10

2017-01-06 Thread Matthias Klose
Matthias Klose added the comment: ok, will wait with the commits until after the releases. -- ___ Python tracker ___ ___ Python-bugs-l

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2017-01-06 Thread Michael Felt
Michael Felt added the comment: My - bad - this was largely a duplicate of three now closed issues: issue10656, issue16189, and issue25825 as far as the build process goes the issue is fixed. However, issue10656 is not yet "fully-finished" because "make distclean" does not complete successfull

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset b14a1e81c34a by Victor Stinner in branch '3.6': Fix subprocess.Popen.__del__() fox Python shutdown https://hg.python.org/cpython/rev/b14a1e81c34a -- nosy: +python-dev ___ Python tracker

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: > 1. The call to warnings.warn is not usable during interpreter shutdown (and > running `python -W ignore test.py` has no effect) Oops right. I just fixed this issue. > 2. Calling "process.terminate()" or "process.kill()" at in the testcase or in > an atexit

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: Thanks Nick and Xiang for the review. I splitted again the giant change into small atomic changes, easier to review and understand. Right now, I only applied the change to default (Python 3.7). I will now wait for buildbots before considering backporting the c

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-06 Thread Xiang Zhang
Xiang Zhang added the comment: > I think it makes sense to strip at the end as well (`example.com` is the same > domain as `example.com.`). Are your sure the host checked against the list is FQDN? With and without the trailing dot are different. -- ___

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-06 Thread INADA Naoki
New submission from INADA Naoki: # Summary ## 1. Making bytes from slice of bytearray easy and efficient. bs = bytes(memoryview(bytelike)[start:end]) works fine on CPython, but it will cause issue on PyPy. Since memoryview is not closed explicitly, exception like "BufferError: Existing exports

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: This happens on Android for a non-root user. One test in test_logging fails. Multiple tests fail in test_socketserver with identical backtraces, only the first one is listed here. ==

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: == ERROR: test_module_funcs (test.test_curses.TestCurses) Test module-level functions -- Traceback (most recent call last):

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: test_logging fails also with the following backtrace: == FAIL: test_output (test.test_logging.UnixSocketHandlerTest) -- Traceb

[issue29132] shlex.shlex with punctuation_chars and posix doesn't handle punctuation next to quotes

2017-01-06 Thread Evan
Evan added the comment: I've just submitted the form. I'm attaching a second patch which also addresses another similar bug demonstrated in the test case. The fix is to check for the 'c' state before checking for quotes or escape characters. -- Added file: http://bugs.python.org/file4

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2017-01-06 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: [no status change, this issue currently does NOT need any attention] To keep issues separate, I just wanted to document a comment about this issue mentioned in issue29070. It refers to the _copy loop. if STDIN_FILENO in rfds: data = st

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-01-06 Thread Segev Finer
Segev Finer added the comment: Though Python has taken measures to mark handles as non-inheritable there is still a possible race due to having to create inheritable handles while creating processes with stdio pipes (subprocess). Attached is a Patch that implements subprocess.Popen(close_fds=T

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2017-01-06 Thread Herman Schistad
Herman Schistad added the comment: I can confirm that this patch solves the issues I've had where I can submit multipart forms provided I have a string URL, but not if it's unicode. I'm using Python 2.7.12. Applying the patch fixes the issue. Code which breaks, assuming the file contains binar

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-01-06 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I guess replace mkstemp (C function) with tempfile.mkstemp (Python function) can solve the problem. -- nosy: +Chi Hsuan Yen ___ Python tracker _

[issue22135] allow to break into pdb with Ctrl-C for all the commands that resume execution

2017-01-06 Thread Chun-Yu Tseng
Chun-Yu Tseng added the comment: Ping :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue29179] Py_UNUSED is not documented

2017-01-06 Thread Petr Viktorin
New submission from Petr Viktorin: The Py_UNUSED macro, which was added in Python 3.4, is not documented. Is this an omission, or is it undocumented on purpose? I can prepare a patch if it's the former. The macro was added in: http://bugs.python.org/issue19976 and referenced in: http://bugs.pyt

[issue27876] Add SSLContext.set_version_range(minver, maxver=None)

2017-01-06 Thread Christian Heimes
Christian Heimes added the comment: PoC implementation: from enum import Enum import ssl OP_NO_TLSv1_3 = getattr(ssl, 'OP_NO_TLSv1_3', 0) OP_NO_FLAGS = [ ssl.OP_NO_SSLv2, ssl.OP_NO_SSLv3, ssl.OP_NO_TLSv1, ssl.OP_NO_TLSv1_1, ssl.OP_NO_TLSv1_2, OP_NO_TLSv1_3 ] OP_NO_MASK

[issue28961] unittest.mock._Call ignores `name` parameter

2017-01-06 Thread Michael Foord
Michael Foord added the comment: Yep, LGTM as well. Nicely spotted! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue29180] skip tests that raise PermissionError in test_os (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: == [1633/2616] ERROR: test_link (test.test_os.LinkTests) -- Traceback (most recent call last): File "/sd

[issue29175] Tutorial links to file object methods are broken.

2017-01-06 Thread R. David Murray
R. David Murray added the comment: The tutorial links are definitely bugs, and the section may need some tweaking. The 'file object' documentation is replaced by the io module, which completely defines the file object API. There is a link from the 'file object' glossary entry to the IO modul

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: To reproduce the test_logging cleanup problem, insert skipTest() in setUp(): diff -r 4a97fa319bf7 Lib/test/test_logging.py --- a/Lib/test/test_logging.py Fri Jan 06 09:52:19 2017 +0100 +++ b/Lib/test/test_logging.py Fri Jan 06 16:39:38 2017 +0100 @@ -1440,6 +1

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: The test_logging cleanup problem induces another problem. When test_lib2to3 is run after the failing test_logging then test_lib2to3 fails with: == FAIL: test_filename_changing_on_output_single_

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: > To reproduce the test_logging cleanup problem, insert skipTest() in setUp() My understanding is that skipTest would normally be raised in the test method itself or as a decorator to it, and not in setUp() itself. (It wouldn't make sense to, as that would skip e

[issue22135] allow to break into pdb with Ctrl-C for all the commands that resume execution

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: The code review of your first patch still applies to your last patch. -- ___ Python tracker ___ ___

[issue29168] multiprocessing pickle error

2017-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: I'm closing this on the basis that I don't believe there's a bug here, but you can of course re-open if you have evidence to the contrary. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: > My understanding is that skipTest would normally be raised in the test method > itself or as a decorator to it, and not in setUp() itself. Agreed. Would that make sense to move the server.start() part out of setUp() and in its own method that would be called

[issue29181] skip tests that raise PermissionError in test_tarfile (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: == [339/2616] ERROR: test_link_size (test.test_tarfile.Bz2WriteTest) -- Traceback (most recent call last)

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-06 Thread Yury Selivanov
Yury Selivanov added the comment: I've added a couple of review comments. Also, it looks like you can count Antoine Pitrou as +1 too. Two questions: 1. length or count? Need to look through builtins/stdlib and see what is more common in CPython. 2. Maybe we should make length/count and off

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-01-06 Thread Eryk Sun
Eryk Sun added the comment: Implementing pass_fds on Windows is a problem if Popen has to implement the undocumented use of the STARTUPINFO cbReserved2 and lpReserved2 fields to inherit CRT file descriptors. I suppose we could implement this ourselves in _winapi since it's unlikely that the da

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-06 Thread luke_16
luke_16 added the comment: Regarding Davin's last paragraph: "Without pulling apart your code...", I would like to point out that what I'm doing is what the Documentation instructs: https://docs.python.org/2/library/multiprocessing.html#using-a-remote-manager So, I want to access a process run

[issue29182] Remove the warning in urllib docs that it doesn't do certificate validate by default.

2017-01-06 Thread Senthil Kumaran
New submission from Senthil Kumaran: It started as a discussion in this issue: http://bugs.python.org/issue22417#msg284604 I think, that warning can be removed. If no one has any objections, I will commit this attached patch. -- assignee: orsenthil components: Documentation files: re

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Count me as -1 too. This is just a two-liner: with memoryview(bytelike) as m: bs = bytes(m[start:end]) In most cases, when all content is used, the bytes constructor works fine. bs = bytes(bytelike) This works not just with bytes, but with

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-06 Thread Yury Selivanov
Yury Selivanov added the comment: > This is just a two-liner: > >with memoryview(bytelike) as m: >bs = bytes(m[start:end]) Which virtually no one follows :( > Adding new method to builtin type has high bar. I doubts that there are > enough use cases in which bytes.frombuffer() has

[issue28961] unittest.mock._Call ignores `name` parameter

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50424a903593 by Victor Stinner in branch '3.6': Fix unittest.mock._Call: don't ignore name https://hg.python.org/cpython/rev/50424a903593 -- nosy: +python-dev ___ Python tracker

[issue28961] unittest.mock._Call ignores `name` parameter

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: I applied the latest mock.patch to Python 3.6 and default (future 3.7). I prefer to wait for the 3.5.3 release before backporting the fix to 3.5, the fix is minor, I don't want to annoy the release manager yet. -- _

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue29177] skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

2017-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: > Would that make sense to move the server.start() part out of setUp() and in > its own method My preference would be to just catch the error in SocketHandlerTest.setUp() and leave things in a tidy state (e.g. .server and .sock_hdlr set to None), make the tearDo

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-06 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Thank you Martin very much for this very helpful review. I updated and simplified the tests and implemented your suggestions. There are three open issues left. 1) > It looks like you depend on fixing Issue 26228, but the patch there will > conflict with y

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-01-06 Thread Segev Finer
Segev Finer added the comment: Second version of the patch after review by eryksun. Please pay attention to the hack in _execute_child due to having to temporarily override the handle_list if the user supplied one. As for pass_fds: as you noted, it has it's own share of complexities and issues

[issue2771] Test issue

2017-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29183] Unintuitive error handling in wsgiref when a crash happens in write() or close()

2017-01-06 Thread Jerome Leclanche
New submission from Jerome Leclanche: TLDR: When an error happens in the wsgiref's write() or close(), stack traces get inundated with irrelevant yet legitimate errors which make it hard to track down the real issue. Couple of examples of this happening in practice: https://stackoverflow.com/q

[issue29184] skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: This happens on Android for a non-root user. Multiple tests fail in test_socketserver with identical backtraces, only the first one is listed here. == [905/2616] ERROR: t

[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: I have split this issue, issue 29184 is for fixing the tests on test_socketserver and this issue is for fixing the tests on test_logging. -- assignee: xdegaye -> title: skip tests using socketserver.UnixStreamServer when bind() raises PermissionError

[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Do you want to take this on, or do you want me to look at it? I would be very grateful if you would handle that :) But if you cannot spare the time, I can give it a try. One point I forgot to mention is that DatagramHandlerTest and SysLogHandlerTest also fail

[issue29175] Tutorial links to file object methods are broken.

2017-01-06 Thread Jonathan Roach
Jonathan Roach added the comment: OK, I understand that the older versions aren't going to be revised - that makes sense. I think part of the reason I submitted this is the reader's path from the open() documentation to the most relevant part of the io documentation (the interface) is long an

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2017-01-06 Thread Sworddragon
Sworddragon added the comment: Bug #28180 has caused me to make a look at the "encoding" issue this and the tickets before have tried to solve more or less. Being a bit unsure what the root cause and intention for all this was I'm now at a point to actually check this ticket. Here is an exampl

[issue29185] test_distutils fails on Android API level 24

2017-01-06 Thread Xavier de Gaye
New submission from Xavier de Gaye: == ERROR: test_tarfile_vs_tar (distutils.tests.test_archive_util.ArchiveUtilTestCase) -- Traceback (most recent call last):

[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-06 Thread Larry Hastings
Larry Hastings added the comment: I don't understand the fix. Does this really prevent the injection? I would fix it this way: if tixlib is not None and os.path.exists(tixlib): -- ___ Python tracker

[issue26865] Meta-issue: support of the android platform

2017-01-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #29176: /tmp does not exist on Android and is used by curses.window.putwin() issue #29177: skip tests of test_logging when bind() raises PermissionError (non-root user on Android) issue #29180: skip tests that raise PermissionError in test_os (non-root us

[issue29006] 2.7.13 _sqlite more prone to "database table is locked"

2017-01-06 Thread Larry Hastings
Larry Hastings added the comment: FYI I'm keeping an eye on this for possible cherry-picking into 3.5.3 final, depending on the resolution. Reverting 030e100f048a work for me, assuming that's a reasonable solution. -- ___ Python tracker

[issue2771] Test issue

2017-01-06 Thread Ezio Melotti
Ezio Melotti added the comment: test -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2017-01-06 Thread Dmitry Shachnev
Dmitry Shachnev added the comment: [Matthias Klose (doko) 2016-10-27 15:45] > I'm not sure that you really want this, because it would make it impossible > to build an extension for the stable ABI for a debug build. It looks like that is already impossible: /usr/include/python3.5dm/object.h:65

[issue29030] argparse: choices override metavar

2017-01-06 Thread paul j3
paul j3 added the comment: Here's the method in HelpFormatter that creates the metavar: def _metavar_formatter(self, action, default_metavar): if action.metavar is not None: result = action.metavar elif action.choices is not None: choice_strs = [str(ch

[issue29117] dir() should include dunder attributes of the unbound method

2017-01-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tested your last claim and it is true as far as I went. >>> C.f.__annotations__ {'a': } >>> C().f.__annotations__ {'a': } >>> C.f.__code__ ", line 2> >>> C().f.__code__ ", line 2> -- nosy: +terry.reedy stage: -> test needed type: -> behavior version

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: By default, error message wording changes are 'enhancements' that wait for the next x.y.0 release unless the current wording is positively wrong'. This is different from doc changes because there are tests depending on error messages. 'Inconsistent' or 'awkwa

[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: I've added a patch that should handle these errors (including the SysLogHandlerTest, which wasn't reported, but I think the same logic applies). To simulate failure during setup, uncomment one or more of the lines which says # raise ValueError('dummy error ra

[issue29181] skip tests that raise PermissionError in test_tarfile (non-root user on Android)

2017-01-06 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29125] Shell injection via TIX_LIBRARY when using tkinter.tix

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes this prevents the injection. The injection is possible because the patch is substituted in the string without any escaping. Your fix is not enough. The real path to a Tix installation can contain special characters: '\', '{' or '}'. My patch first sets

[issue29177] skip tests of test_logging when bind() raises PermissionError (non-root user on Android)

2017-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: > including the SysLogHandlerTest, which wasn't reported Sorry, I appear to have lost the ability to read :-( -- ___ Python tracker ___ __

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can concatenate any object supporting the buffer protocol to bytes and bytearray. Current error message for bytes looks awkward too, because it says "bytes to othertype" instead of "othertype to bytes". -- __

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: "I thought with the surrogateescape error handler now being used for sys.stdout this would not throw an exception but I'm getting this: (...)" Please see the two recently proposed PEP: Nick's PEP 538 and my PEP 540, both propose (two different) solutions to yo

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Which virtually no one follows :( Sad. But adding bytes.frombuffer() wouldn't make it magically used. If you are aware of the problem, you can use the above two-liner as well as bytes.frombuffer(). You even can use it in the current code with older Python

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: Python already has a multiprocessing module which is able to pass handles (maybe also FD? I don't know) to child processes on Windows. I found some code in Lib/multiprocessing/reduction.py: - duplicate() - steal_handle() - send_handle() But the design doesn't

[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: I dislike adding a lpAttributeList attribute: it's too close to the exact implementation of Windows may change in the future. I would prefer a more high level API. Since the only known use case today is to pass handles, I propose to focus on this use case: ad

[issue2771] Test issue

2017-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread ita1024
ita1024 added the comment: The point #3 was referring to the new requirement for an atexit handler in order to not only kill the processes but to also wait for them at interpreter shutdown. The sub-processes (and associated resources) in the example are definitely freed as the parent process i

[issue29186] TimeoutError isn't being raised?

2017-01-06 Thread YoSTEALTH
New submission from YoSTEALTH: TimeoutError isn't being raised? My Python Version: 3.5.1 (64bit, linux) # Document: https://docs.python.org/3/library/exceptions.html#TimeoutError """ exception TimeoutError Raised when a system function timed out at the system level. Corresponds to errno ET

[issue29187] Pickle failure is raising AttributeError and not PicklingError

2017-01-06 Thread Matt Dodge
New submission from Matt Dodge: When failing to pickle something (like a locally scoped class) the documentation indicates that a PicklingError should be raised. Doc links: - https://docs.python.org/3/library/pickle.html?highlight=pickle#pickle-picklable - https://docs.python.org/3.5/library

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8e24a0a1124 by Victor Stinner in branch '3.6': Issue #29157: Prefer getrandom() over getentropy() https://hg.python.org/cpython/rev/f8e24a0a1124 -- ___ Python tracker

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: Christian Heimes: "I'm doing a review now." Follow-up on #python-dev (IRC): haypo: yes, I looked at the patch and did not see any obvious problem with it. Didn't I tell you? haypo: maybe I forgot :) -- ___ Python

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: random-py35.patch: Patch for the 3.5 branch. My prepared commit message: --- Issue #29157: Prefer getrandom() over getentropy() Copy and then adapt Python/random.c from default branch. Difference between 3.5 and default branches: * Python 3.5 only uses getrando

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2017-01-06 Thread Sworddragon
Sworddragon added the comment: The point is this ticket claims to be using the surrogateescape error handler for sys.stdout and sys.stdin for the C locale. I have never used surrogateescape explicitly before and thus have no experience for it and consulting the documentation mentions throwing

[issue29030] argparse: choices override metavar

2017-01-06 Thread paul j3
paul j3 added the comment: subparsers is an example of choices displaying as the metavar. From the documentation example: usage: PROG [-h] [--foo] {a,b} ... positional arguments: {a,b} sub-command help - To the main parser, the 'subparser' is a positional argument, with

[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: > But maybe I'm just missing something. This issue fixed exactly one use case: "List a directory into stdout" (similar to the UNIX "ls" or Windows "dir" commands): https://www.python.org/dev/peps/pep-0540/#list-a-directory-into-stdout Your use case is more "Di

[issue29188] Backport random.c from Python 3.5 to Python 2.7

2017-01-06 Thread STINNER Victor
New submission from STINNER Victor: Python 3.6 uses the new getrandom() function/syscall on Linux and Solaris to get random bytes with no file descriptor: it prevents EMFILE and ENFILE errors or surprises when opening a first file (and looking at its file descriptor). I propose to copy and ada

[issue29157] random.c: Prefer getrandom() over getentropy() to support glibc 2.24 on Linux

2017-01-06 Thread STINNER Victor
Changes by STINNER Victor : -- title: random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy() -> random.c: Prefer getrandom() over getentropy() to support glibc 2.24 on Linux ___ Python tracker

[issue29186] TimeoutError isn't being raised?

2017-01-06 Thread YoSTEALTH
Changes by YoSTEALTH : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d6ebd206cd6 by Raymond Hettinger in branch '2.7': Issue #29023: Clarify that ints and longs are always deterministic seeds for random. https://hg.python.org/cpython/rev/7d6ebd206cd6 -- nosy: +python-dev __

[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2017-01-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue29188] Backport random.c from Python 3.5 to Python 2.7

2017-01-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think it is far too late to be making these kind of changes to 2.7. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix

2017-01-06 Thread Martin Panter
Martin Panter added the comment: Regarding reopening Issue 10656, whatever you think is more appropriate. You just have to judge whether it is the same use case, the same code affected, etc. Issue 16189 and Issue 25825 were about updating to match recent changes to directory names, and I thoug

[issue29179] Py_UNUSED is not documented

2017-01-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> larry nosy: +larry ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29188] Backport random.c from Python 3.5 to Python 2.7

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: > I think it is far too late to be making these kind of changes to 2.7. I would prefer to use the "same code" (or almost) on all maintained versions of Python: 2.7, 3.5, 3.6 and 3.7. It should ease the maintenance for bugfixes and enhancements. It seems like

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread Martin Panter
Martin Panter added the comment: The ResourceWarning was added by Issue 26741. I agree that there are legitimate reasons why pre-3.6 code may avoid calling Popen.wait() and equivalent. Victor opened Issue 27068 about adding a Popen.detach() method, which such code could use to opt out of the w

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-06 Thread Sworddragon
Sworddragon added the comment: On looking into PEP 538 and PEP 540 I think PEP 540 is the way to go. It provides an option for a stronger encapsulation for the de-/encoding logic between the interpreter and the developer. Instead of caring about error handling the developer has now to care abo

[issue29174] 'NoneType' object is not callable in subprocess.py

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: Martin Panter: > Victor opened Issue 27068 about adding a Popen.detach() method, which such > code could use to opt out of the warning. I opened the issue because you asked me to open it, but I'm not convinced yet that the design would work. I don't understand

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-06 Thread STINNER Victor
STINNER Victor added the comment: Sworddragon added the comment: > (for me and maybe others that is explicitly preferred but maybe this depends > on each individual) That's why the PEP 540 has options to enable to disable its UTF-8 mode(s). > If I'm not wrong PEP 538 improves this for the outp

[issue28961] unittest.mock._Call ignores `name` parameter

2017-01-06 Thread Berker Peksag
Berker Peksag added the comment: IIRC 3.5.3rc1 is already tagged so the 3.5 branch is open for 3.5.4. Anything that needs to be in 3.5.3 should be cherry-picked by the RM at this point if I'm not mistaken (and note that I don't have time check, but 3.5.3 may be the last bugfix release of 3.5 s

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-06 Thread Sworddragon
Sworddragon added the comment: > What do you mean by "make the C locale"? I was pointing to the Platform Support Changes of PEP 538. > I'm not sure of the name of each mode yet. > > After having written the "Use Cases" section and especially the > Mojibake column of results, I consider the opt

  1   2   >