[issue28647] python --help: -u is misdocumented as binary mode

2017-01-06 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue29145] failing overflow checks in replace_*

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code in PyUnicode_Join() checks on overflow after making an addition. sz += PyUnicode_GET_LENGTH(item); item_maxchar = PyUnicode_MAX_CHAR_VALUE(item); maxchar = Py_MAX(maxchar, item_maxchar); if (i != 0) sz +=

[issue29186] TimeoutError isn't being raised?

2017-01-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list

[issue29187] Pickle failure is raising AttributeError and not PicklingError

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python implementation of pickle still raises PicklingError. Seems this was not intentional change. >>> pickle._dumps(func()()) Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/pickle.py", line 918, in save_global obj2, parent =

[issue29190] Avoid possible errors in comparing strings

2017-01-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyUnicode_Compare() and PyUnicode_RichCompare() can raise an exception if one of arguments is not ready unicode object. The result is not always checked for error. Proposed patch gets rid of possible bugs. PyUnicode_Compare() and PyUnicode_RichCompare()

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-06 Thread Berker Peksag
Berker Peksag added the comment: I'd probably write it without the for loop: text = "a && b; c && d || e; f >'abc'; (def \"ghi\")" result = shlex.shlex(text) print(f"Old behavior: {list(result)}") result = shlex.shlex(text, punctuation_chars=True) print(f"New behavior:

[issue16026] csv.DictReader argument names documented incorrectly

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 198edd926751 by Berker Peksag in branch '3.6': Issue #16026: Fix parameter names of DictReader and DictWriter https://hg.python.org/cpython/rev/198edd926751 New changeset 63c5531cfdf7 by Berker Peksag in branch 'default': Issue #16026: Merge from

[issue16026] csv.DictReader argument names documented incorrectly

2017-01-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patches James and Greg! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 ___ Python tracker

[issue29189] Broken indentation in FancyURLopener documentation

2017-01-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the review, Senthil. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29189] Broken indentation in FancyURLopener documentation

2017-01-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 31172ecb9e40 by Berker Peksag in branch '2.7': Issue #29189: Fix broken indentation in FancyURLopener documentation https://hg.python.org/cpython/rev/31172ecb9e40 -- nosy: +python-dev ___ Python tracker

[issue29189] Broken indentation in FancyURLopener documentation

2017-01-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: The patch looks good to me, and can committed. Thanks! -- ___ Python tracker ___

[issue29189] Broken indentation in FancyURLopener documentation

2017-01-06 Thread Berker Peksag
New submission from Berker Peksag: I noticed this while taking a look at urllib docs for issue 29182. Indentation of prompt_user_passwd() is broken and it looks like it's part of the note directive: https://docs.python.org/2/library/urllib.html#urllib.FancyURLopener.prompt_user_passwd Python

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

2017-01-06 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> commit review ___ Python tracker ___

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

2017-01-06 Thread INADA Naoki
INADA Naoki added the comment: >> stderr is used to log errors. Getting a new error when trying to log >> an error is kind of annoying. > > Hm, what bad surprise/error could appear that would not appear with > backslashescape? $ cat badfilename.py badfn =

[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

[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

[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

[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 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

[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

[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

[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

[issue29179] Py_UNUSED is not documented

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

[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 ___

[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 ___

[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

[issue29186] TimeoutError isn't being raised?

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

[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

[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

[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

[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 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

[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

[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 :) -- ___

[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

[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 -

[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

[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

[issue2771] Test issue

2017-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +10 ___ Python tracker ___ ___ Python-bugs-list

[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:

[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

[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

[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

[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". --

[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

[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

[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

[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

[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

[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 ___ ___

[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 =

[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:

[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:

[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

[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

[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):

[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

[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

[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

[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

[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:

[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:

[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 ___ ___

[issue2771] Test issue

2017-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +9 ___ Python tracker ___ ___ Python-bugs-list

[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

[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

[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

[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 ___ ___

[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. --

[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

[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()

[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

[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:

[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

[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

[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

[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

[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

[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

[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 ___

[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

[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:

[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

[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

[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

[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 ___ ___

[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 ]

[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:

[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

[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

[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

[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

[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 =

[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:

[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) --

[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
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. ==

[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

[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. --

  1   2   >