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

2017-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: > 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. This is VERY far from our historical policy for backports. Python 2.7 is

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

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch attached. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file46201/test_socketserver.patch ___ Python tracker

[issue29198] AsyncGenerator is missing from typing

2017-01-07 Thread Jelle Zijlstra
New submission from Jelle Zijlstra: PEP 525 async generators weren't added to typing.py, probably by oversight. I sent pull requests to typing and typeshed on GitHub to add an AsyncGenerator class and stub: - https://github.com/python/typing/pull/346 -

[issue29198] AsyncGenerator is missing from typing

2017-01-07 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2017-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that it would just be confusing if the Python 3 docs were to explain Python 2 specific things. Maybe this should be explained in the mypy docs (or maybe it's really a mypy bug). Can you open an issue there? -- nosy: +gvanrossum resolution:

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

2017-01-07 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the improvements to my patch. The 03-version looks good to me. -- ___ Python tracker ___

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

2017-01-07 Thread Martin Panter
Martin Panter added the comment: I would prefer to commit Chris’s fix for BSDs (Issue 26228) with a regression test. I can explain in the commit message who contributed to which part, or do two separate commits if you prefer. But the point is to add the test with the fix. I’m not going to

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

2017-01-07 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___

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

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch attached. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file46200/test_os.patch ___ Python tracker

[issue29167] Race condition in enum.py:_decompose()

2017-01-07 Thread Ethan Furman
Ethan Furman added the comment: Thanks. I'll go through and audit all my dictionary iterations. -- nosy: +barry, eli.bendersky ___ Python tracker ___

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

2017-01-07 Thread Sworddragon
Sworddragon added the comment: > $ cat badfilename.py > badfn = "こんにちは".encode('euc-jp').decode('utf-8', 'surrogateescape') > print("bad filename:", badfn) > > $ PYTHONIOENCODING=utf-8:backslashreplace python3 badfilename.py > bad filename: \udca4\udcb3\udca4\udcf3\udca4ˤ\udcc1\udca4\udccf > >

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

2017-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why os.link() is failed? If hard links are not supported on Android, shouldn't os.link be not implemented? tarfile try to make a copy of the referenced file instead of a link if a link can't be created. -- nosy: +serhiy.storchaka

[issue23242] asyncio: Process must close the transport when the process exit

2017-01-07 Thread Alex Grönholm
Changes by Alex Grönholm : -- nosy: +alex.gronholm versions: +Python 3.6 ___ Python tracker ___

[issue23242] asyncio: Process must close the transport when the process exit

2017-01-07 Thread Alex Grönholm
Alex Grönholm added the comment: Are you sure this has been fixed? The attached script reproduces the bug 100% reliably on my laptop. -- Added file: http://bugs.python.org/file46198/read_subprocess.py ___ Python tracker

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

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch attached. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file46199/test_tarfile.patch ___ Python tracker

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

2017-01-07 Thread Martin Panter
Martin Panter added the comment: The code in test.py is not realistic. It spawns children only to terminate them straight away, and you could easily reap each child after calling terminate(). You might have more influence with a realistic use case. Victor has committed a fix for the

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

2017-01-07 Thread Martin Panter
Martin Panter added the comment: The user can access pipes and close them directly, or keep their own reference. I don’t think detach() should touch pipes, and __exit__() should probably continue to close them. Maybe call the method detach_pid() if that makes it clearer that pipes are

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

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Why os.link() is failed? If hard links are not supported on Android, > shouldn't os.link be not implemented? Android has a restrictive security model based on SELinux [1]. With the Android adb shell on the emulator at API level 24: $ >foo $ ln foo bar ln:

[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString

2017-01-07 Thread Stefan Krah
Stefan Krah added the comment: For the record: This is all that happened in decimal if a) you pass a legacy string and b) force _PyUnicode_Ready() to throw a MemoryError: >>> from decimal import * >>> import _testcapi >>> context = Context() >>> traps = _testcapi.unicode_legacy_string('traps')

[issue21242] Generalize configure check for working Python executable

2017-01-07 Thread Martin Panter
Martin Panter added the comment: It is still not clear what change you were proposing. Perhaps factor out the common code for ADSLGEN and OPCODEHGEN? If so, that has been done as part of Issue 26662 in 3.5+. -- nosy: +martin.panter superseder: -> configure/Makefile doesn't check if

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

2017-01-07 Thread Berker Peksag
Berker Peksag added the comment: Are you planning to use test.support.os_link() to fix other tests in near future? If test_os is the only user of the helper, I'd say let's keep it in Lib/test/test_os.py for now. test.support is already big enough and it would be better not to put every

[issue29199] test_regrtest fails if PCBuild directory doesn't exist

2017-01-07 Thread ppperry
New submission from ppperry: == ERROR: test_pcbuild_rt (test.test_regrtest.ProgramsTestCase) -- Traceback (most recent call last): File "C:\Program Files

[issue29199] test_regrtest fails if PCBuild directory doesn't exist

2017-01-07 Thread ppperry
Changes by ppperry : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list

[issue29198] AsyncGenerator is missing from typing

2017-01-07 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : Added file: http://bugs.python.org/file46203/asyncgenerator2.patch ___ Python tracker ___

[issue29082] In 2.7.13, _ctypes.LoadLibrary no longer accepts Unicode objects

2017-01-07 Thread Martin Panter
Martin Panter added the comment: Other tests are skipped if libc_name is None, so your assertion is inconsistent. FTR there are reports open about problems with bootstrap files like asdl_c.py, e.g. Issue 28143 proposing to port that file to Python 3, and Issue 23404 about the future of “make

[issue29199] test_regrtest fails if PCBuild directory doesn't exist

2017-01-07 Thread ppperry
Changes by ppperry : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Jiajun Huang
New submission from Jiajun Huang: the class definition: class _HashedSeq(list): """ This class guarantees that hash() will be called no more than once per element. This is important because the lru_cache() will hash the key multiple times on a cache miss. """

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue15216] Support setting the encoding on a text stream after creation

2017-01-07 Thread INADA Naoki
INADA Naoki added the comment: Updated the patch for default branch. -- versions: +Python 3.7 -Python 3.6 Added file: http://bugs.python.org/file46204/set_encoding-7.patch ___ Python tracker

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, but I think you've missed the point of _HashedSeq. The hash() is called no more than once per instance, not once per instance creation. >>> from functools import _HashedSeq >>> from unittest.mock import Mock >>> test_tup = 1, 2, 3,

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

2017-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: Uploaded one last version of the patch implementing the previous PEP 538 design. This refactors the test cases so they systematically cover 4 cases that we expect to be reported as "the C locale": - LC_ALL, LC_CTYPE, and LANG all empty - one of them set to "C",

[issue28815] test_socket fails if /proc/modules is existent but not readable

2017-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a417e160b34 by Martin Panter in branch '3.5': Issue #28815: Use new exception subclasses https://hg.python.org/cpython/rev/5a417e160b34 New changeset 401e70317976 by Martin Panter in branch '3.6': Issue #28815: Merge test tweak from 3.5

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread Eryk Sun
Eryk Sun added the comment: Isn't the proposed workaround also relying on CPython reference counting to immediately deallocate the sliced view? It fails if I keep a reference to the sliced view: byteslike = bytearray(b'abc') with memoryview(byteslike) as m1: m2 = m1[1:]

[issue15216] Support setting the encoding on a text stream after creation

2017-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewing Inada-san's latest version of the patch, we seem to be in a somewhat hybrid state where: 1. The restriction to only being used with seekable() streams if there is currently unread data in the read buffer is in place 2. We don't actually call seek()

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread INADA Naoki
INADA Naoki added the comment: You're right! How difficult working with memoryview! > The memoryview constructor could take start, stop, and step keyword-only > arguments to avoid having to immediately slice a new view. Maybe, memoryview.to_bytes() is better place to add such options.

[issue29201] Python 3.6 not working within VS 2015

2017-01-07 Thread Edward Laier
New submission from Edward Laier: I installed Python 3.6 on my Microsoft server 2016 , running VS 2015 Community. I tried the path to Python Environment, then auto-detect, VS crashes and then when it restarts it will have the "+ Custom" grayed out. Where I then have to remove the key to

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: The complexity you're hitting here is the main reason I'm a fan of creating a dedicated library for dealing with these problems, rather than trying to handle them directly on the builtins. Given a bufferlib module, for example, you could have a higher level API

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2017-01-07 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52d3cbcf546f by Raymond Hettinger in branch 'default': Issue #29200: Add test for lru cache only calling __hash__ once https://hg.python.org/cpython/rev/52d3cbcf546f -- nosy: +python-dev ___ Python

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: To honor your report, I've added a test for this functionality. -- ___ Python tracker ___

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e7e91785306 by Raymond Hettinger in branch 'default': Issue #29200: Fix test to use self.assertEqual instead of py.test style tests https://hg.python.org/cpython/rev/2e7e91785306 -- ___ Python tracker

[issue29081] time.strptime() return wrong result

2017-01-07 Thread Jeff Knupp
Jeff Knupp added the comment: I believe this is working as intended. Remember, the '%w' directive instructs strptime to consider 0 to be Sunday, while tm_wday considers 0 Monday. In 2016, the %W directive means that the first week (week #1) starts on Monday, January 4th. If you go 52 weeks

[issue29195] Get rid of supporting outdated wrong keyword arguments in re methods

2017-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's too bad that "pattern" lost out to the less informative "string". +1 for finishing the work and applying this patch. -- nosy: +rhettinger ___ Python tracker

[issue28815] test_socket fails if /proc/modules is existent but not readable

2017-01-07 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue9182] document “--” as a way to distinguish option w/ narg='+' from positional argument in argparse

2017-01-07 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue29200] is it a bug in `functools._HashedSeq`

2017-01-07 Thread Jiajun Huang
Jiajun Huang added the comment: thanks for reply :) 2017年1月8日星期日,Roundup Robot 写道: > > Roundup Robot added the comment: > > New changeset 2e7e91785306 by Raymond Hettinger in branch 'default': > Issue #29200: Fix test to use self.assertEqual instead of py.test style >

[issue29201] Python 3.6 not working within VS 2015

2017-01-07 Thread Steve Dower
Steve Dower added the comment: This is a bug in Visual Studio, not Python. There is an RC release of the Python support with a fix for this bug is available at https://github.com/Microsoft/PTVS on the releases page, and an actual update will appear in notifications within a couple of weeks.

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

2017-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: While the attached PEP 538 patches include their own tests, the uploaded pep538-check-click.sh script is the one I've been using to check that the changes have the desired effect of letting click "just work", even when the nominal locale is cleared, explicitly

[issue29195] Get rid of supporting outdated wrong keyword arguments in re methods

2017-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Many re methods accepted the string parameter as a keyword argument by wrong name. This was fixed in issue20283. Wrong keyword names were still accepted, but a deprecation warning was emitted if use them. Proposed patch finishes the deprecation period

[issue29194] importlib reload fails for module supplied as argument to command line

2017-01-07 Thread R. David Murray
R. David Murray added the comment: I don't think reloading __main__ is something we have any desire to support, but there may be something in this error sequence worth thinking about anyway...the error message isn't very clear as to what went wrong, even with the traceback. What is your use

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

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue-29177-02.diff is a modified version of the previous patch that uses support.unlink() instead of os.remove() to handle the failure occuring for a non-existent file when the test is skipped because of Permission denied. With this patch test_logging is ok,

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

2017-01-07 Thread Xavier de Gaye
Changes by Xavier de Gaye : Added file: http://bugs.python.org/file46194/issue-29177-03.patch ___ Python tracker ___

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-07 Thread Aviv Palivoda
Aviv Palivoda added the comment: After looking more into the _pysqlite_set_result function fail in Ingo example I think this is the expected behavior. The PyUnicode_AsUTF8 fails but this is expected as the value is an invalid UTF-8. -- ___ Python

[issue29194] importlib reload fails for module supplied as argument to command line

2017-01-07 Thread Brett Cannon
Brett Cannon added the comment: The error actually makes sense when you think about the fact that the module is being passed in by filename. That means Python has no clue what values to put in for the spec because Python literally exec()'s the file contents and stuffs it into a new module

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In worst case ignoring an error can cause a mystical error later during executing an unrelated code or a crash in debug build. In both cases it is hard to find the location of the bug. -- nosy: +haypo ___ Python

[issue29185] test_distutils fails on Android API level 24

2017-01-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch attached. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file46195/test_distutils.patch ___ Python tracker

[issue29192] Remove deprecated features from http.cookies

2017-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some behavior of http.cookies was deprecated in 3.5. Following patch finishes the deprecation period and removes the code for handling deprecated features. Former warnings become errors. -- components: Library (Lib) files:

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread INADA Naoki
INADA Naoki added the comment: > I'm -1 if the intention is about easiness and efficiency. Do you +1 when adding it to stdlib (say "bufferlib")? > Creating a memoryview is not cheap enough in such a case. Actually speaking, it's 5 calls + 2 temporary memoriview. 1. creating memoryview. 2.

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Stefan Krah
Stefan Krah added the comment: To expand a little, you use the terminology "possible bugs". All I can see is a double exception if PyUnicode_Compare() returns -1. I think I did it on purpose because this function is speed sensitive and no user will change a valid rounding mode *constant* to a

[issue29191] liblzma is missing from pcbuild.sln

2017-01-07 Thread Steve Dower
Steve Dower added the comment: LGTM. Though as you say, it's probably easiest for one of us to go through each branch and use VS to get it right. I think both of those projects were added from other operating systems, so updating the sln wouldn't be so easy. I'll get to it at some point

[issue29167] Race condition in enum.py:_decompose()

2017-01-07 Thread Simon Percivall
Simon Percivall added the comment: Run this a couple of times (it fails for me the first time, but it's a race, so YMMV): ``` import enum from concurrent.futures import ThreadPoolExecutor class MyEnum(enum.IntFlag): one = 1 with ThreadPoolExecutor() as executor:

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-07 Thread Vinay Sajip
Vinay Sajip added the comment: I'm fine with removing the loop, as there are only ever going to be the two cases - so Berker's suggestion would seem to cover both doctest and unittest cases. -- ___ Python tracker

[issue29178] Adding bytes.frombuffer(byteslike) constructor

2017-01-07 Thread Xiang Zhang
Xiang Zhang added the comment: I'm -1 if the intention is about easiness and efficiency. I think a new API is usually added due to functional defect not performance defect. We get a way here though the performance seems not ideal, according to INADA's mail. I think we should first check if

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Stefan Krah
Stefan Krah added the comment: Also, if anyone changes the rounding-mode constants it is really their problem. -- ___ Python tracker ___

[issue14102] argparse: add ability to create a man page

2017-01-07 Thread Matt
Changes by Matt : -- nosy: +matthewjohn ___ Python tracker ___ ___

[issue27603] Migrate IDLE context menu items to shell extension

2017-01-07 Thread Shane Smith
Shane Smith added the comment: Would it be possible to allow the user to select whether they'd prefer a nested or flat context menu at install? I believe it went to nested as a result of issue23546. Unless there are a large number of installations (arbitrarily... perhaps 4 or more), the

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Stefan Krah
Stefan Krah added the comment: I'm generally a little concerned about the way "bugs" are presented here recently: In #28701 you write: 'Correctness. Since no caller checks the error of PyUnicode_CompareWithASCIIString(), it is incorrectly interpreted as "less then".' This is just not true.

[issue29196] Remove old-deprecated plistlib features

2017-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Seems many features of plistlib was deprecated from the start. The plistlib module was added in 2.6 and its code already contained deprecated features: * The _InternalDict class is a dict subclass with implemented __getattr__/__setattr__/__delattr__

[issue29197] Remove os.path.splitunc()

2017-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch removes os.path.splitunc(). It is Windows specific and has been deprecated in 3.1. It is superseded by splitdrive() in 3.x and in 2.7 since 2.7.8 (see issue21672). -- components: Library (Lib) files: remove_os_path_splitunc.patch

[issue29050] xml.etree.ElementTree in Python 3.6 is incompatible with defusedxml

2017-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29193] Remove support of format_string as keyword argument in string.Formatter().format()

2017-01-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Passing a format string as a keyword argument to string.Formatter.format() was deprecated in 3.5 (issue23671). Proposed patch finishes the deprecation period and converts a warning to an error. Python 3.5-3.6: >>>

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

2017-01-07 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker ___ ___ Python-bugs-list

[issue29194] importlib reload fails for module supplied as argument to command line

2017-01-07 Thread John Lehmann
New submission from John Lehmann: Modules that have been loaded as an argument to the command line cannot be reloaded using importlib.reload. For example with the attached file: $ python reloader.py Traceback (most recent call last): File "reloader.py", line 31, in

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

2017-01-07 Thread ita1024
ita1024 added the comment: > For this specific issue, the ResourceWarning is correct. I don't understand the use case of explicitly turning this warning off on this specific example? No, on this specific example the child processes do terminate properly as the parent process terminate. There

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Stefan Krah
Stefan Krah added the comment: Quite honestly I prefer to do nothing. What is the worst that can happen? A SystemError? Not-ready unicode strings are an application bug. -- ___ Python tracker

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An alternative patch checks the result of PyUnicode_Compare() (as Xiang suggested) instead of checking the value before calling PyUnicode_Compare(). Stephan, what way do you prefer? -- nosy: +facundobatista, mark.dickinson, rhettinger, skrah Added

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

2017-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: I just pushed an update to PEP 538 based on PEP 540 and the feedback in the linux-sig discussion: https://github.com/python/peps/commit/221099d8765125bbd798e869846b005bcca84b47 I'll be starting a thread for that on python-ideas shortly, but in the context of

[issue29118] Randit

2017-01-07 Thread Spacemage 33
Spacemage 33 added the comment: Thank you very much. Now it works fine! 2016-12-31 5:42 GMT+01:00 Terry J. Reedy : > > Terry J. Reedy added the comment: > > This issue has nothing to do with IDLE. There is also no bug here. > Python's random module has a randint

[issue29191] liblzma is missing from pcbuild.sln

2017-01-07 Thread Segev Finer
New submission from Segev Finer: liblzma is missing from pcbuild.sln. This causes the build of _lzma to fail when building the solution and not using build.bat. Attached is a patch that fixes this for the default branch. Note that it also includes some missing project configurations for the

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

2017-01-07 Thread Eryk Sun
Eryk Sun 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. Popen doesn't implement the undocumented CRT protocol that's used to smuggle the file-descriptor mapping in the STARTUPINFO

[issue29190] Avoid possible errors in comparing strings

2017-01-07 Thread Xiang Zhang
Xiang Zhang added the comment: Paste my point here: I prefer checking the result PyUnicode_Compare to see it's a success or failure. getrandom doesn't use any lower level unicode operations so it doesn't get a responsibility to ready the unicode. -- nosy: +xiang.zhang

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

2017-01-07 Thread Segev Finer
Segev Finer added the comment: I removed previous_handle_list in _execute_child since I noticed subprocess already clobbers the other attributes in startupinfo anyhow. I figured there will be some discussion about how to pass the handle list, so here's my two cents: * subprocess already