[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 headers like 
"Sec-WebSocket-Key1".
3. Even if handshake succeed, you can't send `\xff`*10 directly.  You should 
wrap it with "frame", specified in RFC.

I can't understand what "Close/Crash" means.
But I propose you to use websocket libraries, or read protocol specification 
carefully.
WebSocket is not "raw TCP socket after handshake", it's framed protocol on top 
of TCP (or other stream protocol).

--
nosy: +inada.naoki
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 exactly when it will happen without knowing the state of the 
other end, OS implementation, buffering, etc. It does not seem appropriate to 
change the _copy() loop around unless there is an real bug.

Regarding the buildbots, if I get this patch into a state that I am comfortable 
committing, the buildbots will are generally set to timeout in 15 or 20 
minutes. See the “make buildbottest” commands in Makefile.pre.in, test.regrtest 
--timeout option, etc. You can also see which platforms have buildbots, and the 
state of them etc: .

I left a bunch of comments in the code review. There is a lot of useful code in 
there, but also a lot of stuff that is hard to follow or that I want to clean 
up.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
>>> os.system('fsutil reparsepoint query link')
Reparse Tag Value : 0xa00c
Tag value: Microsoft
Tag value: Name Surrogate
Tag value: Symbolic Link

Reparse Data Length: 0x0020
Reparse Data:
:  06 00 0e 00 00 00 06 00  00 00 00 00 43 00 3a 00  C.:.
0010:  5c 00 5c 00 3f 00 3f 00  5c 00 43 00 3a 00 5c 00  \.\.?.?.\.C.:.\.

As you can see above, CreateSymbolicLink stores the "PrintName" DOS path (e.g. 
"C:\") first, with an offset of 0, followed by the "SubstituteName" NT path 
(e.g. "\??\C:\").

The "All Users" link, on the other hand, seems to have been created manually 
with an inverted order. I have ctypes code to manually create a similar link 
(calling OpenProcessToken/AdjustTokenPrivileges to enable the required 
privilege and CreateFile/DeviceIoControl to set the reparse point), but I doubt 
it's worth adding it just to test this bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: cp-1252 -*-

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 create a link)

--
nosy: +berker.peksag
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 second lines of the source code has 
to follow a certain regular expression. This is all described in PEP 263, but 
we don't have to repeat all of those here. IMO we can just refer the reader to 
the PEP.

I've prepared a patch that addresses this. Please review, and let me know if 
you have additional feedback.

Thanks :)

--
Added file: http://bugs.python.org/file46452/issue29381.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 then I use the same pattern with another string:
print(re.match(pattern, 'abc.fds'))

result is: 
None

I tried to reformulate the pattern to the same, for example:
pattern = re.compile(r"""
(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|\d)+$ # ends with 
letter or number only""", re.VERBOSE | re.IGNORECASE)

or to:
pattern = re.compile(r"""[a-z\d]+$ # ends with letter or number 
only""", re.VERBOSE | re.IGNORECASE)

or to:

pattern = = re.compile(r"""([a-z]|\d)+$ # ends with letter or 
number only""", re.VERBOSE | re.IGNORECASE)

but the result is all the time the same - None
And еhat is the double strange for the last three pattern - None is result also 
for 
print(re.match(pattern, 'abc'))

I checked this patterns on the site regex101.com
and all of them should work good and right
It's achtung!

--
components: Regular Expressions
messages: 286464
nosy: MaxR, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: regex mismatch in the simple cases
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the doctest is broken (i.e. no need to care about 
compatibility with older Python versions for docs meant for master).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
versions: +Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file46451/rm-finite.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

/media/disk/home/proj/python/cpython/Doc/faq/windows.rst:303: WARNING: unknown 
option: -t

Also, the reference to the tabnanny script is wrong. It exists as a module 
(Lib/tabnanny.py), not in Tools/scripts/. This aspect also applies to 2.7.

--
assignee: docs@python
components: Documentation, Windows
files: tabnanny.patch
keywords: patch
messages: 286460
nosy: docs@python, martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Tabs vs spaces FAQ out of date
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46450/tabnanny.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 configparser doc from 3.5
https://hg.python.org/cpython/rev/e06de6f9cfe5

New changeset 6db0a62b6aa6 by Martin Panter in branch 'default':
Issues #11670: Merge configparser doc from 3.6
https://hg.python.org/cpython/rev/6db0a62b6aa6

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Py 2.6+ compatibility from 3.5
https://hg.python.org/cpython/rev/1708afd284ff

New changeset e50058ecd808 by Martin Panter in branch 'default':
Issues #29349: Merge Py 2.6+ compatibility from 3.6
https://hg.python.org/cpython/rev/e50058ecd808

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--
nosy: +berker.peksag
type: enhancement -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 present but unused.

The DMG build-installer script itself runs under 2.5.1, because it specifies 
"python2.5" in its command to the slave.  I believe that was originally added 
once the system 2.3 couldn't be used.

During the DMG construction process, a particular step might, I suppose use 
2.5.1 or 2.7.12 depending on whether it's internal to the build script, 
something using the same executable as the script, a subprocess with limited 
path, or an independent utility (like sphinx) referencing 2.7.

I believe Ned's comment in issue 17861 about 2.6+ is a reference to the sphinx 
step, which is covered by the fact that sphinx is using the newer 2.7.12.

What appears to break in this specific case is some of the preparation - 
specifically the Makefile referencing patchlevel is running "python".  That 
should work (2.7.12) if it inherits the overall build slave environment (which 
has /usr/local/bin first) but I think the install script filters that, so it's 
probably getting the /usr/bin/python 2.5.1 version.

I've just changed the default /usr/bin/python to be 2.7 so external processes 
run by build-installer should get 2.7.  I don't think that will break anything 
else currently done on the machine, but I'll deal with any fallout if needed.  
I'm rerunning build 59 now.

As in issue 28039 there's no immediate need to change the installer script 
itself, but since it's clearly the last hold out, I'll find some time to test 
that I've got any pre-requisites for it set up at which point the build master 
could be changed to remove the python2.5 reference.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 doesn't say anything about directly 
passing a complex as argument or return value to a function call.  Platforms 
use custom ways to do that.  The text you quote says a complex is an array of 
two real numbers; but passing an array as argument to a function works by 
passing a pointer to the first element.  Typically, this is not how complexes 
are passed: instead, some pointerless form of "passing two real numbers" is 
used.

--
nosy: +arigo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

If we can rely on 2.6+, we just need to add “from __future__ import 
print_function”. Otherwise, we may need something like

if sys.stderr is not None:
sys.stderr.write(...)

and also do something about that “with” statement.

--
nosy: +db3l

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, this couldn't help in the case of msg286441.

The less harmful way is making math.isfinite() and like supporting non-float 
numeric types. Always return False for integer types and fall back to the 
is_finite() method. But even this can be too expensive.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.  The existing PyArg_ParseXXX() calls and their 
"kwlist" static variable are very easy to work with, easy to modify, and easy 
to teach (I cover them effortlessly in the Python classes I teach).  In 
contrast, AC is much harder to learn, harder to get right, doesn't fit some 
existing APIs, harder to change, and it greatly expands the number of lines of 
code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is in it and it is becoming much harder to 
teach as it gets bigger.

Also, we should place very little value on anecdotal evidence from one core 
developer who says he once wrote a single line of code that would have 
benefitted from a single part of the proposed changes.  In general, core devs 
tend to write much more generic code than end users, so our needs are often 
atypical and do not reflect user needs (in this case, no non-core-dev numeric 
user has ever requested this behavior or had a real use case that couldn't be 
met by the existing APIs).  The bar for new APIs is much higher than "I wrote a 
line of code once".  

We should be looking for APIs additions that significantly reduce complexity or 
solve problems that can't easily be met with existing APIs.  Minor expansions 
create long term maintenance burdens, increase the size of docs making them 
less usable, cause other implementations to have to follow suit, cause 
subclassers and users of the numeric module to have to implement additional 
methods, and make Python more difficult to learn.  There is a reason that the 
zen expresses a preference for only one way to do it.

Replicating parts the decimal API should always be suspect as well.  In 
general, that module is much more difficult to use and learn than regular 
floats.  Many parts of the API are simply worthless and are there only because 
they were part of the spec.  We have no evidence that any of these proposed 
methods are actually being used and are of real benefit to real users.

Also, remember that Decimal is not registered as a Real for a reason.  Guido 
does not consider them to be interoperable with binary floats.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

--
nosy: +ned.deily
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10399] AST Optimization: inlining of function calls

2017-01-29 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 packages.  It might be that we need 
something simpler than what exists, but whatever we do should be informed by 
what exists, I think.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10399] AST Optimization: inlining of function calls

2017-01-29 Thread irdb

Changes by irdb :


--
nosy: +irdb

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 enable duck-typing between float and Decimal. Instead of:

if isinstance(x, float):
math.isfinite(x)
else:
x.is_finite()

we can just say

x.is_finite() 

on both floats and decimals.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 bugs, etc, for little gain.

Anyway, thanks for the patch!

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 recommendation from 3.5
https://hg.python.org/cpython/rev/9702c5f08df1

New changeset 9dbb7bbc1449 by Martin Panter in branch 'default':
Issues #12067: Merge hash recommendation from 3.6
https://hg.python.org/cpython/rev/9dbb7bbc1449

New changeset 8a9904c5cb1d by Martin Panter in branch '2.7':
Issue #12067: Rewrite Comparisons section in the language reference
https://hg.python.org/cpython/rev/8a9904c5cb1d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 3.5
https://hg.python.org/cpython/rev/cdcb33f37bf3

New changeset db8b917bbfdd by Martin Panter in branch 'default':
Issues #29349: Merge Py 2 fix 3.6
https://hg.python.org/cpython/rev/db8b917bbfdd

New changeset ca7d2af9920e by Martin Panter in branch 'default':
Issues #29349: Add NEWS for 3.7; use “with” statement
https://hg.python.org/cpython/rev/ca7d2af9920e

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 things left like the str() 
constructor, str.format(*args, **kwargs) (see Issue 20291), and the shared code 
in Objects/stringlib/find.h and Objects/stringlib/transmogrify.h. I don’t know 
what to do about those.

--
nosy: +martin.panter
stage: commit review -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 are rejected, the dead code should be removed to avoid wasting 
people’s time.

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.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com