[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-05-01 Thread Larry Hastings

Larry Hastings added the comment:

Why is this dependent on #26305?

--

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-01 Thread Larry Hastings

Larry Hastings added the comment:

I'm not excited by this new addition to PEP 7, so I'm excusing myself from this 
issue.

--

___
Python tracker 

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



[issue26902] Argument Clinic incorrectly works with custom converter and renamed parameter

2016-05-01 Thread Larry Hastings

Larry Hastings added the comment:

This is caused by your "meth_o inline" code, which isn't checked in yet.  A 
clean checkout of CPython trunk generates this correct code:

if (!PyArg_Parse(arg, "O&:test", PyUnicode_FSConverter, &path))

Maybe you don't need to use bugs.python.org as your personal bug tracker; maybe 
you don't need to add me to your private bugs.

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



[issue23903] Generate PC/python3.def by scraping headers

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also closely related issue26900.

--

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For back compatibility reasons, I rejected a 'simple renaming', much as I would 
like to do it for reasons already given, and closed *this* issue in msg250451.  
As I said then here and elsewhere, I instead propose to add new files with new 
names.  As I said above, I will propose a specific, revised plan in a new issue 
that I will open after some sleep. Please wait for that to discuss anything 
other than specific new names.

--

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-05-01 Thread Steve Dower

Steve Dower added the comment:

As I recall, the tool is ready to go. The problem is the argument over what to 
do with all the APIs that currently are incorrect. Zach had a list at PyCon 
last year, and the consensus seemed to be that "someone" should figure out 
whether each API should be stable or not. Since Zach understandably doesn't 
want to be that someone, there's really no way to reliably tool this process 
when there are a number of existing violations.

(FWIW, I believe we should just add them to the stable list, as that's the only 
way to guarantee source compatibility. They've already shipped in 3.5 and 
people can use them on non-Windows OSs.)

--

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't think that simple renaming will give us any benefits, but if that will 
be made, please don't forgot to use the "hg mv" command for this for keeping 
the history. And please rename 2.7 files too, otherwise the backporting changes 
will be turned in hell.

--
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Uploading slightly revised version.

--
Added file: http://bugs.python.org/file42678/@newnames.txt

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: http://bugs.python.org/file42677/@newnames.txt

___
Python tracker 

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



[issue26904] Difflib quick_ratio() could use Counter()

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you provide a script or a data used by you for benchmarking, so we can 
repeat this?

--
nosy: +rhettinger, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue24225] Idlelib: changing file names

2016-05-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since I posted the message above, I have decided that there should be a new 
version of every currently used idlelib .py file and that all additions, with 
new names of course, should be done at once, but only to 3.5 and 3.6.  I will 
soon open a new issue to explain why and post the number here.

To prepare the patch for the new issue, I will try to use file 
idle_updating_imports.patch after replacing some of the new names with ones I 
prefer.  The attached @newnames.txt is the list from msg243572 with the 
addition of the new names I currently favor.  Some notes:

1. idlever.py and ToolTip.py are not currently used, and will be deleted from 
the patch.

2. help.py is new in 3.5.1 and currently only has the help viewer.  It starts 
by declaring itself subject to change.  I plan to move all other help menu code 
into this file and want to keep the name for the new file.  I plan to rename 
the current file 'helpviewer.py' and change the imports in EditorWindow.py and 
macosxSupport.py accordingly

3. Most of the changes I made were to delete underscores that Al inserted.  
They are not usually used in module names, even when they might be otherwise 
(example: tkinter.scrolledtext).

4. Other changes should make related files easier to find.

5. Some new names will disappear when files are combined.

Any further discussion here should be limited to the new names.

--
Added file: http://bugs.python.org/file42677/@newnames.txt

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This tool would be very useful, since new API often accidentally marked as 
stable API in header files. The script can play just deliberative role, warn if 
new unstable API is not wrapped with "#ifndef Py_LIMITED_API" or if stable API 
is not documented. May be we need separate list of public API in more regular 
format for comparison with header, documentation, python3.def, refcounts.dat, 
etc.

There is a code for parsing preprocessor instructions in Argument Clinic. May 
be it can be reused here.

--

___
Python tracker 

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



[issue26904] Difflib quick_ratio() could use Counter()

2016-05-01 Thread Michael Cuthbert

New submission from Michael Cuthbert:

The implementation used in difflib.SequenceMatcher().quick_ratio() counts how 
often each member of the sequence (character, list entry, etc.) appears in 
order to calculate its lower bound.

Counting how often an entry appears in an iterable has been sped up in cPython 
w/ the _count_elements() c function in _collections.

This patch uses the collections uses collections.Counter() as a way of getting 
this speedup (and any future speedups in cPython or other implementations); 
code is somewhat simplified also.

Performance:
There is a slight overhead to creating two collections.Counter() objects rather 
than simple dicts.  On two Mac systems (Python 3.5 on stock Macbook Air, and Py 
3.6a0 latest on recent Mac Pro) the new implementation passes the speed of the 
previous when the length of the iterable is around 60 items.  As the number of 
items increases, the performance gains increase significantly. By 400 items, 
the new implementation's speed is about 3x the old, and seems to approach 3.6x 
asymptotically.

Below 60 items, the older implementation is faster; reaching a max of 8x the 
speed of the new when comparing a string of one element against a string of one 
element.  (The degenerate case of comparing one or two empty iterables is 
checked for in this implementation and is thus faster than the old 
implementation). I believe that users using quick_ratio() are more likely to be 
looking for speed improvements on larger 

Like the previous implementation, the count of the items in seq2 (self.b) is 
cached; if run again, it is about 41% faster (compared to 47% faster before).

This is my first patch submission, so any suggestions would be appreciated.

--
components: Library (Lib)
files: difflib_quick_ratio.patch
keywords: patch
messages: 264618
nosy: Michael Cuthbert
priority: normal
severity: normal
status: open
title: Difflib quick_ratio() could use Counter()
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file42676/difflib_quick_ratio.patch

___
Python tracker 

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



[issue26894] Readline not aborting line edition on sigint

2016-05-01 Thread Martin Panter

Martin Panter added the comment:

What happens instead of aborting the line at step 3? Is Ctrl+C completely 
ignored, as if you didn’t press it?

Perhaps matplotlib is interfering with Python’s SIGINT handler and/or 
PyOS_InputHook().

Can you eliminate ipython from the equation? I.e. does the problem happen with 
the built-in Python interactive interpreter? Or with a simple script like the 
following:

import readline
import matplotlib  # Or whatever is needed to trigger it
while True:
input("PROMPT ")

--
nosy: +martin.panter

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2016-05-01 Thread Larry Hastings

Larry Hastings added the comment:

I will admit that even during development I rarely used Clinic's test suite.  
My test suite is: make a change, then run Clinic over all of CPython and do a 
diff.  If nothing changed then Clinic is still working.

--

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2016-05-01 Thread Zachary Ware

Zachary Ware added the comment:

The clinic tests should probably be integrated into the regrtest suite, since 
clinic is integrated into the build process.

--
nosy: +zach.ware

___
Python tracker 

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



[issue23903] Generate PC/python3.def by scraping headers

2016-05-01 Thread Zachary Ware

Zachary Ware added the comment:

Unassigning since I haven't made it anywhere with this in a year; if anybody 
else would like to pick it up, feel free.  Otherwise I'll get to it some day :)

--
assignee: zach.ware -> 
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue26900] Exclude the private API from the stable API

2016-05-01 Thread Zachary Ware

Zachary Ware added the comment:

#23903 is closely related, but I haven't made it back to that one in some time.

--
nosy: +zach.ware

___
Python tracker 

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



[issue26873] xmlrpclib raises when trying to convert an int to string when unicode is available

2016-05-01 Thread Nathan Williams

Nathan Williams added the comment:

Serhiy, that workaround worked for my needs, thanks.

--

___
Python tracker 

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



[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-05-01 Thread Anthony Sottile

Anthony Sottile added the comment:

Seems I've named the patchfile incorrectly -- Hopefully this is correct this 
time?

--
keywords: +patch
nosy: +Anthony Sottile
Added file: http://bugs.python.org/file42675/2.patch

___
Python tracker 

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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-01 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I dislike the dis change. Please keep the current behaviour and open an
issue to enhance the dis module.

--

___
Python tracker 

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



[issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server

2016-05-01 Thread ppperry

ppperry added the comment:

You're working with non-documented internal components of the python standard 
library with names that start with an underscore. I think that this is not a 
bug in python, but instead a consequence of mucking with internals that weren't 
designed to be mucked with.

--
nosy: +ppperry

___
Python tracker 

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



[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2016-05-01 Thread Diogo Pereira

New submission from Diogo Pereira:

I'm using Python 3.5.1 x86-64 on Windows Server 2008 R2. Trying to run the 
ProcessPoolExecutor example [1] generates this exception:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\threading.py", line 914, in 
_bootstrap_inner
self.run()
  File "C:\Program Files\Python35\lib\threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python35\lib\concurrent\futures\process.py", line 270, 
in _queue_management_worker
ready = wait([reader] + sentinels)
  File "C:\Program Files\Python35\lib\multiprocessing\connection.py", line 859, 
in wait
ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
  File "C:\Program Files\Python35\lib\multiprocessing\connection.py", line 791, 
in _exhaustive_wait
res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 64


The problem seems to be related to the value of the Windows constant 
MAXIMUM_WAIT_OBJECTS (see [2]), which is 64. This machine has 64 logical cores, 
so ProcessPoolExecutor defaults to 64 workers.

Lowering max_workers to 63 or 62 still results in the same exception, but 
max_workers=61 works fine.


[1] 
https://docs.python.org/3.5/library/concurrent.futures.html#processpoolexecutor-example
[2] https://hg.python.org/cpython/file/80d1faa9735d/Modules/_winapi.c#l1339

--
components: Windows
messages: 264608
nosy: diogocp, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ProcessPoolExecutor(max_workers=64) crashes on Windows
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



[issue26874] Docstring error in divmod function

2016-05-01 Thread Zachary Ware

Zachary Ware added the comment:

Forgot that step, thanks Serhiy!

--

___
Python tracker 

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



[issue26902] Argument Clinic incorrectly works with custom converter and renamed parameter

2016-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: Argument Clinic incorrectly work with custom converter and renamed 
parameter -> Argument Clinic incorrectly works with custom converter and 
renamed parameter

___
Python tracker 

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



[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Argument Clinic incorrectly work with custom converter and 
renamed parameter, Make Argument Clinic to generate PEP 7 conforming code

___
Python tracker 

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



[issue26902] Argument Clinic incorrectly work with custom converter and renamed parameter

2016-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file42674/issue26902_sample.c

___
Python tracker 

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



[issue26902] Argument Clinic incorrectly work with custom converter and renamed parameter

2016-05-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Argument Clinic uses original name of Python parameter in generated code for 
custom (format code "O&") converter even if the parameter was renamed.

Example:

/*[clinic input]
test
filename as path: object(converter="PyUnicode_FSConverter")
/
[clinic start generated code]*/

Generated code:

static PyObject *
test(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *path;

if (!PyUnicode_FSConverter(arg, &filename))
goto exit;
return_value = test_impl(module, path);

exit:
return return_value;
}

--
components: Argument Clinic
messages: 264606
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic incorrectly work with custom converter and renamed 
parameter
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue26858] setting SO_REUSEPORT fails on android

2016-05-01 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

> Where is the patch that adds android_ver()?

http://bugs.python.org/issue26855

Xavier de Gaye's implementation is buggy while works for most cases.

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-01 Thread Demur Rumed

Demur Rumed added the comment:

I should mention a change in dis which hasn't come up for the sake of explicit 
discussion: I modified dis to not print EXTENDED_ARG. Instead one can tell by 
the byte indices having a hole (since they uniformly count up by 2 otherwise) & 
the argument value being greater than 255

--

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The problem was that I didn't know wherever all braces repeated correct times. 
Actually they were not used correctly in NoneType_return_converter, but since 
this converter is not used in current sources, this error left unnoticed.

New patch escapes generated strings that can contain braces before substituting 
them in the template for format(). This allows to decrease the braces 
repetition number to minimal value. Now there is no need to quadruple them.

--
Added file: http://bugs.python.org/file42673/clinic_pep7_braces2.patch

___
Python tracker 

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



[issue26858] setting SO_REUSEPORT fails on android

2016-05-01 Thread Guido van Rossum

Guido van Rossum added the comment:

Where is the patch that adds android_ver()? At the very least that should be 
listed as a dependency here.

I don't very much like to have changes to asyncio that can only work in Python 
3.6; there's still an upstream version (https://github.com/python/asyncio) that 
is used to do PyPI releases of asyncio for Python 3.3. I try to keep that in 
sync with the stdlib on all platforms, otherwise figuring out whether any 
changes need to be packported is a nightmare.

You might also update the comment somewhere that currently states that 
reuse_port is not supported on Windows.

PS. It amuses me that each platform apparently has a different way to check 
(there are three different types of platform checks in the lines you change).

--

___
Python tracker 

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



[issue26874] Docstring error in divmod function

2016-05-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84ff79cce41e by Serhiy Storchaka in branch '3.5':
Regenerate Argument Clinic code for issue #26874.
https://hg.python.org/cpython/rev/84ff79cce41e

New changeset 98678738b7e9 by Serhiy Storchaka in branch 'default':
Regenerate Argument Clinic code for issue #26874.
https://hg.python.org/cpython/rev/98678738b7e9

--

___
Python tracker 

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



[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-05-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b6581bae5a1 by Ethan Furman in branch '3.5':
issue26893: use mro() to examine class heirarchy
https://hg.python.org/cpython/rev/1b6581bae5a1

New changeset 7188de6b50ab by Ethan Furman in branch 'default':
issue26893: use mro() to examine class heirarchy
https://hg.python.org/cpython/rev/7188de6b50ab

--
nosy: +python-dev

___
Python tracker 

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



[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2016-05-01 Thread Gabriel Mesquita Cangussu

Gabriel Mesquita Cangussu added the comment:

Terry,

About your question, "Isn't there some other way to asynchronously read/file 
files, as opposed to sockets and pipes, on Windows?", that is exactly the 
problem I was trying to overcome, specifically for reading the stdin.

On my research I found both this stackoverflow questions with no valid answers:

http://stackoverflow.com/questions/31510190/aysncio-cannot-read-stdin-on-windows

http://stackoverflow.com/questions/31511563/file-to-socket-adapter-in-python

And I understood that 'pipe' wouldn't mean a 'file', but why can't I use 
'sys.stdin' with 'ProactorEventLoop.connect_read_pipe()', can't 'sys.stdin' be 
a pipe on Windows like it can on Posix?

--

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-01 Thread Meador Inge

Meador Inge added the comment:

LGTM.  I agree that the extra braces are a little gross, but nothing 
immediately comes to mind as how to make that better.

--
nosy: +meador.inge

___
Python tracker 

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The only thing that disturbs me is that some templates need duplicating braces, 
and others need quadrupling braces.

--

___
Python tracker 

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



[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Synchronized with tip.

--
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file42672/clinic_meth_o_inline.patch

___
Python tracker 

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




[issue21367] multiprocessing.JoinableQueue requires new kwarg

2016-05-01 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Cryptic error when subclassing multiprocessing classes

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2016-05-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

$ ./python Tools/clinic/clinic_test.py
Error:
Destination does not exist: 'file'

It works in 3.4.

--
components: Argument Clinic, Tests
messages: 264595
nosy: larry, serhiy.storchaka
priority: high
severity: normal
status: open
title: Argument Clinic test is broken
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue26900] Exclude the private API from the stable API

2016-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file42670/private_limited_api.diff

___
Python tracker 

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



[issue26900] Exclude the private API from the stable API

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added

PyAPI_FUNC(PyObject *) _PyObject_GenericGetAttrWithDict(PyObject *, PyObject *, 
PyObject *);
PyAPI_FUNC(int) _PyObject_GenericSetAttrWithDict(PyObject *, PyObject *, 
PyObject *, PyObject *);
PyAPI_FUNC(int) _Py_fstat(int fd, struct _Py_stat_struct *status);
PyAPI_FUNC(void) _PyEval_FiniThreads(void);

--
Added file: http://bugs.python.org/file42671/private_limited_api.patch

___
Python tracker 

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



[issue26711] Fix comparison of plistlib.Data

2016-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For simplicity I left "==" and fixed only obvious bug.

--
assignee:  -> serhiy.storchaka
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



[issue26711] Fix comparison of plistlib.Data

2016-05-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41afb83cffac by Serhiy Storchaka in branch '3.5':
Issue #26711: Fixed the comparison of plistlib.Data with other types.
https://hg.python.org/cpython/rev/41afb83cffac

New changeset dbdd5bc4df99 by Serhiy Storchaka in branch 'default':
Issue #26711: Fixed the comparison of plistlib.Data with other types.
https://hg.python.org/cpython/rev/dbdd5bc4df99

--
nosy: +python-dev

___
Python tracker 

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



[issue26900] Exclude the private API from the stable API

2016-05-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch excludes the private API from the stable API. This includes:

_Py_Identifier-related API (other _Py_Identifier-related functions are already 
excluded):

struct _Py_Identifier;
#define _Py_static_string_init(value)
#define _Py_static_string(varname, value)
#define _Py_IDENTIFIER(varname)
PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
PyAPI_FUNC(PyObject *) _PyObject_GetAttrId(PyObject *, struct _Py_Identifier *);
PyAPI_FUNC(int) _PyObject_SetAttrId(PyObject *, struct _Py_Identifier *, 
PyObject *);
PyAPI_FUNC(int) _PyObject_HasAttrId(PyObject *, struct _Py_Identifier *);
PyAPI_FUNC(PyObject *) _PyObject_CallMethodId(PyObject *o, _Py_Identifier 
*method, const char *format, ...);
PyAPI_FUNC(PyObject *) _PyObject_CallMethodId_SizeT(PyObject *o, _Py_Identifier 
*name, const char *format, ...);
PyAPI_FUNC(PyObject *) _PyObject_CallMethodIdObjArgs(PyObject *o, struct 
_Py_Identifier *method, ...);
PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp, struct 
_Py_Identifier *key);
PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier 
*key);
PyAPI_FUNC(int) _PyDict_SetItemId(PyObject *dp, struct _Py_Identifier *key, 
PyObject *item);
PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key);

File helpers that hides OS-specific details and handle EINTR:

PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
PyAPI_FUNC(FILE *) _Py_wfopen(const wchar_t *path, const wchar_t *mode);
PyAPI_FUNC(FILE*) _Py_fopen(const char *pathname, const char *mode);
PyAPI_FUNC(FILE*) _Py_fopen_obj(PyObject *path, const char *mode);
PyAPI_FUNC(Py_ssize_t) _Py_read(int fd, void *buf, size_t count);
PyAPI_FUNC(Py_ssize_t) _Py_write(int fd, const void *buf, size_t count);
PyAPI_FUNC(Py_ssize_t) _Py_write_noraise(int fd, const void *buf, size_t count);
PyAPI_FUNC(int) _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz);
PyAPI_FUNC(wchar_t*) _Py_wrealpath(const wchar_t *path, wchar_t *resolved_path, 
size_t resolved_path_size);
PyAPI_FUNC(wchar_t*) _Py_wgetcwd(wchar_t *buf, size_t size);

Other OS functions:

PyAPI_FUNC(int) _PyOS_IsMainThread(void);
PyAPI_FUNC(void*) _PyOS_SigintEvent(void);
PyAPI_FUNC(int) _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring);
PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);

Old helpers kept for binary compatibility of extensions built before 3.2.4:

PyAPI_FUNC(void) _PyTrash_deposit_object(PyObject*);
PyAPI_FUNC(void) _PyTrash_destroy_chain(void);
PyAPI_DATA(int) _PyTrash_delete_nesting;
PyAPI_DATA(PyObject *) _PyTrash_delete_later;

And other functions and data:

PyAPI_DATA(PyTypeObject) _PyNone_Type;
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
PyAPI_DATA(PyTypeObject) _PyMethodWrapper_Type;
PyAPI_DATA(int) _Py_SwappedOp[];

PyAPI_FUNC(Py_ssize_t) _Py_GetAllocatedBlocks(void);
PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t size);
PyAPI_FUNC(PyObject *) _PyObject_GC_Calloc(size_t size);
PyAPI_FUNC(int) _PyObject_IsAbstract(PyObject *);

PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen);
PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t 
arglen);

PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index, const 
Py_ssize_t *shape);
PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, const 
Py_ssize_t *shape);

PyAPI_DATA(PyTypeObject) _PyNamespace_Type;
PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds);

PyAPI_FUNC(int) _PyOS_IsMainThread(void);
PyAPI_FUNC(void*) _PyOS_SigintEvent(void);
PyAPI_FUNC(int) _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring);
PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);

PyAPI_FUNC(int) _PyState_AddModule(PyObject*, struct PyModuleDef*);
PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *);
PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *);
PyAPI_FUNC(void) _PyThreadState_DeleteExcept(PyThreadState *tstate);
PyAPI_FUNC(void) _PyGILState_Reinit(void);
PyAPI_FUNC(PyThreadState *) _PyThreadState_UncheckedGet(void);

PyAPI_FUNC(void) _PyUnicode_ClearStaticStrings(void);
PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);

PyAPI_FUNC(void) _Py_DumpTraceback(int fd, PyThreadState *tstate);
PyAPI_FUNC(const char*) _Py_DumpTracebackThreads(int fd, PyInterpreterState 
*interp, PyThreadState *current_tstate);

PyAPI_FUNC(void) _PyImportZip_Init(void);

PyAPI_FUNC(PyObject *) _PyLong_GCD(PyObject *, PyObject *);

All these names are not documented (except _PyObject_GC_Calloc accidentally 
mentioned in What's New in 3.5) and are not used implicitly in macros (except 
_PyObject_CallMethodId_SizeT used in _PyObject_CallMethodId).

Many of these functions were added after implementing PEP 384 and changed its 
signature during its lifetime. They are not explicitly exclude from the stable 
API only by accident.

--
components: Interpreter Core
files: private_limited_api.diff
keywords: patch
messages: 264591
nosy: 

[issue26899] struct.pack_into(), struct.unpack_from() don't document support for negative offsets

2016-05-01 Thread Paul Sokolovsky

New submission from Paul Sokolovsky:

See
https://docs.python.org/3/library/struct.html#struct.pack_into
https://docs.python.org/3/library/struct.html#struct.unpack_from

Actual source contains code like:

if (offset < 0)
offset += vbuf.len;

to allow specify offsets from the end of a buffer.

--
assignee: docs@python
components: Documentation
messages: 264590
nosy: docs@python, pfalcon
priority: normal
severity: normal
status: open
title: struct.pack_into(), struct.unpack_from() don't document support for 
negative offsets
versions: Python 3.6

___
Python tracker 

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



[issue26711] Fix comparison of plistlib.Data

2016-05-01 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Serhiy,

I slightly prefer the second patch, but either one would be fine.  

The reason I asked about explicitly calling __eq__ is that this is an uncommon 
pattern (at least for me). 

Ronald

--

___
Python tracker 

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



[issue26898] Typo in the documentation of math.isclose()

2016-05-01 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue26898] Typo in the documentation of math.isclose()

2016-05-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 469bc90e8922 by Berker Peksag in branch '3.5':
Issue #26898: Fix typo in math.isclose() docstring
https://hg.python.org/cpython/rev/469bc90e8922

New changeset 634764b4675c by Berker Peksag in branch 'default':
Issue #26898: Fix typo in math.isclose() docstring
https://hg.python.org/cpython/rev/634764b4675c

--
nosy: +python-dev

___
Python tracker 

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



[issue26898] Typo in the documentation of math.isclose()

2016-05-01 Thread Marco Buttu

Changes by Marco Buttu :


--
title: Error in the -> Typo in the documentation of math.isclose()

___
Python tracker 

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



[issue26898] Error in the

2016-05-01 Thread SilentGhost

SilentGhost added the comment:

LGTM

--
nosy: +SilentGhost
stage:  -> commit review

___
Python tracker 

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



[issue26898] Error in the

2016-05-01 Thread Marco Buttu

New submission from Marco Buttu:

The math.isclose() documentation reports is_close() as function name, instead 
of isclose(): 

  >>> import math
  >>> math.isclose.__doc__[:45]
  'is_close(a, b, *, rel_tol=1e-09, abs_tol=0.0)'

--
assignee: docs@python
components: Documentation
files: isclose.patch
keywords: patch
messages: 264585
nosy: docs@python, marco.buttu
priority: normal
severity: normal
status: open
title: Error in the
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42669/isclose.patch

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-05-01 Thread Berker Peksag

Berker Peksag added the comment:

I just saw the same failure on s390x RHEL 3.x: 
http://buildbot.python.org/all/builders/s390x%20RHEL%203.x/builds/1004/steps/test/logs/stdio

==
FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_set.py", 
line 738, in test_hash_effectiveness
self.assertGreater(4*u, t)
AssertionError: 124 not greater than 128

==
FAIL: test_hash_effectiveness (test.test_set.TestFrozenSetSubclass)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_set.py", 
line 738, in test_hash_effectiveness
self.assertGreater(4*u, t)
AssertionError: 124 not greater than 128

It looks like the failed assert was added in 1d0038dbd8f8.

--
nosy: +berker.peksag, rhettinger
resolution: out of date -> 
status: closed -> open
type:  -> behavior

___
Python tracker 

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



[issue26858] setting SO_REUSEPORT fails on android

2016-05-01 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov

___
Python tracker 

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



[issue26852] add a COMPILEALL_FLAGS Makefile variable

2016-05-01 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +twouters

___
Python tracker 

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



[issue26851] android compilation and link flags

2016-05-01 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +twouters

___
Python tracker 

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



[issue26884] cross-compilation of extension module links to the wrong python library

2016-05-01 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +dstufft, eric.araujo

___
Python tracker 

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