[issue15373] copy.copy() does not properly copy os.environment

2017-01-29 Thread INADA Naoki
INADA Naoki added the comment: patch looks OK. But I prefer `__deepcopy__ = __copy__ = copy`. I don't know how to support pickling. (should unpickled object reference os.environ, or copied dict?) I feel it is different issue. -- nosy: +inada.naoki

[issue29385] Sockets Crashes or Memory Corruption

2017-01-29 Thread INADA Naoki
INADA Naoki added the comment: I can't reproduce it because of some reason. 1. While you report it affects Python 3.3~3.7, the script doesn't work on Python 3.7 2. I've fixed webserver.py to work on Python 3, but it uses very old (draft) websocket protocol. Current browser doesn't send

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

2017-01-29 Thread Martin Panter
Martin Panter added the comment: Can you explain your broken pipe situation? Are you talking about a real-world EPIPE operating on a pseudoterminal, or just a result of using a Unix socket to emulate a PTY in the tests? Usually a broken pipe is an asynchronous condition. You cannot predict

[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback, Raymond. I adjusted my patch. -- Added file: http://bugs.python.org/file46453/issue29381v2.patch ___ Python tracker

[issue29248] os.readlink fails on Windows

2017-01-29 Thread Eryk Sun
Eryk Sun added the comment: os.symlink calls CreateSymbolicLink, which creates the reparse data buffer with the print name stored first, so the offset is always 0. Otherwise we would have noticed this problem already. For example: >>> os.symlink('C:\\', 'link', True) >>>

[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Suggestions: * Please add a cross-link to from '''UNIX “shebang” line"''' to 16.1.2. Executable Python Scripts. * Instead of a link to a PEP (which is outside the main documentation), let's just add an example: # /usr/bin/env python3 # -*- coding:

[issue29388] regex mismatch in the simple cases

2017-01-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: re.match only matches at the start of the string. If you use re.search instead, you will get the results you are expecting. -- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed

[issue29248] os.readlink fails on Windows

2017-01-29 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. I think it would be better to use the existing framework in Win32SymlinkTests to create a test file instead of using a hardcoded path like 'C:\Users\All Users' (e.g. use Win32SymlinkTests.filelink and Win32SymlinkTests.filelink_target to

[issue29381] Tutorial documentation contains undefined reference to #!

2017-01-29 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: There are certain rules about the encoding declaration line. It has to be the first line of the source code, or in the case that the file starts with a unix "shebang" line, then the encoding declaration has to be on the second line. In fact, the first or the

[issue29388] regex mismatch in the simple cases

2017-01-29 Thread MaxR
New submission from MaxR: When I compile and match, for example: pattern = re.compile(r"""([a-z]|\d)+$ # ends with letter or number only""", re.VERBOSE | re.IGNORECASE) print(re.match(pattern, 'abc')) result is correct: <_sre.SRE_Match object; span=(0, 3), match='abc'> but

[issue27200] make doctest in CPython has failures

2017-01-29 Thread Brett Cannon
Brett Cannon added the comment: I'm -1 on building the docs from Sphinx master as I don't want to complicate our development process to deal with potential broken tooling. Basically if the doctests don't pass on a compiled checkout for the version of Python the docs are being built for then

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Martin Panter
Martin Panter added the comment: While I don’t have much opinion either way, here is a patch to remove the existing dead code should that be the eventual outcome. If the default implementations in the base class deferred to math.isfinite() etc, that may help with compatibility. --

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Martin Panter
Martin Panter added the comment: I pushed the simpler 2.6-compatible option. Keeping this open to check the buildbot is happy overnight. -- stage: needs patch -> resolved ___ Python tracker

[issue29387] Tabs vs spaces FAQ out of date

2017-01-29 Thread Martin Panter
New submission from Martin Panter: The Windows FAQ mentions the “python -t” command-line option, but in Python 3 this option is undocumented (and I understand has no

[issue28822] Fix indices handling in PyUnicode_FindChar

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b5e5a3a805e by Martin Panter in branch 'default': Issue #28822: Add susp-ignored entry for NEWS; fix grammar https://hg.python.org/cpython/rev/2b5e5a3a805e -- ___ Python tracker

[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset e70882558a96 by Martin Panter in branch '3.5': Issue #11670: readfp(fp) parameter name is different to read_file(f) https://hg.python.org/cpython/rev/e70882558a96 New changeset e06de6f9cfe5 by Martin Panter in branch '3.6': Issues #11670: Merge

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9880928ec962 by Martin Panter in branch '3.5': Issue #29349: Use __future__ print_function; Sphinx may use Python 2.6+ https://hg.python.org/cpython/rev/9880928ec962 New changeset 1708afd284ff by Martin Panter in branch '3.6': Issues #29349: Merge

[issue29283] duplicate README in site-packages

2017-01-29 Thread Berker Peksag
Berker Peksag added the comment: Good catch and thanks for the report! Renaming was done in issue 24633. It looks like it was added back in a merge commit: https://github.com/python/cpython/commit/ebe304e919b56d889313a2d15fb5c52189a32ef7 I will delete Lib/site-packages/README shortly.

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread David Bolen
David Bolen added the comment: Whoops, I just realized that the patch still needs adjusting to be 2.x compatible, so obviously the extra build still won't work. But at this point it should be safe to assume 2.6+ such as for the rest of the sphinx processing. --

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread David Bolen
David Bolen added the comment: 2.7.12 (/usr/local/bin) is used for the build slave and main external commands (such as hg and sphinx) and is in the buildslave path, but 2.5.1 is still the default in /usr/bin so can get used for processes with a restricted environment. Tiger's original 2.3 is

[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2017-01-29 Thread Armin Rigo
Armin Rigo added the comment: * Tom: the issue is unrelated to cffi, but both ctypes and cffi could proceed to support C complexes, now that libffi support has been added. * Mark: the problem is that the text you quote from the C standard fixes the representation of a complex in memory, but

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Martin Panter
Martin Panter added the comment: According to , Ned says 2.6+ is already needed to build the Python 3.5 documentation, so maybe Sphinx uses that. -- ___ Python tracker

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Ned Deily
Ned Deily added the comment: Dunno for sure, perhaps David can answer that. But the Sphinx docs imply that Sphinx 1.4.6 requires at least 2.6 and I don't test the installer build with anything less than 2.7. -- ___ Python tracker

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Martin Panter
Martin Panter added the comment: Thanks Ned. Do you know what version of Python Sphinx uses (which runs patchlevel.py)? According to Issue 28039, David set up Python 2.7 so that “make touch” would work. But the log also uses a python2.5 command, and apparently Python 2.3 also installed on

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. This expands the API too much. Not just the float API, but the API of all numeric classes, including third-party classes. And since the existence of additional method in third-party classes (e.g. NumPy classes) can't be guarantied,

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: >> Ah you dislike the additional [clinic input] sections? > > Yes, they tear apart the code. I stopped reading many C files because > of this. I concur with Stefan. AC is very impactful on modules, greatly affecting their readability and maintainability.

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to caution against expansion of core APIs in cases where we already have a way to do it. In almost every corner, Python's APIs are growing, resulting in the language becoming massive, where very few people on the planet can claim to know what

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Mark Dickinson
Mark Dickinson added the comment: @Martin: the dead code should definitely be removed from floatobject.c and longobject.c. (Though that's kinda independent of this issue.) -- ___ Python tracker

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Ned Deily
Ned Deily added the comment: These changes have broken some buildbots, for example, the OS X dmg buildbots which are still using Python 2 for sphinx builds of the docs. They should be version agnostic as much as possible. http://buildbot.python.org/all/builders/bolen-dmg-3.x/builds/59

[issue10399] AST Optimization: inlining of function calls

2017-01-29 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2017-01-29 Thread R. David Murray
R. David Murray added the comment: I believe the last time this subject was discussed the conclusion was that we really needed a full IRI module that conformed to the relevant RFCs, and that putting something on pypi would be one way to get there. Someone should research the existing

[issue29384] Unused beos build scripts

2017-01-29 Thread Martin Panter
Martin Panter added the comment: Thanks Senthil -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue10399] AST Optimization: inlining of function calls

2017-01-29 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Martin Panter
Martin Panter added the comment: Of course, somehow I missed that -- ___ Python tracker ___ ___

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Jan 29, 2017 at 08:23:05AM +, Martin Panter wrote: > Why do you name the methods is_finite() etc with underscores, when the > existing methods math.isfinite() etc do not have underscores? Seems it > would add unnecessary confusion. The idea is to

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Martin Panter
Martin Panter added the comment: I think the general rule is to clean up code if you are doing something else in nearby code, but don’t go out of your way with unnecessary cleanups to arbitrary code. Otherwise it adds too much noise to the repository history, review process, risks adding

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

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8c9a86aa222e by Martin Panter in branch '3.5': Issue #12067: Recommend that hash and equality be consistent https://hg.python.org/cpython/rev/8c9a86aa222e New changeset 9702c5f08df1 by Martin Panter in branch '3.6': Issues #12067: Merge hash

[issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset ecdc864884a9 by Martin Panter in branch '3.5': Issue #29349: Fix Python 2 syntax in documentation build code https://hg.python.org/cpython/rev/ecdc864884a9 New changeset cdcb33f37bf3 by Martin Panter in branch '3.6': Issues #29349: Merge Py 2 fix

[issue29384] Unused beos build scripts

2017-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa9aef656fe0 by Martin Panter in branch 'default': Issue #29384: Remove Be OS scripts from Modules/, unused in 3.0+ https://hg.python.org/cpython/rev/aa9aef656fe0 -- nosy: +python-dev ___ Python tracker

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-01-29 Thread Martin Panter
Martin Panter added the comment: longobject_v5 looks good to me -- ___ Python tracker ___ ___

[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-01-29 Thread Martin Panter
Martin Panter added the comment: For str.format_map(mapping), yes the parsing happens in Objects/stringlib/unicode_format.h, but I don’t see that as a big problem. Moving this back to “needs patch”, assuming it is okay to convert format_map(). Other than from that, there are just tricky

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46449/clinic_longobject_v5.patch ___ Python tracker ___

[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2017-01-29 Thread Martin Panter
Martin Panter added the comment: FWIW, here is an attempt to add Argument Clinic to the Objects/floatobject.c and Objects/longobject.c implementations: https://bugs.python.org/file33943/issue20185_conglomerate_v4.diff https://bugs.python.org/file33989/clinic_longobject_v3.patch If the methods