[issue15852] typos in curses argument error messages

2017-12-20 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It was worth to honor Chris as the author of the patch in the commit message.

--

___
Python tracker 

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



[issue32386] dynload_next.c is obsolete

2017-12-20 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue15216] Add encoding & errors parameters to TextIOWrapper.reconfigure()

2017-12-20 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



[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

See discussion in https://bugs.python.org/issue12428 (especially the last 
message)

--
nosy: +asvetlov

___
Python tracker 

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



[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-12-20 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

Do you need any help with the change?

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-12-20 Thread Julien Palard

Julien Palard  added the comment:

Sadly I can't see it, it may have already been fixed by the cron task (I'm 3 
hours late).

I grepped on the server to check if there's another page: no one found.

I'll try to fix it by the proposed simple idea that make sense of using 
different directories for the different builds, will track this in: 
https://github.com/python/docsbuild-scripts/issues/35

--

___
Python tracker 

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



[issue32395] asyncio.StreamReader.readuntil is not general enough

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Support multiple separators looks easy, I don't expect any performance impact.
Like we already have it for strings: s.startswith(('\n', '\r'))

Regexps are more expensive thing, callbacks are kind of evil.

Let's add a patch for multiple separators first, maybe it covers 99.9% use 
cases.

--

___
Python tracker 

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



[issue32395] asyncio.StreamReader.readuntil is not general enough

2017-12-20 Thread Yury Selivanov

Change by Yury Selivanov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue32395] asyncio.StreamReader.readuntil is not general enough

2017-12-20 Thread Bruce Merry

New submission from Bruce Merry :

I'd proposed one specific solution in Issue 32052 which asvetlov didn't like, 
so as requested I'm filing a bug about the problem rather than the solution.

The specific case I have is reading a protocol in which either \r or \n can be 
used to terminate lines. With StreamReader.readuntil, it's only possible to 
specify one separator, so it can't easily be used (*).

Some nice-to-have features, from specific to general:
1. Specify multiple alternate separators.
2. Specify a regex for a separator.
3. Specify a regex for the line.
4. Specify a callback that takes a string and returns the position of the end 
of the line, if any.

Of course, some of these risk quadratic-time behaviour if they have to check 
the whole buffer every time the buffer is extended, so that would need to be 
considered in the design. In the last case, the callback could take care of it 
itself by maintaining internal state.


(*) I actually have a solution for this case 
(https://github.com/ska-sa/aiokatcp/blob/bd8263cefe213003a218fac0dd8c5207cc76aeef/aiokatcp/connection.py#L44-L52),
 but it only works because \r and \n are semantically equivalent in the 
particular protocol I'm parsing.

--
components: asyncio
messages: 308852
nosy: Bruce Merry, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.StreamReader.readuntil is not general enough
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



[issue15852] typos in curses argument error messages

2017-12-20 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



[issue15852] typos in curses argument error messages

2017-12-20 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4847

___
Python tracker 

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



[issue15852] typos in curses argument error messages

2017-12-20 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4846

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-20 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 09dc2f508c8513e0466a759cc27a09108c1e55c2 by Alexander Belopolsky 
(Paul Ganssle) in branch 'master':
bpo-15873: Implement [date][time].fromisoformat (#4699)
https://github.com/python/cpython/commit/09dc2f508c8513e0466a759cc27a09108c1e55c2


--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

> It did mean duplicating a handful of lines of code from asyncio to iterate 
> over the getaddrinfo() results (creating one asyncio.Server per sockaddr 
> instead of letting asyncio create a single asyncio.Server with multiple 
> listening sockets) and there are some other minor details like cleaning up if 
> the kernel-selected dynamic port chosen for the first interface is not 
> actually free on all other interfaces, but I'm not actually looking for any 
> changes in how that's working right now.

I think you're doing it the right way.  It's a rather niche requirement, so I 
don't think we should make create_server to somehow support this use case.

asyncssh looks absolutely amazing, btw.

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Ron Frederick

Ron Frederick  added the comment:

That'd be great if you could add AbstractServer to the 3.7 docs - thanks!

Regarding the other issue, I'm already set up to use multiple asyncio.Server 
objects to deal with the shared port issue and it's working fine. It did mean 
duplicating a handful of lines of code from asyncio to iterate over the 
getaddrinfo() results (creating one asyncio.Server per sockaddr instead of 
letting asyncio create a single asyncio.Server with multiple listening sockets) 
and there are some other minor details like cleaning up if the kernel-selected 
dynamic port chosen for the first interface is not actually free on all other 
interfaces, but I'm not actually looking for any changes in how that's working 
right now.

Here's the code I'm referring to if you're curious:

https://github.com/ronf/asyncssh/blob/master/asyncssh/listener.py#L192

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

>  _OR_ adding AbstractServer to the documentation and changing existing 
> references to asyncio.Server to point at asyncio.AbstractServer instead, as 
> that symbol is already exported but is not currently documented.

I completely missed the fact that we already export AbstractServer and that the 
documentation doesn't actually refer to it, and that it has less APIs than 
Server.  Thanks for reminding me of that, Ron.  I'll try to address the docs 
part before 3.7 comes out.

> So, when binding on multiple interfaces there's a requirement that the SAME 
> port be chosen for all of the socket bindings, which can't easily be done 
> today with a single asyncio.Server object. That's a bit off-topic for this 
> issue, though.

And why do you need a single Server object?

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



[issue31584] Documentation Language mixed up

2017-12-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Hmm only for that one page it seems?

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-12-20 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Seems like this is happening again.
English docs are showing Japanese content.
https://github.com/python/pythondotorg/issues/1207

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

>  I'm really not sure there's ANY call other than getsockaddr() that really 
> makes sense here, though, so perhaps it would be better to evolve the API in 
> AbstractServer into returning a list of sockaddr tuples rather than sockets.

Right, that's why uvloop exposes only SocketLike objects, that have 
getsockaddr() and getsockopt(), but raise when sock.send() is called.  Maybe 
we'll do the same thing in asyncio.

--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, the following command does crash:

PYTHONMALLOC=pymalloc ./Programs/_testembed forced_io_encoding

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Ron Frederick

Ron Frederick  added the comment:

Thanks. Unfortunately, in the case of the way SSH listeners with dynamic ports, 
the protocol only allows a single port number to be returned. So, when binding 
on multiple interfaces there's a requirement that the SAME port be chosen for 
all of the socket bindings, which can't easily be done today with a single 
asyncio.Server object. That's a bit off-topic for this issue, though.

Regarding exposing the sockets, it would never really make sense to directly 
call send() on a listening socket, and I can see why it also wouldn't make 
sense to allow calling accept(). I'm really not sure there's ANY call other 
than getsockaddr() that really makes sense here, though, so perhaps it would be 
better to evolve the API in AbstractServer into returning a list of sockaddr 
tuples rather than sockets.

--

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

The PR looks good, but I don't have the capacity right now to merge it. Ill 
need some time for research to double check if it's ok to drop scope id. Will 
try to find it in the next few days.

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Server.sockets property will be a public API and defined in the AbstractServer, 
so you can start using them. Just don't try to call socket.send() or 
socket.accept() as that will break things.

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Ron Frederick

Ron Frederick  added the comment:

In my original report, I suggested _either_ exporting asyncio.Server since 
that's what was documented elsewhere _OR_ adding AbstractServer to the 
documentation and changing existing references to asyncio.Server to point at 
asyncio.AbstractServer instead, as that symbol is already exported but is not 
currently documented. There appear to be good reasons for hiding the 
implementation details of Server, and I'm good with that. I just think the docs 
and the exports need to agree on one or the other.

I originally had references to AbstractServer in my project docs, but changed 
them to Server after seeing that only Server was currently in the public Python 
documentation.

As for references to the "sockets" member of Server, I'm not currently relying 
on that in my code. I have code that can handle getaddrinfo() returning more 
than one address to listen on, but I create separate Server instances for each 
individual address right now, as this gives me better control when a caller 
asks to listen on a dynamic port on multiple interfaces at once.

--

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг

Марк Коренберг  added the comment:

No, Improvement for typical case (not scoped IPv6 addresses) was not the 
target, but fortunatelly it also sped up.

--

___
Python tracker 

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



[issue15216] Add encoding & errors parameters to TextIOWrapper.reconfigure()

2017-12-20 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 507434fd504f3ebc1da72aa77544edc0d73f136e by INADA Naoki in branch 
'master':
bpo-15216: io: TextIOWrapper.reconfigure() accepts encoding, errors and newline 
(GH-2343)
https://github.com/python/cpython/commit/507434fd504f3ebc1da72aa77544edc0d73f136e


--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-20 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4845

___
Python tracker 

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



[issue32394] socket lib beahavior change in 3.6.4

2017-12-20 Thread Kamil

New submission from Kamil :

On Windows, python 3.6.3 code "hasattr(socket, 'TCP_KEEPCNT')" gives False, 
python 3.6.4 gives True. This behavior breaks many libraries that i use.

--
components: Library (Lib)
messages: 308837
nosy: skn78
priority: normal
severity: normal
status: open
title: socket lib beahavior change in 3.6.4
type: behavior
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



[issue28942] await expressions in f-strings

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Looks like it's working now:

import asyncio


async def foo():
return 32


async def bar():
print(f'{await foo()}')


asyncio.run(bar())

Prints:

32

--
resolution:  -> not a bug
stage:  -> 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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:

Summary of the visible changes:

* sys.argv is now set earlier, before "import site"

* The implementation of the PEP 538 now respects -E and -I options.

* _PyCoreConfig now allows to modify a lot of configuration options which 
wasn't possible to configure previously. (_PyMainInterpreterConfig allows to 
configure options using Python types.) It should be very useful for embedded 
Python, once the API will be public.


Summary of the most important changes:

* On Unix, char **argv of main() is now decoded again and the configuration 
(cmdline, env vars, etc.) is read again if the C locale is coerced (PEP 538) or 
if the UTF-8 Mode is enabled (PEP 540).

* The "path configuration" (sys.path, sys.prefix, sys.exec_prefix, etc.) is now 
computed before _Py_InitializeMainInterpreter(), by 
_PyMainInterpreterConfig_Read()

* Warning options are now computed in a list from -W options and PYTHONWARNINGS 
env var, before setting sys.warnoptions. Similar change has been done for 
sys._xoptions: xoptions are first stored in a wchar_t** list.

* A new _PyInitError structure has been introduced to be able to report 
failures instead of calling Py_FatalError(). Most of the Python initializatioin 
code has been modified to use it.

* Py_Main() now only uses regular C functions (using wchar_t* type for example) 
before _Py_InitializeCore(), the Python C API is now only used after 
_Py_InitializeCore().

* A new _PyCoreConfig_Read() has been added to read most configuration options 
using C types. _PyMainInterpreterConfig_Read() is now mostly responsible to 
convert C types to Python types.

* It becomes simpler to decide the priority between env vars, -X options, 
command line options, Py_xxx global variables, etc. The code to read these 
options and to code to "merge" these options is now decoupled.

* Each interpreter now has its copy of the "core_config" (_PyCoreConfig) and 
the main "config" (_PyMainInterpreterConfig). When using multiple interpreters, 
it is important to get Python objects created with the right interpreter for 
the main config. The ownership of these configurations becomes more obvious.

* Many global buffers with a fixed size like "static wchar_t 
progpath[MAXPATHLEN+1];" in Modules/getpath.c have been replaced with memory 
allocated on the heap with functions to release memory.

* Python/pathconfig.c (360 lines) has been added. More code is shared between 
Windows and Unix to compute the module search path (sys.path).

--

___
Python tracker 

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



[issue32393] nav menu jitter in old documentation

2017-12-20 Thread Joseph Hendrey

New submission from Joseph Hendrey :

The sidebar navigation menu jitters when scrolling on the 2.7 documentation 
pages (at least in Chrome).

A seemingly unrelated issue is that the collapse symbol '<<' is a fixed 
distance from the top of the page rather than staying in the centre 
(height-wise) of the screen (it should always be visible).

It seems it has been fixed for newer documentation, but since the fix is so 
simple it would be nice to fix it for the old documentation too. Setting the 
position property of the span element seems to fix both issues for me (see 
attached screenshot)

--
assignee: docs@python
components: Documentation
files: screenshot.JPG
messages: 308834
nosy: Joseph Hendrey, docs@python
priority: normal
severity: normal
status: open
title: nav menu jitter in old documentation
type: behavior
versions: Python 2.7
Added file: https://bugs.python.org/file47343/screenshot.JPG

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 31e99080f6f8cf7faaba9fe3a4e0996e49163317 by Victor Stinner in 
branch 'master':
bpo-32030: Fix usage of memory allocators (#4953)
https://github.com/python/cpython/commit/31e99080f6f8cf7faaba9fe3a4e0996e49163317


--

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:

> I would make _Py_fopen() more compatible with the PEP 529.

Typo: It* would

--

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:

run_file() gets a wchar_t* string which comes from wmain() argv.

run_file() encodes the wchar_t* using PyUnicode_EncodeFSDefault().

Later, PyRun_SimpleFileExFlags() calls indirectly fopen() with the encoded 
filename.

> This could be addressed in _Py_fopen by decoding the path and calling _wfopen 
> instead of fopen. 

I agree that it's the correct fix.

I would make _Py_fopen() more compatible with the PEP 529.

--

___
Python tracker 

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



[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-20 Thread STINNER Victor

STINNER Victor  added the comment:

> `remove_signal_handler()` should do nothing if `sys.is_finalizing()` is true.

I dislike this option.

If you want to use sys.is_finalizing(), I would prefer to modify 
_UnixSelectorEventLoop.close() to not try to remove signal handler if close() 
has been called too late during Python finalization. But I also expect a 
warning in this case, not hide bugs silently.

If you reach this case, close() has probably been called by 
BaseEventLoop.__del__().

--

___
Python tracker 

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



[issue32030] PEP 432: Rewrite Py_Main()

2017-12-20 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4844

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2017-12-20 Thread Decorater

Decorater  added the comment:

Attached is my changes to the vcxproj files based on an field already in 
python.props.

--
Added file: https://bugs.python.org/file47342/changes.diff

___
Python tracker 

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



[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

> `remove_signal_handler()` should do nothing if `sys.is_finalizing()` is true.

Probably a good idea.

See also https://github.com/python/asyncio/pull/456.

--

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

There's no point in exporting the Server class as "asyncio.Server".  It'd 
created and managed by the event loop, and there's no point to instantiate it 
in user code.

We can add an abstract base class AbstractServer though, similar to 
AbstractFuture and AbstractTask proposed in https://bugs.python.org/issue32364.

This is a low priority feature and can probably wait till 3.8 though.

--
versions: +Python 3.8 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue27665] Make create_server able to listen on several ports

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Agree.  It's also challenging to design the API that binds to multiple hosts 
*and* ports -- a crossproduct of some sorts.

> Multiple server objects never was a problem.

Right.

Let's close this.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

I thought the improvements were way bigger than 200nsec, no?

--

___
Python tracker 

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



[issue32392] subprocess.run documentation does not have **kwargs

2017-12-20 Thread Oleh Prypin

Oleh Prypin  added the comment:

Yes, but the most prominent thing to indicate that is **kwargs in the actual 
function signature. And, as far as I'm concerned, lack of **kwargs means the 
function signature is exhaustive and there's no point in looking for fine print 
somewhere in the middle of the textual description.

--

___
Python tracker 

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



[issue32392] subprocess.run documentation does not have **kwargs

2017-12-20 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

But the documentation does say "The arguments shown above are merely the most 
common ones...The full function signature is largely the same as that of the 
Popen constructor...", no ?

--
nosy: +xdegaye

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2017-12-20 Thread Decorater

Decorater  added the comment:

If needed I could help upload the updated project files here for this issue.

--
nosy: +Decorater

___
Python tracker 

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



[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-20 Thread Марк Коренберг

Марк Коренберг  added the comment:

After my patch:

$ python3.7 -m timeit --setup 'import socket; s = 
socket.socket(socket.AF_INET6, socket.SOCK_DGRAM); s.bind(("ff02::1de:c0db", 
1234, 0, 2))' 's.getsockname()'
50 loops, best of 5: 613 nsec per loop

$ python3.7 -m timeit --setup 'import socket; s = 
socket.socket(socket.AF_INET6, socket.SOCK_DGRAM); s.bind(("::", 1235, 0, 0))' 
's.getsockname()'
50 loops, best of 5: 420 nsec per loop

--

___
Python tracker 

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



[issue24795] Make event loops with statement context managers

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Superseded by `asyncio.run()` function.

P.S.
Context manager is not a solution because `loop.shutdown_asyncgens()` should be 
called before `loop.close()` and the method is a coroutine.

--
nosy: +asvetlov
resolution:  -> wont fix
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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2017-12-20 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The PPC64 AIX 3.x Python buildbot 
(http://buildbot.python.org/all/#/builders/10) has been failing upon this same 
error for over a month.

Can you please try with:

PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid.val[0]));

Or if statvfs.f_fsid is a pointer to fsid_t, try this instead:

PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid->val[0]));

--
nosy: +xdegaye

___
Python tracker 

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



[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

`remove_signal_handler()` should do nothing if `sys.is_finalizing()` is true.

--
assignee:  -> asvetlov
nosy: +asvetlov

___
Python tracker 

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



[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
resolution:  -> wont fix
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



[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Done two years ago.

--
nosy: +asvetlov
resolution:  -> fixed
stage: needs patch -> 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



[issue25675] doc for BaseEventLoop.run_in_executor() says its a coroutine, but it is not

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

It was always awaitable object, in Python 3.7 the method was converted into 
genuine coroutine.

--
nosy: +asvetlov

___
Python tracker 

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



[issue25675] doc for BaseEventLoop.run_in_executor() says its a coroutine, but it is not

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue27665] Make create_server able to listen on several ports

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Let's don't -- all combinations of hosts, ports, sock objects makes a mess 
already.
I suggest not complicate already complex signature and just close the issue as 
"won't fix".

Multiple server objects never was a problem.

--
nosy: +asvetlov

___
Python tracker 

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



[issue27746] ResourceWarnings in test_asyncio

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Fixed in master already.

--
nosy: +asvetlov
resolution:  -> out of date
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



[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Nothing to do.
Python parser always report with such text on syntax error, there is nothing 
special for async/await

--
nosy: +asvetlov
resolution:  -> wont fix
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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue25749] asyncio.Server class documented but not exported

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
assignee:  -> asvetlov
nosy: +asvetlov

___
Python tracker 

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



[issue29889] test_asyncio fails always

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Confirm: no problems on master (Ubuntu 17.10).

Closing the issue.

--
nosy: +asvetlov
resolution:  -> works for me
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



[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Is the issue done? Can it be closed?

--
nosy: +asvetlov

___
Python tracker 

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



[issue32392] subprocess.run documentation does not have **kwargs

2017-12-20 Thread Oleh Prypin

New submission from Oleh Prypin :

I was just looking at documentation of 
https://docs.python.org/3.6/library/subprocess.html#subprocess.run
and thought that it doesn't support passing `env` because the list of supported 
keyword arguments is exhaustive (no **kwargs). But it does support passing 
**kwargs to Popen, so that should be specified in the docs.

--
assignee: docs@python
components: Documentation
messages: 308810
nosy: docs@python, oprypin
priority: normal
severity: normal
status: open
title: subprocess.run documentation does not have **kwargs
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



[issue15852] typos in curses argument error messages

2017-12-20 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


--
pull_requests: +4843

___
Python tracker 

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



[issue28697] asyncio.Lock, Condition, Semaphore docs don't mention `async with` syntax

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Fixed by recent docs update for Python 3.7

--
nosy: +asvetlov
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue29344] sock_recv not detected a coroutine

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

sock_recv was converted into genuine coroutine in Python 3.7

Closing the issue.

--
nosy: +asvetlov
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue30014] Speedup DefaultSelectors.modify() by 2x

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

PR was merged 6 months ago, closing the issue.

--
nosy: +asvetlov
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



[issue28942] await expressions in f-strings

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thanks, I'll take a look.

--

___
Python tracker 

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



[issue28942] await expressions in f-strings

2017-12-20 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
versions: +Python 3.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



[issue28942] await expressions in f-strings

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Yury, ping.

--
nosy: +asvetlov

___
Python tracker 

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



[issue29558] Provide run_until_complete inside loop

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Awaiting a future from blocking code which in turn is executed from async code 
is very dangerous idea -- it will block other async code execution.

The feature will be never implemented as well as nested loops, sorry.

Closing.

--
nosy: +asvetlov
resolution:  -> wont fix
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



[issue29689] Asyncio-namespace helpers for async_generators

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

asyncio is a library for asynchronous network communications and related stuff.

Converting async iterator into a list is out of scope of the library.

If you want incorporate aitertools into Python stdlib -- please create a 
separate issue (but better discuss it in python-ideas mailing list first).

--
nosy: +asvetlov
resolution:  -> wont fix
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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Closing this one.

Quoting my other comment from this issue:

> Well, I don't think we can do something about it. Just re-pack your arguments 
> from WeakSet to a regular set.

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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

asyncio objects are not pickable and shouldn't be -- they are ephemeral.

Like pickling open socket object doesn't make sense -- there is no possibility 
to restore connection to peer on unpickling.

Not sure if we can do anything here.

I suggest closing the issue.

--
nosy: +asvetlov

___
Python tracker 

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



[issue20493] select module: loop if the timeout is too large (OverflowError "timeout is too large")

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Documentation for asyncio specifies a cap for timeout to one day.

Closing the issue.

--
nosy: +asvetlov
resolution:  -> wont fix
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



[issue30492] 'make clinic' does not work for out of tree builds / clinic.py is not in the devguide

2017-12-20 Thread Zachary Ware

Zachary Ware  added the comment:

> I don't like to hijack this issue but could we get some of the build bots to 
> do their builds in a subfolder?

The buildmaster config is at https://github.com/python/buildmaster-config, feel 
free to submit a pull request that sets the ware-gentoo bot building 
out-of-tree.  Victor or I can merge and deploy, but I don't have the bandwidth 
to make the change myself currently.

--
nosy: +vstinner, zach.ware

___
Python tracker 

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



[issue29922] error message when __aexit__ is not async

2017-12-20 Thread Yury Selivanov

Change by Yury Selivanov :


--
versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 
3.6, Python 3.7

___
Python tracker 

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



[issue30539] Make Proactor public in asyncio.ProactorEventLoop

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

Big -1 from me.

If proactor is public, alternative event loop implementations like uvloop will 
have to implement its full API, which actually puts restrictions on us 
refactoring asyncio itself.

If there's some missing functionality we should think about adding new specific 
APIs for it, and not exposing internals.

I'm closing this issue, but please feel free to open a new one requesting to 
implement whatever pyserial-asyncio implements in asyncio itself.

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



[issue29922] error message when __aexit__ is not async

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

It's Interpreter Core problem, not specific to asyncio bug.

--
components: +Interpreter Core -asyncio
nosy: +asvetlov

___
Python tracker 

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



[issue30539] Make Proactor public in asyncio.ProactorEventLoop

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

asyncio doesn't expose `loop.selector` and `loop.proactor` -- it is deliberate 
choice.

What proactor methods are needed to serial support?
Maybe we can incorporate them into event loop itself -- as we did for 
`loop.sock_*`?

--
nosy: +asvetlov

___
Python tracker 

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



[issue30492] 'make clinic' does not work for out of tree builds / clinic.py is not in the devguide

2017-12-20 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Thanks for fixing this.  I always do my builds in subfolders as well.  It is 
handy to have multiple builds (debug, opt, profiled) that all use a single 
source tree.

I don't like to hijack this issue but could we get some of the build bots to do 
their builds in a subfolder?  I don't know who would be able to make that 
change.  It would be good to smoke out these kinds of problems early.  
Otherwise wierdo's like gps and I don't notice them until later.

If we don't keep this working, we should just rip the ability to do builds 
outside of the source tree out of the Makefile.  There is no point to 
maintaining the extra complication if it doesn't actually work.  With git 
shallow clones, I could live with that.  However, it seems a shame to lose it 
when it basically currently works fine.

--
nosy: +nascheme

___
Python tracker 

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



[issue32321] functools.reduce has a redundant guard or needs a pure Python fallback

2017-12-20 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


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

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2017-12-20 Thread Michael Felt

Michael Felt  added the comment:

FYI: from /usr/include/types.h

/* typedef for the File System Identifier (fsid).  This must correspond
 * to the "struct fsid" structure in _ALL_SOURCE below.
 */
typedef struct fsid_t {
#ifdef __64BIT_KERNEL
unsigned long val[2];
#else  /* __64BIT_KERNEL */
#ifdef _ALL_SOURCE
unsigned int val[2];
#else  /* _ALL_SOURCE */
unsigned int __val[2];
#endif /* _ALL_SOURCE */
#endif /* __64BIT_KERNEL */
} fsid_t;

And, currently I am building in 32-bit mode, with a 64BIT kernel (AIX 6.1) - so 
I expect it to be 2 unsigned_longs.

However, I am not smart enough to find a solution: I tried:
PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong((unsigned long) 
st.f_fsid));

and PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong((unsigned long 
*) st.f_fsid));

Both return:

"./Modules/posixmodule.c", line 9328.80: 1506-117 (S) Operand must be a scalar 
type.

--

___
Python tracker 

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



[issue31059] asyncio.StreamReader.read hangs if n<0

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

`.read(-1)` reads up to end of stream (closing the underlying socket by peer).

If other side doesn't close connection after sending data -- read(-1) hangs, 
but it is not asyncio bug.

--
nosy: +asvetlov
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



[issue32387] Disallow untagged C extension import on major platforms

2017-12-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

cc'ing people for the pip/PyPI aspects of this.

--
nosy: +Marcus.Smith, dstufft

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2017-12-20 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Also, even if they are common, it seems reasonable that pip could be trained to 
rename untagged binaries on install after doing something to determine if they 
should be compatible with >=3.7 or not.

--

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Function argument assignment between types "unsigned long" and "struct fsid_t" is not allowed

2017-12-20 Thread Michael Felt

Michael Felt  added the comment:

OOps - wrong error! 

It is the new fsid variable!

michael@x071:[/data/prj/python/git/python3-3.7.0.a3]xlc_r  -DNDEBUG -O 
-I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5  -I. -I./Include -I/opt/in>
"./Modules/posixmodule.c", line 5514.11: 1506-131 (W) Explicit dimension 
specification or initializer required for an auto or static array.
"./Modules/posixmodule.c", line 9328.64: 1506-280 (S) Function argument 
assignment between types "unsigned long" and "struct fsid_t" is not allowed.

 9326 | PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) 
st.f_namemax));
 9326 + (((PyTupleObject *)(v))->ob_item[9] = PyLong_FromLong((long) 
st.f_namemax));
 9327 | #endif
"./Modules/posixmodule.c", line 9328.64: 1506-280 (S) Function argument 
assignment between types "unsigned long" and "struct fsid_t" is not allowed
.
 9328 | PyStructSequence_SET_ITEM(v, 10, 
PyLong_FromUnsignedLong(st.f_fsid));
 9328 + (((PyTupleObject *)(v))->ob_item[10] = 
PyLong_FromUnsignedLong(st.f_fsid));
 9329 | if (PyErr_Occurred()) {
 9330 | Py_DECREF(v);
 9330 + do { PyObject *_py_decref_tmp = (PyObject *)(v); if (   
--(_py_decref_tmp)->ob_refcnt != 0) ; else (  (*(((PyObject*)(_py_d
ecref_tmp))->ob_type)->tp_dealloc)((PyObject *)(_py_decref_tmp))); } while (0);

--
title: AIX (xlc_r) compile error with Modules/posixmodule.c: Explicit dimension 
specification or initializer required -> AIX (xlc_r) compile error with 
Modules/posixmodule.c: Function argument assignment between types "unsigned 
long" and "struct fsid_t" is not allowed

___
Python tracker 

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



[issue32387] Disallow untagged C extension import on major platforms

2017-12-20 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

+1 on doing this.

It might also be worth examining all of the latest package version wheels on 
pypi to see which packages claiming to support Python 3 have binary wheels 
containing untagged .pyd or .so files.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here's another idea: have a new type field (a tp_something) that exposes the GC 
priority for this type.  It could be an integer between -8 and 7, for example 
(0 being the default).  Then tp_finalize would be called in sorted priority 
order.

The tricky part of course is to make this acceptable performance-wise (i.e. 
avoid walking the collectable list 16 times, once for each priority level).  
For example by creating bucket lists for each priority level (only for objects 
with a non-NULL tp_finalize).

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue32382] Python mulitiprocessing.Queue fail to get according to correct sequence

2017-12-20 Thread Tim Peters

Tim Peters  added the comment:

First thing:  the code uses the global name `outputer` for two different 
things, as the name of a module function and as the global name given to the 
Process object running that function.  At least on Windows under Python 3.6.4 
that confusion prevents the program from running.  So rename one of them.

Then comes the pain ;-)  A multiprocessing queue is a rather complex object 
under the covers, and the docs don't really spell out all the details.  Maybe 
they should.

The docs do vaguely sketch that a "feeder thread" is created in each process 
using an mp.queue, which feeds object you .put() from an internal buffer into 
an interprocess pipe.  The internal buffer is needed in case you .put() so many 
objects so fast that feeding them into a pipe directly would cause the OS pipe 
functions to fail.

And that happens in your case:  you have 10 producers running at full speed 
overwhelming a single slow consumer.  _Most_ of the data enqueued by 
output_queue.put(i+1) is sitting in those internal buffers most of the time, 
and the base interprocess pipe doesn't know anything about them for the 
duration.

The practical consequence:  while the queue always reflects the order in which 
objects were .put() within a single process, there's no guarantee about 
ordering _across_ processes.  Objects are fed from internal buffers into the 
shared pipe whenever a process's feeder thread happens to wake up and sees that 
the pipe isn't "too full".  task_queue.task_done() only records that an object 
has been taken off of task_queue and _given_ to output_queue.put(i+1); most of 
the time, the latter just sticks i+1 into an internal buffer because 
output_queue's shared pipe is too full to accept another object.

Given that this is how things actually work, what you can do instead is add:

for w in workers:
w.join()

somwehere before output_queue.put(None).  A worker process doesn't end until 
its feeder thread(s) complete feeding all the internal buffer objects into 
pipes, so .join()'ing a worker is the one "obvious" way to guarantee that all 
the worker's .put() actions have wholly completed.

In which case, there's no point to using a JoinableQueue at all - .task_done() 
no longer serves any real purpose in the code then.

--
nosy: +tim.peters

___
Python tracker 

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



[issue29970] Severe open file leakage running asyncio SSL server

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Don't know.
Ask other coredevs maybe?

--

___
Python tracker 

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



[issue29970] Severe open file leakage running asyncio SSL server

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

> The fix introduces a new parameter in public API.

Maybe we can get away with this if we do not document it in 3.6 and add a 
comment to the source code that using this new parameter will make the code 
incompatible with earlier 3.6.x versions?

--

___
Python tracker 

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



[issue29970] Severe open file leakage running asyncio SSL server

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

The fix introduces a new parameter in public API.

That's why I think we shouldn't backport it.

--

___
Python tracker 

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



[issue32382] Python mulitiprocessing.Queue fail to get according to correct sequence

2017-12-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Closing this issue in the meantime.

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



[issue32382] Python mulitiprocessing.Queue fail to get according to correct sequence

2017-12-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hi Weize,

Since this seems be a support question, I suggest you ask it either on 
https://stackoverflow.com/ or on the Python users' mailing-list 
https://mail.python.org/mailman/listinfo/python-list

--
nosy: +pitrou

___
Python tracker 

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



[issue32391] Add StreamWriter.wait_closed()

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

We've discussed this before, please go ahead.

--
type:  -> enhancement

___
Python tracker 

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



[issue32391] Add StreamWriter.wait_closed()

2017-12-20 Thread Andrew Svetlov

New submission from Andrew Svetlov :

Without the method there is no possibility to wait for actual writer closing 
(it's performed at least on next loop iteration, and even later for SSL 
transports).

Without waiting for actual closing writing tests is a pain: user should either 
add asyncio.sleep() after writer closing or suppress many warnings about 
unclosed resources.

--
components: Library (Lib), asyncio
messages: 308780
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Add StreamWriter.wait_closed()
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



[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

I agree, let's keep as_completed() simple for now.  Handling generators+async 
correctly is hard, so we definitely don't have time for this in 3.7.

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue31491] Add is_closing() to asyncio.StreamWriter.

2017-12-20 Thread Yury Selivanov

Yury Selivanov  added the comment:

OK.

--

___
Python tracker 

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



[issue31491] Add is_closing() to asyncio.StreamWriter.

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Makes sense.

--
assignee:  -> asvetlov
nosy: +asvetlov

___
Python tracker 

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



[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2017-12-20 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

as_completed() is low-level API.
Let's not overload it with different parameters.

Anyway `as_completed()` uses only asyncio.Future and it's public API like 
`add_done_callback()` etc.

You can master everything what you need without asyncio modification.

Let's close the issue with "wont fix" resolution.

--
nosy: +asvetlov

___
Python tracker 

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



[issue32390] AIX (xlc_r) compile error with Modules/posixmodule.c: Explicit dimension specification or initializer required

2017-12-20 Thread Michael Felt

New submission from Michael Felt :

current level: commit 4b965930e8625f77cb0e821daf5cc40e85b45f84 (HEAD -> master, 
upstream/master, origin/master, origin/HEAD)

Build message:
michael@x071:[/data/prj/python/git/python3-3.7.X]make
xlc_r  -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5  -I. 
-I./Include -I/opt/include   -DPy_BUILD_CORE  -c ./Modules/posixmodule.c -o 
Modules/posixmodule.o
"./Modules/posixmodule.c", line 5514.11: 1506-131 (W) Explicit dimension 
specification or initializer required for an auto or static array.
"./Modules/posixmodule.c", line 9328.64: 1506-280 (S) Function argument 
assignment between types "unsigned long" and "struct fsid_t" is not allowed.
Makefile:1765: recipe for target 'Modules/posixmodule.o' failed
make: *** [Modules/posixmodule.o] Error 1

Details (note rewrite from listing for line 5514)

 5514 | PyDoc_VAR(os_sched_param__doc__);
 5514 + static char os_sched_param__doc__[];
"./Modules/posixmodule.c", line 5514.11: 1506-131 (W) Explicit dimension 
specification or initializer required for an auto or static array.
 5515 |
 5516 | static PyStructSequence_Field sched_param_fields[] = {
 5517 | {"sched_priority", "the scheduling priority"},
 5518 | {0}
 5519 | };

--
components: Build
messages: 308775
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: AIX (xlc_r) compile error with Modules/posixmodule.c: Explicit dimension 
specification or initializer required
type: compile error
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



  1   2   >