[issue33316] Windows: PyThread_release_lock always fails

2018-05-21 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

> So, nothing more to do here.

In case that was cryptic, it means: the PR can be acted upon, no other changes 
are needed.

--

___
Python tracker 

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



[issue18307] Relative path in co_filename for zipped modules

2018-05-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

In year 2018 you have to create a pull request on GitHub. See 
https://devguide.python.org/.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33565] strange tracemalloc results

2018-05-21 Thread INADA Naoki

Change by INADA Naoki :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread INADA Naoki

Change by INADA Naoki :


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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread miss-islington

miss-islington  added the comment:


New changeset 0c1e7d8122808d42f9fdb7019061dc2e78a78efa by Miss Islington (bot) 
in branch '3.6':
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
https://github.com/python/cpython/commit/0c1e7d8122808d42f9fdb7019061dc2e78a78efa


--

___
Python tracker 

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



[issue33470] Changes from GH-1638 (GH-3575, bpo-28411) are not documented in Porting to Python 3.7

2018-05-21 Thread Eric Snow

Eric Snow  added the comment:

Under Py_LIMITED_API:

typedef struct _is PyInterpreterState;

Also, the actual removal of the "modules" field was reverted.  The field is 
still there until I get back to fixing 
https://github.com/python/cpython/pull/3606.

--

___
Python tracker 

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



[issue33595] FIx references to lambda "arguments"

2018-05-21 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +6681
stage:  -> patch review

___
Python tracker 

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



[issue33595] FIx references to lambda "arguments"

2018-05-21 Thread Andrés Delfino

New submission from Andrés Delfino :

There a couple of references to lambda parameters mentioned as arguments. I'm 
proposing fixing them.

--
assignee: docs@python
components: Documentation
messages: 317255
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: FIx references to lambda "arguments"
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32092] mock.patch with autospec does not consume self / cls argument

2018-05-21 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
nosy: +michael.foord
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



[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-21 Thread Jason Fried

Jason Fried  added the comment:

For loops not supporting this throwing NotImplmentedError from the method to 
enable reentrancy seems appropriate. 

"You should convert all your stack to async functions..."

That may not be practical for large code bases in transition to asyncio. The 
fixes for reentrancy that I find in reality are not adding async logic through 
out the call stack but instead its one of the two I listed.

--

___
Python tracker 

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



[issue18307] Relative path in co_filename for zipped modules

2018-05-21 Thread Vitaly Murashev

Vitaly Murashev  added the comment:

Guys, a couple questions ...
I want to suggest new patches for python3.7 and python2.7 with regression tests 
included
What is proper way to do it now, in year 2018 ?
May I do it on github.com ? Should I submit new issue for that there ?
Or am I still supposed to attach new patches here - on bugs.python.org ?

--

___
Python tracker 

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



[issue33594] add deprecation since 3.5 for a few methods of inspect.

2018-05-21 Thread Matthias Bussonnier

Change by Matthias Bussonnier :


--
keywords: +patch
pull_requests: +6680
stage:  -> patch review

___
Python tracker 

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



[issue33594] add deprecation since 3.5 for a few methods of inspect.

2018-05-21 Thread Matthias Bussonnier

New submission from Matthias Bussonnier :

inspect's getargspec, as well as Signature's from_function, and from_builtin 
are deprecated. 

They all emits DeprecationWarning but: 

The deprecation warning does not say since which version since are deprecated. 
For the two Signature's methods, there is no documentation available, so 
finding this information is difficult. 

Many tool rely on introspection to provide object help via docstring, which 
also did not include this deprecation notice. 

Adding the deprecation informations to these 3 function/methods would be good 
to foster migration to newer ways.

--
assignee: docs@python
components: Documentation
messages: 317252
nosy: docs@python, mbussonn
priority: normal
severity: normal
status: open
title: add deprecation since 3.5 for a few methods of inspect.
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33361] readline() + seek() on codecs.EncodedFile breaks next readline()

2018-05-21 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
title: readline() + seek() on io.EncodedFile breaks next readline() -> 
readline() + seek() on codecs.EncodedFile breaks next readline()

___
Python tracker 

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



[issue33590] sched.enter priority has no impact on execution

2018-05-21 Thread R. David Murray

R. David Murray  added the comment:

I think Ronald is correct.

The priority argument for enter would apply if you called enter twice with two 
different delays, but they happen to end up pointing to the same moment in time 
from the scheduler's point of view.

How would the computer know that two calls to enter with the same delay are 
supposed to point to the same moment in time?

But you are correct, it looks like the example would make more sense if it used 
enterabs, not enter.

You can test our theory by writing time and delay functions with a course 
enough resolution that two sequential calls to delay will end up pointing to 
the time time unit.  (Or we could look at the code :)

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



[issue33593] Support heapq on typed arrays?

2018-05-21 Thread Diego Argueta

New submission from Diego Argueta :

It'd be really great if we could have support for using the `heapq` module on 
typed arrays from `array`. For example:


```
import array
import heapq
import random

a = array.array('I', (random.randrange(10) for _ in range(10)))
heapq.heapify(a)
```

Right now this code throws a TypeError:

TypeError: heap argument must be a list


I suppose I could use `bisect` to insert items one by one but I imagine a 
single call to heapify() would be more efficient, especially if I'm loading the 
array from a byte string.

>From what I can tell the problem lies in the C implementation, since removing 
>the _heapq imports at the end of the heapq module (in 3.6) makes it work.

--
components: Library (Lib)
messages: 317250
nosy: da
priority: normal
severity: normal
status: open
title: Support heapq on typed arrays?
type: enhancement
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue33590] sched.enter priority has no impact on execution

2018-05-21 Thread sahilmn

sahilmn  added the comment:

The task schedule is executed when `s.run()` is called. There should be a
*delay = 5*  from the time the scheduling statement is executed.

If your claim is true, the priority argument is useless since it has no
impact on the execution order when `delay` values are equal. Clearly, this
is not the case since the example for `enter` at
https://docs.python.org/3/library/sched.html aims to demonstrate the use of
`priority` argument.

On Mon, May 21, 2018 at 4:14 AM, Ronald Oussoren 
wrote:

>
> Ronald Oussoren  added the comment:
>
> I don't think  there's a bug here: sched.enter schedules an event some
> time after the current time. The two calls to sched.enter are not at the
> same time, hence the priority is not used because the events are scheduled
> at different times.
>
> --
> nosy: +ronaldoussoren
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
nosy: +twouters

___
Python tracker 

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



[issue33573] statistics.median does not work with ordinal scale

2018-05-21 Thread W deW

W deW  added the comment:

Changing the documentation in tis way seems to me an excellent and easy way to 
solve the issue.

--

___
Python tracker 

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



[issue33533] Provide an async-generator version of as_completed

2018-05-21 Thread Hrvoje Nikšić

Hrvoje Nikšić  added the comment:

Another option occurred to me: as_completed could return an object that 
implements both synchronous and asynchronous iteration protocol:


class as_completed:
def __init__(fs, *, loop=None, timeout=None):
self.__fs = fs
self.__loop = loop
self.__timeout = timeout

def __iter__(self):
# current implementation here
...

async def __aiter__(self):
# new async implementation here
...

def __next__(self):
# defined for backward compatibility with code that expects
# as_completed() to return an iterator rather than an iterable
if self._iter is None:
self._iter = iter(self)
return next(self._iter)

With that design there wouldn't need to be a new function under a different 
name; instead, as_completed could just be documented as an asynchronous 
iterable, with the old synchronous iteration supported for backward 
compatibility.

--

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread R. David Murray

R. David Murray  added the comment:

json keys *are* strings, so the fact that we support other object types as keys 
and coerce them to strings is an "extra feature" of python, and is actually a 
somewhat questionable feature.  The reproducible use case is solved by the fact 
that dicts are now ordered, with no extra work on the part of the programmer.  
Likewise, if you want custom sorting you can ensure your dict is ordered the 
way you want it to be, as you indicate.  The remaining use case for sort_keys, 
then (and one for which it is *commonly* used) is sorting the keys 
lexicographically, and for that, sorting the coereced strings is correct per 
the json standard (in which all keys are required to be strings).

Note that sort_keys will not be removed for backward compatibility reasons, so 
the only question is whether or not the increased functionality of coercing 
first is worth the trouble to implement.  I'm actually only +0 on it, since I 
don't consider it good practice to json-ize dicts that have non-string keys.  
The reason I'm + is because it would increase backward compatibility with 
python2 (not the ordering of the output, we can't make that work, but in the 
fact that it would no longer raise an error in python3).

We'll see if other core developers agree or disagree.

--

___
Python tracker 

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



[issue33361] readline() + seek() on io.EncodedFile breaks next readline()

2018-05-21 Thread Diego Argueta

Diego Argueta  added the comment:

Update: Tested this on Python 3.5.4, 3.4.8, and 3.7.0b3 on OSX 10.13.4. They 
also exhibit the bug. Updating the ticket accordingly.

--
versions: +Python 3.4, Python 3.5, Python 3.7

___
Python tracker 

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



[issue33592] Document contextvars C API

2018-05-21 Thread Elvis Pranskevichus

Change by Elvis Pranskevichus :


--
keywords: +patch
pull_requests: +6679
stage:  -> patch review

___
Python tracker 

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



[issue33592] Document contextvars C API

2018-05-21 Thread Elvis Pranskevichus

New submission from Elvis Pranskevichus :

The C API for PEP 567 is currently missing.

--
assignee: docs@python
components: Documentation
messages: 317244
nosy: Elvis.Pranskevichus, docs@python, yselivanov
priority: normal
severity: normal
status: open
title: Document contextvars C API
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread Aaron Hall

Aaron Hall  added the comment:

>From a design standpoint, I'm fairly certain the sort_keys argument was 
>created due to Python's dicts being arbitrarily ordered.

Coercing to strings before sorting is unsatisfactory because, e.g. numbers sort 
lexicographically instead of by numeric value when strings.

>>> import json
>>> json.dumps({i:i**2 for i in range(15)}, sort_keys=True)
'{"0": 0, "1": 1, "2": 4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, 
"9": 81, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196}'
>>> json.dumps({str(i):i**2 for i in range(15)}, sort_keys=True)
'{"0": 0, "1": 1, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196, "2": 
4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, "9": 81}'

Changing the order of operations is just going to create more issues, IMHO.

Now that users can sort their dicts prior to providing them to the function, 
e.g.:

>>> json.dumps({str(i):i**2 for i in range(15)})
'{"0": 0, "1": 1, "2": 4, "3": 9, "4": 16, "5": 25, "6": 36, "7": 49, "8": 64, 
"9": 81, "10": 100, "11": 121, "12": 144, "13": 169, "14": 196}'

we could deprecate the argument, or just keep it as-is for hysterical raisins.

Regardless, I'd close this as "won't fix".

--

___
Python tracker 

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



[issue33531] test_asyncio: test_subprocess test_stdin_broken_pipe() failure on Travis CI

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Fixed failed sendfile tests on Windows (at least I hope so).

--

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2018-05-21 Thread Guido van Rossum

Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert

Change by Robert :


--
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread R. David Murray

R. David Murray  added the comment:

I'm fairly certain (though not 100%, obviously :) that coercing first and then 
sorting would be accepted if someone wants to create a PR for this.

--
nosy: +r.david.murray
versions: +Python 3.8

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread Christian Tanzer

Christian Tanzer  added the comment:

Aaron Hall wrote at Sun, 20 May 2018 16:49:06 +:

> Now that dicts are sortable, does that make the sort_keys argument redundant?
>
> Should this bug be changed to "won't fix"?

https://bugs.python.org/issue25457#msg317216 is as good an answer as I
could give.

Considering that I openend the bug more than 2.5 years ago, it doesn't
really matter though.

--

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 2b4ed5da1d599190c3be0084ee235b0a8f0a75ea by INADA Naoki (Miss 
Islington (bot)) in branch '3.7':
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
https://github.com/python/cpython/commit/2b4ed5da1d599190c3be0084ee235b0a8f0a75ea


--

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread INADA Naoki

INADA Naoki  added the comment:

I grepped quickly and I can't find existing usage of anonymous union/struct.

--
resolution:  -> rejected
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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread INADA Naoki

INADA Naoki  added the comment:

Oh,,, while even gcc 4.0 supported it, it is language spec from C11, not C99.

--

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I'm fine with an anonymous struct.  Is it standard C these days?

--

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread INADA Naoki

INADA Naoki  added the comment:

Make sense.

Then, what about using anonymous struct to make GC code more readable?

 typedef union _gc_head {
 struct {
 union _gc_head *gc_next;
 union _gc_head *gc_prev;
 Py_ssize_t gc_refs;
-} gc;
+};
 double dummy;  /* force worst-case alignment */
 } PyGC_Head;

All code like g->gc.gc_next will be like g->gc_next.

--

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread miss-islington

miss-islington  added the comment:


New changeset 3ccc31386da5f35f83756a265429831d650db731 by Miss Islington (bot) 
in branch '2.7':
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
https://github.com/python/cpython/commit/3ccc31386da5f35f83756a265429831d650db731


--
nosy: +miss-islington

___
Python tracker 

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



[issue33581] Document "optional components that are commonly included in Python distributions."

2018-05-21 Thread R. David Murray

R. David Murray  added the comment:

As I understand it, we don't control or know what that list is, it depends on 
each distribution's policies.

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



[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert

Change by Robert :


--
keywords: +patch
pull_requests: +6678
stage:  -> patch review

___
Python tracker 

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



[issue33586] 2.7.15 missing release notes on download page

2018-05-21 Thread Ned Deily

Change by Ned Deily :


--
assignee: docs@python -> 
nosy: +benjamin.peterson

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Zvi!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue33542] _ipconfig_getnode incorrectly selects a DUID as a MAC address

2018-05-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset e9e2fd75ccbc6e9a5221cf3525e39e9d042d843f by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922) (GH-7014)
https://github.com/python/cpython/commit/e9e2fd75ccbc6e9a5221cf3525e39e9d042d843f


--

___
Python tracker 

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



[issue33591] ctypes does not support fspath protocol

2018-05-21 Thread Robert

New submission from Robert :

Passing a non-str path which fulfills the new fspath-protcol (like a Path() 
object) to CDLL (or WinDLL, PyDLL, ...) a exception is returned.

--
components: ctypes
messages: 317230
nosy: mrh1997
priority: normal
severity: normal
status: open
title: ctypes does not support fspath protocol
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



[issue5945] PyMapping_Check returns 1 for lists

2018-05-21 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
priority: high -> normal
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2018-05-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I propose an alternate PR 7029 which also adds other improvements to the 
documentation of mappings and sequences C API.

--

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2018-05-21 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6677

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Short of adding a `tp_alignment`, though, I think we should not make things 
harder for the common cases.  This means we should probably keep the "double" 
member to ensure that extension types that have a "double" field in their 
object struct have the right alignment by default.  "long double" is much rarer 
and people who need it can workaround alignment issues by hand (for example by 
issuing memcpy() calls).

--

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset 7208bfb64b74f31f9704be3f01f26861c9cf092b by Andrew Svetlov in 
branch '3.6':
[3.6] bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7025)
https://github.com/python/cpython/commit/7208bfb64b74f31f9704be3f01f26861c9cf092b


--

___
Python tracker 

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



[issue33589] Remove dummy member in GCHead

2018-05-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

>From the linked changeset message:

> unless anyone knows of a platform where ssize_t is 4 bytes?

That's most 32-bit platforms, right?  Basically, size_t and ssize_t are 
pointer-sized except on some rare architectures.

> A more correct non-hacky alternative if any alignment issues are still found 
> would be to use a compiler specific alignment declaration on the structure 
> and determine which value to use at configure time.

AFAIU, the problem is not alignment of the PyGC_Head structure (it's always 
sufficiently aligned for its pointer-sized members) but alignment of the 
user-defined object that follows it.

The underlying issue IMO is we're trying to force a one-size-fits-all alignment 
for user-defined object structs that we know nothing about (but might contain 
something like a "long double" or, worse, some SIMD values).  Perhaps 
PyTypeObject should grow a `tp_alignment` field.

--
nosy: +gregory.p.smith, serhiy.storchaka, tim.peters

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6676

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6675

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6674

___
Python tracker 

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



[issue33583] PyObject_GC_Resize() doesn't relink GCHead

2018-05-21 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 1179f4b40f375af5c59cd4b6be9cc313fa0e1a37 by INADA Naoki in branch 
'master':
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
https://github.com/python/cpython/commit/1179f4b40f375af5c59cd4b6be9cc313fa0e1a37


--

___
Python tracker 

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



[issue33238] AssertionError on await of Future returned by asyncio.wrap_future

2018-05-21 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue33238] AssertionError on await of Future returned by asyncio.wrap_future

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Raising `InvalidStateError` sounds perfect.

Would you make a pull request?

--

___
Python tracker 

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



[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-21 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
resolution:  -> rejected
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



[issue33546] asyncio.Condition should become awaitable in 3.9

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

No, condition variables don't work this way.
The proper code looks like:

async with cond:
while not :
await cond.wait()


It cannot be collapsed to just `await cond`.

--
resolution:  -> rejected
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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +6673

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Is the issue done?

--

___
Python tracker 

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



[issue33037] Skip sending/receiving after SSL transport closing

2018-05-21 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue30618] readlink for pathlib paths

2018-05-21 Thread Dror Levin

Change by Dror Levin :


--
nosy: +spatz

___
Python tracker 

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



[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Sorry, no.
The feature was requested many times but was constantly rejected.
By this, you are adding a BLOCKING call to your async function.
At least it leads to log warning about too long callback execution.

Moreover, I suspect that `run_until_complete` reentrancy requirement breaks the 
existing third-party loop implementations, not all loops can be fixed easily.

The last: calling blocking code from async code is the anti-pattern, asyncio 
explicitly discourages it.

You should convert all your stack to async functions and add sync stubs
when needed like

def sync_call(arg):
asyncio.get_event_loop().run_until_complete(async_call(arg))

Yuri, do you agree with me?

--

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset b8b800090ff0954117a26ffcb501307823f3d33a by Andrew Svetlov (Miss 
Islington (bot)) in branch '3.7':
bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7022)
https://github.com/python/cpython/commit/b8b800090ff0954117a26ffcb501307823f3d33a


--

___
Python tracker 

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



[issue32463] problems with shutil.py and os.get_terminal_size

2018-05-21 Thread Nick McElwaine

Nick McElwaine  added the comment:

Thankyou for clearing that up!

On 18 May 2018 at 13:05, Berker Peksag  wrote:

>
> Berker Peksag  added the comment:
>
> Thanks for the report. I agree with Eryk. os.get_terminal_size() is a
> low-level function. shutil.get_terminal_size() should be used as documented
> at https://docs.python.org/3/library/os.html#os.get_terminal_size
>
> shutil.get_terminal_size() is the high-level function which should
> normally be used, os.get_terminal_size is the low-level
> implementation.
>
> --
> nosy: +berker.peksag
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33590] sched.enter priority has no impact on execution

2018-05-21 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I don't think  there's a bug here: sched.enter schedules an event some time 
after the current time. The two calls to sched.enter are not at the same time, 
hence the priority is not used because the events are scheduled at different 
times.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset a84d0b361a26c05c6fadc6640591ec3feee5bfb5 by Andrew Svetlov (Vlad 
Starostin) in branch 'master':
bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)
https://github.com/python/cpython/commit/a84d0b361a26c05c6fadc6640591ec3feee5bfb5


--

___
Python tracker 

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



[issue33263] Asyncio server enters an invalid state after a request with SO_LINGER

2018-05-21 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6672

___
Python tracker 

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



[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-05-21 Thread zachrahan

zachrahan  added the comment:

Well, "wontfix" would be appropriate in the context of deprecating the 
sort_keys option (over the course of however many releases) and documenting 
that the new procedure for getting JSON output in a specific order is to ensure 
that the input dict was created in that order.

Certainly for regression testing, sort_keys is no longer needed, but that's not 
the only reason people are using that option. (It's certainly not why I use the 
option -- my use stems from sort_keys improving human readability of the JSON.)

But outside of deprecating sort_keys wholesale, it is still a bug that 
sort_keys=True can cause an error on input that would otherwise be valid for 
json.dump[s].

--

___
Python tracker 

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