[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-21 Thread Марк Коренберг
Марк Коренберг added the comment: So, I'm required to re-implement NamedTemporaryFile by hand like that: fd, name = tempfile.mkstemp(...) try: with io.open(fd, ...) as fff: fff.write('hello') fff.flush() os.fdatasync(fff)

[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-21 Thread R. David Murray
R. David Murray added the comment: Perhaps by doing non-blocking reads between the writes[*]? I suppose it is possible, but it might complicate the code considerably. [*] or re-write it using asyncio, but that is definitely out of scope :) -- nosy: +r.david.murray

[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-21 Thread R. David Murray
R. David Murray added the comment: You'd have to do that anyway if we implemented a delete=False constructor argument, since you want it deleted if there are any errors, and that's not what a delete=False API would do. If it were me, I'd write it (untested) @contextlib.contextmanager

[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-21 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) -IO versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___

[issue25919] htp.client PUT method ignores error responses sent immediatly after headers

2015-12-21 Thread Wiktor Niesiobedzki
New submission from Wiktor Niesiobedzki: It looks like, when doing PUT together with a file-like object to send, http.client will try to send the whole file before analysing the response from the server. If you do the following: $ dd if=/dev/zero of=/tmp/300mb.zero bs=1M count=300 And then

[issue25827] Support ICC in configure

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7b5c2f99a99 by Zachary Ware in branch '2.7': Issue #25827: Add support for ICC to configure https://hg.python.org/cpython/rev/d7b5c2f99a99 New changeset c5e419464585 by Zachary Ware in branch '3.5': Issue #25827: Add support for ICC to configure

[issue25914] Fix OrderedDict.__sizeof__

2015-12-21 Thread Eric Snow
Eric Snow added the comment: LGTM Thanks for doing that. It's definitely cleaner. :) -- stage: patch review -> commit review ___ Python tracker ___

[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-21 Thread R. David Murray
R. David Murray added the comment: Oh, you are right of course. I thought I was looking at _mkstemp_inner but in fact my edit window was over NamedTemporaryFile...I just wasn't paying attention. I have no opinion myself as to whether it is worth the effort/code complexity to implement this

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2015-12-21 Thread A. Jesse Jiryu Davis
New submission from A. Jesse Jiryu Davis: On some platforms there's an exclusive lock in socketmodule, used for getaddrinfo, gethostbyname, gethostbyaddr. A thread can hold this lock while another forks, leaving it locked forever in the child process. Calls to these functions in the child

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2015-12-21 Thread Ionel Cristian Mărieș
Changes by Ionel Cristian Mărieș : -- nosy: +ionelmc ___ Python tracker ___ ___

[issue21579] Python 3.4: tempfile.close attribute does not work

2015-12-21 Thread Eryk Sun
Eryk Sun added the comment: > To extend support for this to Windows, we can add a > feature to mkstmp to not use O_TEMPORARY O_TEMPORARY is only used for NamedTemporaryFile, not mkstemp. Regarding NamedTemporaryFile, that can be worked around to keep Windows from deleting the file. Just

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2015-12-21 Thread STINNER Victor
STINNER Victor added the comment: Python 3.5.0 and 3.5.1 are out. I don't think that it's worth to add back bytes support is os.walk() in 3.5.2. I would prefer to do the opposite and really drop bytes support for all filenames in the whole stdlib in 3.6. It's really a bad idea to use bytes on

[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py

2015-12-21 Thread Éric Araujo
Éric Araujo added the comment: I’m not active in python-dev anymore. The fix was noted in a previous comment: build.sub_commands in distutils.command.build should list "build_ext" before "build_py". lib2to3.fixes.fix_import will write global instead of local import statements else.

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2015-12-21 Thread Yury Selivanov
Yury Selivanov added the comment: Maybe instead of releasing the lock in the forked child process, we should try to acquire the lock in the os.fork() implementation, and then release it? Otherwise, suppose that a call to getaddrinfo (call #1) takes a long amount of time. In the middle of it

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-21 Thread Alessandro Cucci
Alessandro Cucci added the comment: Uploaded a new patch after SilentGhost review comments. As he told me, I've left out milliseconds and nanoseconds, but refactored both python and c code so we could easily add support for them when they will be available. -- Added file:

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2015-12-21 Thread Yury Selivanov
Changes by Yury Selivanov : -- components: +Interpreter Core nosy: +haypo, yselivanov stage: -> needs patch type: -> behavior versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue25920] PyOS_AfterFork should reset socketmodule's lock

2015-12-21 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Steve Dower
Steve Dower added the comment: As an occasional Linux user, I notice a huge difference between pure Python and extension packages there, but basically always have a compiler handy on my Windows machines. It's all about context and what you're used to :) The advice has always been "Visual

[issue25873] Faster ElementTree iterating

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a5d5268afd5 by Serhiy Storchaka in branch 'default': Issue #25873: Optimized iterating ElementTree. https://hg.python.org/cpython/rev/5a5d5268afd5 -- nosy: +python-dev ___ Python tracker

[issue25902] Fixed various refcount issues in ElementTree iteration

2015-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin. Actually this patch is for 3.5 only. In 3.6 the code will be rewrote (issue25873). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___

[issue25148] Windows registry PythonCore key changed inconsistent with other releases

2015-12-21 Thread Mark Hammond
Mark Hammond added the comment: It appears bdist_wininst wasn't updated for this so installed created by distutils don't work in 32bit versions - is there a different bug open for that? (Or I'm doing something wrong, but the installer fails and a quick scan of the source doesn't seem to

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Marc Schlaich
Marc Schlaich added the comment: I'm attaching those bad files. -- Added file: http://bugs.python.org/file41378/PatternGrammar2.7.11.final.0.pickle ___ Python tracker

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Marc Schlaich
Changes by Marc Schlaich : Added file: http://bugs.python.org/file41379/Grammar2.7.11.final.0.pickle ___ Python tracker ___

[issue25922] canceling a repair install breaks the ability to uninstall repair or re-install

2015-12-21 Thread Kyle S (MrStonedOne)
New submission from Kyle S (MrStonedOne): Title says all. It refuses to install from that point on, complaining that a reboot is needed. -- components: Installation, Windows messages: 256829 nosy: Kyle S (MrStonedOne), paul.moore, steve.dower, tim.golden, zach.ware priority: normal

[issue25922] canceling a repair install breaks the ability to uninstall, repair, or re-install

2015-12-21 Thread Kyle S (MrStonedOne)
Changes by Kyle S (MrStonedOne) : -- title: canceling a repair install breaks the ability to uninstall repair or re-install -> canceling a repair install breaks the ability to uninstall, repair, or re-install ___ Python tracker

[issue25827] Support ICC in configure

2015-12-21 Thread Zachary Ware
Zachary Ware added the comment: The buildbots appear to be happy with this, so I'm closing the issue. The intel-ubuntu-icc Non-Debug builders each had their first green build after this changeset. The OSX ICC builder still has some issues, but they seem to be OSX specific (see issue25589).

[issue25878] CPython on Windows builds with /W3, not /W4

2015-12-21 Thread Alexander Riccio
Alexander Riccio added the comment: > This should be about a 2 line change, but the current patch is several > hundred lines of spam. I agree, but wasn't immediately sure how to do so. Unfortunately, I've been working on other things, and I'm not sure when I'll be able to finish this.

[issue25921] project files for wininst-14.0*.exe don't exist

2015-12-21 Thread Mark Hammond
Mark Hammond added the comment: Awesome, thanks, sorry I missed that. -- ___ Python tracker ___ ___

[issue25878] CPython on Windows builds with /W3, not /W4

2015-12-21 Thread Zachary Ware
Zachary Ware added the comment: That's alright, it'll be here whenever you come back to it, unless somebody else takes it up :) By the way, my wording was poor in my previous message. My 'hundreds of lines of spam' remark was not meant to disparage your patch, but rather Visual Studio's

[issue25921] project files for wininst-14.0*.exe don't exist

2015-12-21 Thread Mark Hammond
New submission from Mark Hammond: Revision 34b35aa1967d pushed new versions of wininst-14.8*.exe, but didn't include the VS project files required to build it, thus meaning it can't reasonably be built from the source tree. -- components: Build messages: 256823 nosy: mhammond,

[issue25921] project files for wininst-14.0*.exe don't exist

2015-12-21 Thread Zachary Ware
Zachary Ware added the comment: The project file was moved to PC/bdist_wininst/bdist_wininst.vcxproj. See 55e5be11264e. It's still included in the build solution, but not in the project used for building from the command line. -- nosy: +zach.ware resolution: -> not a bug stage: ->

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Ralf Gommers
Ralf Gommers added the comment: > @Steve Great, so what needs to be done so that I as a package developer can > do `pip install windows-build-system`, `python setup.py bdist_wheel` and it > actually creates a wheel? (which AFAICT is the same problem). Hi Henry, I expect progress on the

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Henry Gomersall
Henry Gomersall added the comment: @carlkl right, but it's not really a seamless experience. I think my question is: What needs to still be done in order that a user with a fresh Python install in Windows (and no compiler installed) can do "pip install an_extension_that_needs_compiling" and

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Marc Schlaich
Marc Schlaich added the comment: The issue is in Grammar2.7.11.final.0.pickle or PatternGrammar2.7.11.final.0.pickle. I have copied these files to my manually built Python and getting the same issue in this case. -- ___ Python tracker

[issue25148] Windows registry PythonCore key changed inconsistent with other releases

2015-12-21 Thread Steve Dower
Steve Dower added the comment: That's a possibility. I won't have a chance to check for a few days, but it should get another bug if it's wrong. -- ___ Python tracker

[issue25902] Fixed various refcount issues in ElementTree iteration

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 00b6a13cfd70 by Serhiy Storchaka in branch '3.5': Issue #25902: Fixed various refcount issues in ElementTree iteration. https://hg.python.org/cpython/rev/00b6a13cfd70 New changeset e09cb2af3092 by Serhiy Storchaka in branch 'default': Issue #25902:

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2015-12-21 Thread Eryk Sun
Eryk Sun added the comment: The ANSI API is problematic because it returns a best-fit encoding to the system codepage. For example: >>> os.listdir('.') ['ƠƨưƸǀLjǐǘǠǨǰǸ'] >>> os.listdir(b'.') [b'O?u?|?iu?Kj?'] To somewhat work around this problem, listdir and scandir could

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Marc Schlaich
Marc Schlaich added the comment: After deleting them, they are getting recreated and everything works now. -- ___ Python tracker ___

[issue25869] Faster ElementTree deepcopying

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 090c3e3a648d by Serhiy Storchaka in branch 'default': Issue #25869: Optimized deepcopying ElementTree; it is now 20 times faster. https://hg.python.org/cpython/rev/090c3e3a648d -- nosy: +python-dev ___

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Marc Schlaich
New submission from Marc Schlaich: This simple test case results in a lib2to3 crash with an AssertionError in 2.7.11 source = ''' class Test(object): tests = [] ''' from lib2to3.refactor import RefactoringTool def main(): tool = RefactoringTool([])

[issue23670] Modifications to support iOS as a cross-compilation target

2015-12-21 Thread Nick Coghlan
Nick Coghlan added the comment: Mac OS X 10.5 was the last version to support PowerPC architectures, and according to https://en.wikipedia.org/wiki/Mac_OS_X_Leopard#Release_history, the final version of that was 10.5.8, released in August 2009. While we don't have a section in

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Steve Dower
Steve Dower added the comment: > What needs to still be done in order that a user with a fresh Python install > in Windows (and no compiler installed) can do "pip install > an_extension_that_needs_compiling" and it _just works_? The package developer takes the time to build a wheel on Windows

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2015-12-21 Thread Ben Hoyt
Ben Hoyt added the comment: Just to clarify what Victor and Zachary mentioned: bytes filenames have been deprecated only *on Windows* since Python 3.3; bytes filenames are still fine on POSIX. -- ___ Python tracker

[issue25848] Tkinter tests failed on Windows buildbots

2015-12-21 Thread Larry Hastings
Larry Hastings added the comment: I hear your plea. But isn't it almost as easy to just leave it alone? 3.4 won't get many checkins from now on, so it won't actually kick off many tasks. But it would mean the "check the buildbots" step of making a release would be super easy, rather than

[issue25914] Fix OrderedDict.__sizeof__

2015-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0a2ea08fcebe by Serhiy Storchaka in branch '3.5': Issue #25914: Fixed and simplified OrderedDict.__sizeof__. https://hg.python.org/cpython/rev/0a2ea08fcebe New changeset 624316fbb39d by Serhiy Storchaka in branch 'default': Issue #25914: Fixed and

[issue25914] Fix OrderedDict.__sizeof__

2015-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Henry Gomersall
Henry Gomersall added the comment: @Steve Great, so what needs to be done so that I as a package developer can do `pip install windows-build-system`, `python setup.py bdist_wheel` and it actually creates a wheel? (which AFAICT is the same problem). My interest is precisely as a package

[issue25869] Faster ElementTree deepcopying

2015-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25900] unittest ignores the first ctrl-c when it shouldn't

2015-12-21 Thread Michael Foord
Michael Foord added the comment: Suggested behaviour sounds good, patch looks sensible. Is it possible to add a test too? -- ___ Python tracker ___

[issue25873] Faster ElementTree iterating

2015-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-21 Thread Zachary Ware
Changes by Zachary Ware : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue25848] Tkinter tests failed on Windows buildbots

2015-12-21 Thread Zachary Ware
Zachary Ware added the comment: Larry: considering that 3.4 is now officially out of bugfix mode, how long do you want to keep the 3.4 buildbots around? From a selfish buildmaster configurator perspective, axing the 3.4 bots simplifies a few things :) --

[issue20440] Use Py_REPLACE/Py_XREPLACE macros

2015-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: According to the results of recent poll [1], Py_SETREF is the most popular candidate. It was also one of leaders in previous poll [2], and this is a name used in original Antoine's proposition [3]. [1]

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2015-12-21 Thread Zachary Ware
Zachary Ware added the comment: I like Serhiy's suggestion to use the old walk implementation on Windows if the argument is bytes, with a DeprecationWarning (like all other bytes operations in os on Windows). There was no warning that bytes paths would stop working with os.walk, so we should

[issue4709] Mingw-w64 and python on windows x64

2015-12-21 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +zach.ware ___ Python tracker ___ ___