[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-28 Thread Chih-Hsuan Yen

Chih-Hsuan Yen  added the comment:

There are still quite a few similar warnings on git-master. Do they indicate 
the same problem or should I open new issues?

For example:

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration   -I. -I./Include-DPy_BUILD_CORE -o 
Objects/bytearrayobject.o Objects/bytearrayobject.c
In file included from Objects/bytearrayobject.c:96:
Objects/clinic/bytearrayobject.c.h:677:23: warning: cast between incompatible 
function types from ‘PyObject * (*)(PyByteArrayObject *, PyObject * const*, 
Py_ssize_t)’ {aka ‘struct _object * (*)(struct  *, struct _object * 
const*, long int)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct 
_object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
 {"__reduce_ex__", (PyCFunction)bytearray_reduce_ex, METH_FASTCALL, 
bytearray_reduce_ex__doc__},
   ^
Objects/bytearrayobject.c:2136:5: note: in expansion of macro 
‘BYTEARRAY_REDUCE_EX_METHODDEF’
 BYTEARRAY_REDUCE_EX_METHODDEF
 ^

I'm using GCC 8.1.0 on Arch Linux.

--
nosy: +yan12125

___
Python tracker 

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



[issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The race condition is in tests (we can open a file before it be written in a 
child). The reed memory reusage is in the posix module. Didn't look at it 
close, but seems the content of a temporary Python object (the result of 
encoding/decoding) is passed to C library function, and this object is freed 
before the content be used.

--

___
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-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Only a PR for master is needed. Changes to other branches will be ported after 
reviewing and merging the PR for master.

--

___
Python tracker 

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



[issue33658] Introduce a method to concatenate regex patterns

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is not trivial task because inline flags with global scope can be occurred 
in any part of the pattern (although using them not at the start of the pattern 
is deprecated).

But starting with 3.7 you can use inline flags with local scope. This will 
allow you to use simple string concatenation.

pats = [r'(?m:^line.continues$)', r'(?s:begin.*?end)']

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33652] Improve pickling of typing types

2018-05-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6778

___
Python tracker 

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



[issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> The macOS Tiger buildbot where all of these "too many files open" OS failures 
> occurred has been retired.

macOS Tiger is still supported, since we still have x86 Tiger buildbot, it's 
just the dmg buildbot on Tiger which has been retired. Right?

--

___
Python tracker 

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



[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-28 Thread Sergey B Kirpichev

Sergey B Kirpichev  added the comment:

> are people writing an entirely different shell interface.  They're rare.

Or just using a different shell interface.  Or even different defaults for the 
standard shell...

And they are not rare.  Almost nobody in reality use CPython shell - that's 
definitely true for scientific applications of Python, data scientists, etc.

> As your IPython example showed, their job is harder than _just_ replacing 
> PS1/PS2.

Yes, custom shells have much more stuff (In/Out arrays, etc), but changing 
PS1/PS2 - require very tiny modifications for doctest.  And such changes - 
almost all that usually prevent using standard doctest for testing examples, 
written for applications, which assume "a different shell interface" (which, I 
remind, may be just a plain CPython shell with customized ps1/ps2).

--

___
Python tracker 

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



[issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system

2018-05-28 Thread Ned Deily

Ned Deily  added the comment:

Whether or not Tiger is supported, we no longer have any Tiger buildbots. We 
agreed to retire them earlier this year.

--

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread Marcel Plch

Change by Marcel Plch :


--
pull_requests: +6779

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

I just reproduced the issue on Linux. Open 3 terminals and run the commands in 
parallel:

(1) ./python -m test test_asyncio -m test_start_tls_server_1 -F
(2) ./python -m test -j16 -r
(3) ./python -m test -j16 -r

It's a race condition which doesn't depend on the OS, but on the system load.

--

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread Petr Viktorin

Petr Viktorin  added the comment:

> That's a weak test: if the script fails before calling 
> spec.loader.create_module(), the test also pass. If the function raises an 
> exception but don't crash, the test pass as well.

Marcel added PR 7145 for that -- it wraps things in try/except to catch 
Python-level exceptions sounds like a good solution to me.

--

___
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-28 Thread Vitaly Murashev

Vitaly Murashev  added the comment:

> Only a PR for master is needed.
Serhiy Storchaka, thanks for advice,
I cancelled unnecessary PRs.

--

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-05-28 Thread STINNER Victor

Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue30654] signal module always overwrites SIGINT on interpreter shutdown

2018-05-28 Thread pkerling

Change by pkerling <9b6ab...@casix.org>:


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

___
Python tracker 

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



[issue33665] tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent compared to the non ttk version

2018-05-28 Thread pez

New submission from pez <4coreylo...@gmail.com>:

tkinter.Scrollbar(orient='horizontal').fraction() gives you an accurate 
representation of how far along the mouse is in the trough. The output is 0.0 
when the mouse is on the first pixel of the trough. The output is 1.0 when the 
mouse is on the last pixel of the trough.

tkinter.ttk.Scrollbar(orient='horizontal').fraction() believes the trough is 16 
pixels shorter than it is. The output is 0.0 when the mouse is on the first 
pixel of the trough. However, the output is greater than 1.0 when the mouse is 
on the last pixel of the trough. This extra 16 pixels is static, so the 
behavior is the same regardless of how wide the scrollbar is.

While possibly coincidental, it's interesting that the 16 pixels is also close 
to the default width of the scrollbar.

This is happening for me on Windows 7.
Did not test vertical orientation.

--
components: Tkinter
files: ttk_scroll_bug.py
messages: 317836
nosy: pez
priority: normal
severity: normal
status: open
title: tkinter.ttk.Scrollbar.fraction() is inaccurate, or at least inconsistent 
compared to the non ttk version
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47617/ttk_scroll_bug.py

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +6781

___
Python tracker 

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



[issue33652] Improve pickling of typing types

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6782

___
Python tracker 

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



[issue33652] Improve pickling of typing types

2018-05-28 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:


New changeset 97b523db7c79c18c48516fba9410014d9896abc4 by Ivan Levkivskyi 
(Serhiy Storchaka) in branch 'master':
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
https://github.com/python/cpython/commit/97b523db7c79c18c48516fba9410014d9896abc4


--

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2018-05-28 Thread twisteroid ambassador

Change by twisteroid ambassador :


--
pull_requests: +6783

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread twisteroid ambassador

twisteroid ambassador  added the comment:

I was about to write a long comment asking what the appropriate behavior should 
be, but then saw that _ProactorSocketTransport already handles the same issue 
properly, so I will just change _SelectorSocketTransport to do the same thing.

--

___
Python tracker 

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



[issue33652] Improve pickling of typing types

2018-05-28 Thread miss-islington

miss-islington  added the comment:


New changeset 98b089e2a178a309f20ac9ff498b230407da1f47 by Miss Islington (bot) 
in branch '3.7':
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
https://github.com/python/cpython/commit/98b089e2a178a309f20ac9ff498b230407da1f47


--

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2018-05-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests:  -6783

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread Petr Viktorin

Petr Viktorin  added the comment:


New changeset 08c5aca9d13b24b35faf89ebd26fc348ae1731b2 by Petr Viktorin (Marcel 
Plch) in branch 'master':
bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)
https://github.com/python/cpython/commit/08c5aca9d13b24b35faf89ebd26fc348ae1731b2


--

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6784

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset eb8516becc267caeb0ca6f9c41e805d1ba1caaa3 by Vinay Sajip (Miss 
Islington (bot)) in branch '3.7':
bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. 
(GH-6702) (GH-6704)
https://github.com/python/cpython/commit/eb8516becc267caeb0ca6f9c41e805d1ba1caaa3


--

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Vinay Sajip

Vinay Sajip  added the comment:

Because the specs allow certain decisions to be taken "by mutual consent", I'm 
not sure anyone can be really happy. Perhaps I should just state what the 
format actually is, as per msg316662, refer to RFC 3339 and leave it at that.

I don't have a copy of the ISO 8601 standard and so can't confirm exactly what 
it states.

--

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Paul Ganssle

Paul Ganssle  added the comment:

I think this is more a matter of misunderstanding the fact that ISO 8601 is a 
larger and more complicated spec than people think.  You'll note that the 
original complaint also seems to think that a timezone is required (it is not). 
You can find a copy of RFC 3339 here: https://tools.ietf.org/html/rfc3339

Which states:


  NOTE: ISO 8601 defines date and time separated by "T".
  Applications using this syntax may choose, for the sake of
  readability, to specify a full-date and full-time separated by
  (say) a space character.

I think this is sufficient to refer to this as an RFC 3339 datetime, as a 
spec-compliant parser should be able to handle it just fine. Then there is no 
need for "x-like" anywhere in the documentation, which is just confusing. I do 
agree that the precise spec should be given.

--

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread Petr Viktorin

Petr Viktorin  added the comment:


New changeset 983c1ba94aef945386001932c5744f8ce9757fec by Petr Viktorin (Miss 
Islington (bot)) in branch '3.7':
bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) 
(GH-7150)
https://github.com/python/cpython/commit/983c1ba94aef945386001932c5744f8ce9757fec


--

___
Python tracker 

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



[issue33400] logging.Formatter does not default to ISO8601 date format

2018-05-28 Thread Paul Ganssle

Paul Ganssle  added the comment:

Ah, actually, my mistake, RFC 3339 most assuredly *does* require a UTC offset:


   4.4. Unqualified Local Time

   A number of devices currently connected to the Internet run their
   internal clocks in local time and are unaware of UTC.  While the
   Internet does have a tradition of accepting reality when creating
   specifications, this should not be done at the expense of
   interoperability.  Since interpretation of an unqualified local time
   zone will fail in approximately 23/24 of the globe, the
   interoperability problems of unqualified local time are deemed
   unacceptable for the Internet.  Systems that are configured with a
   local time, are unaware of the corresponding UTC offset, and depend
   on time synchronization with other Internet systems, MUST use a
   mechanism that ensures correct synchronization with UTC.  Some
   suitable mechanisms are:


This is not true of ISO 8601, but dropping all references to RFC 3339 or ISO 
8601 is fine with me.

--

___
Python tracker 

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



[issue33652] Improve pickling of typing types

2018-05-28 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

I think this can be closed now.

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



[issue33666] os.errno gone AWOL

2018-05-28 Thread Miro Hrončok

New submission from Miro Hrončok :

In 3.7.0b4 I see the following traceback:

>>> import os
>>> os.errno
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'os' has no attribute 'errno'

This was not the case for Python 3.6:

>>> import os
>>> os.errno


os.errno might not have been documented, however there are projects out there 
that use it:

https://github.com/intel/bmap-tools/issues/34
https://bugzilla.redhat.com/show_bug.cgi?id=1583196

So I suggest the removal of os.errno is something worth documenting at 
https://docs.python.org/3.7/whatsnew/3.7.html

The root of the change is in 
https://github.com/python/cpython/pull/1269/files#diff-405b29928f2a3ae216e45afe9b5d0c60

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 317847
nosy: docs@python, hroncok
priority: normal
severity: normal
status: open
title: os.errno gone AWOL
type: behavior
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



[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-05-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

I'm aiming for this week, so with the docstring-AST-induced delay I should even 
meet the original rc1 goal :)

--

___
Python tracker 

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




[issue33667] Mock calls on mutable objects

2018-05-28 Thread Pawel

New submission from Pawel :

When method of mocked object is called multiple times with mutable object as 
parameter and attribute of this object has been updated between calls, 
mock_calls is only aware of the last value. I think it unexpected behaviour, 
that mock doesn't track value changes.
I've attached example code

--
components: Tests
files: test.py
messages: 317849
nosy: pawelj
priority: normal
severity: normal
status: open
title: Mock calls on mutable objects
type: behavior
versions: Python 3.5, Python 3.6
Added file: https://bugs.python.org/file47618/test.py

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2018-05-28 Thread twisteroid ambassador

Change by twisteroid ambassador :


--
pull_requests: +6786

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread twisteroid ambassador

Change by twisteroid ambassador :


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

___
Python tracker 

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



[issue33666] os.errno gone AWOL

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

os.errno as well as os.sys or os.abc is an implementation detail. It can be 
changed without notice even in a bugfix release. Projects that depend on it are 
incorrect and should be fixed.

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



[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-05-28 Thread Charalampos Stratakis

Charalampos Stratakis  added the comment:

Ping. Could someone take a look? There is a PR ready.

--

___
Python tracker 

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



[issue33668] Wrong behavior of help function on module

2018-05-28 Thread Oleg Oleynik

New submission from Oleg Oleynik :

I write file test.py:
def __getattr__(key):
return None
help(__name__)

when I try to run it I've got error:
Traceback (most recent call last):
  File "test.py", line 5, in 
help(__name__)
  File "C:\Program Files\Python37\lib\_sitebuiltins.py", line 103, in __call__
return pydoc.help(*args, **kwds)
  File "C:\Program Files\Python37\lib\pydoc.py", line 1894, in __call__
self.help(request)
  File "C:\Program Files\Python37\lib\pydoc.py", line 1944, in help
elif request: doc(request, 'Help on %s:', output=self._output)
  File "C:\Program Files\Python37\lib\pydoc.py", line 1674, in doc
pager(render_doc(thing, title, forceload))
  File "C:\Program Files\Python37\lib\pydoc.py", line 1667, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
  File "C:\Program Files\Python37\lib\pydoc.py", line 385, in document
if inspect.ismodule(object): return self.docmodule(*args)
  File "C:\Program Files\Python37\lib\pydoc.py", line 1136, in docmodule
for key, value in inspect.getmembers(object, inspect.isclass):
  File "C:\Program Files\Python37\lib\inspect.py", line 330, in getmembers
for base in object.__bases__:
TypeError: 'NoneType' object is not iterable

If I change definition of __getattr__ function to:
def __getattr__(key):
   raise AttributeError()
then help function runs without errors. But I need to return None value from 
__getattr__ function.
When I wrote this function in class definition there is also no errors during 
runtime

--
components: Library (Lib)
messages: 317852
nosy: oleg_oleinik
priority: normal
severity: normal
status: open
title: Wrong behavior of help function on module
type: behavior
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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-28 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> Pedantically the correct way is to cast to a function pointer with no 
> prototype (empty parentheses)

Thanks for raising this point Antti. This is hinted at by the gcc 8 
documentation on -Wcast-function-type: "The function type void (*) (void) is 
special and matches everything, which can be used to suppress this warning" 
[1]. One cannot use empty parentheses though as this raises -Wstrict-prototypes 
on Python builds with gcc and -Wcast-function-type with gcc 8.

So (void *) may be replaced with (void (*) (void)) in my previous code snippets 
and also in PR 6748 and PR 6749 (I just checked my code).

[1] 
https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#Warning-Options

--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-28 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

> There are still quite a few similar warnings on git-master. Do they indicate 
> the same problem or should I open new issues?

This is the same issue, the warning line ends with [-Wcast-function-type].

--

___
Python tracker 

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



[issue33666] os.errno gone AWOL

2018-05-28 Thread Petr Viktorin

Petr Viktorin  added the comment:

I think this was closed prematurely.

> Projects that depend on it are incorrect and should be fixed.

That's definitely correct; no one here is arguing against it.
However, there are projects out there depending on it -- it worked since around 
Python 2.5, and is readily available in `os.` tab completion.
I think that documenting the removal would be good for our users.

Furthermore, not all of its uses can be fixed. I've seen it printed in books. 
There are many answers/guides/tutorials around mentioning os.errno, for example:
http://nullege.com/codes/search/os.errno.EACCES
https://ubuntuforums.org/showthread.php?t=1459923
http://code.activestate.com/recipes/580759-show-os-error-codes-and-messages-from-the-oserrno-/
https://www.georgevreilly.com/blog/2016/03/24/RaisingIOErrorForFileNotFound.html

... and people tend based their code on such recipes, rather than checking 
what's documented.


And, of course, projects run into this:
https://github.com/intel/bmap-tools/issues/34
https://bugzilla.redhat.com/show_bug.cgi?id=1583196
https://github.com/python/typeshed/issues/1646

--
nosy: +petr.viktorin
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

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



[issue33666] os.errno gone AWOL

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> os.errno as well as os.sys or os.abc is an implementation detail.

I agree but...

> It can be changed without notice even in a bugfix release. Projects that 
> depend on it are incorrect and should be fixed.

I don't think that it would hurt to document the removal of "os.errno" in 
"Porting to Python 3.7":
https://docs.python.org/dev/whatsnew/3.7.html#changes-in-python-behavior

Miro: are you volunteer to write such change?

--
nosy: +vstinner

___
Python tracker 

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



[issue33666] os.errno gone AWOL

2018-05-28 Thread Miro Hrončok

Miro Hrončok  added the comment:

I can document this, yes. I've opened this issue so I could prep a PR.

--

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread Peter Bašista

Peter Bašista  added the comment:

> Can this crash be reproduced without uvloop?
I am not aware of a way to reproduce this without uvloop.

> What is the backtrace of the assertion failure?
Without uvloop, the following exception is raised:

Exception ignored in: >
Traceback (most recent call last):
  File "uvloop_test.py", line 13, in __del__
  File "/usr/lib/python3.6/asyncio/base_events.py", line 276, in create_future
AttributeError: 'NoneType' object has no attribute 'Future'

With uvloop and with Python compiled with --with-pydebug configure option, the 
failed assertion is mentioned in the original uvloop bug report. In particular, 
this assertion fails:

python3.6-dbg: ../Objects/abstract.c:2300: _PyObject_FastCallDict: Assertion 
`func != NULL' failed. 

A full GDB backtrace is attached.

--
nosy: +pbasista
Added file: https://bugs.python.org/file47619/uvloop-test.gdb-backtrace.txt

___
Python tracker 

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



[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Xiang Zhang

New submission from Xiang Zhang :

I'm somewhat surprised when I have code like `"hello %s".format(person)` in my 
project there is no exception raised and "hello %s" returned. Have several 
tries it seems `str.format` won't check argument number.

>>> '{} {}'.format(1)
Traceback (most recent call last):
  File "", line 1, in 
IndexError: tuple index out of range
>>> '{} {}'.format(1, 2, 3)
'1 2'
>>> ''.format(1, 2, 3)
''
>>>

The IndexError is not ideal. I think this behavior could be improved since it's 
highly possible such code is an oversight bug. The old format string does a 
good job in this place:

>>> "%s %s" % 1
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not enough arguments for format string
>>> "%s %s" % (1,2,3)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not all arguments converted during string formatting
>>> "" % 1
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not all arguments converted during string formatting

--
components: Interpreter Core
messages: 317859
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: str.format should raise exception when placeholder number doesn't match 
argument number
type: behavior
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



[issue33666] os.errno gone AWOL

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

If document disappearing of os.errno, we should document disappearing of all 
other names in other modules in all versions. It is possible to write a script 
that outputs dir(mod) for all modules and compare results between different 
Python versions. Are you volunteer to do this work?

--

___
Python tracker 

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



[issue33666] os.errno gone absent without official leave (AWOL)

2018-05-28 Thread STINNER Victor

Change by STINNER Victor :


--
title: os.errno gone AWOL -> os.errno gone absent without official leave (AWOL)

___
Python tracker 

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



[issue33666] os.errno gone absent without official leave (AWOL)

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> If document disappearing of os.errno, we should document disappearing of all 
> other names in other modules in all versions.

Miro proposed to document the removal of os.errno since errno is a commonly 
used module, as the os module.

I don't think that the removal of other aliases are as important as that one.

By the way, os.errno has been removed by bpo-30152: PR 1269.

--

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> It's a race condition which doesn't depend on the OS, but on the system load.

Yeah, I agree. The current timeout for the test is 5 seconds and it tries to 
transfer 2mb of data, which isn't that much actually.  I'll bump the timeout 
and reduce the amount of data transferred in 
https://github.com/python/cpython/pull/7130

Thing is, these are the very first *functional* tests for asyncio. Before it 
was mostly tested with mocks. So we'll need some adjustment period to learn how 
slow/loaded the CI servers are and what kind of timeouts are safe to use.

--

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

There's nothing specific here to uvloop except the fact that it was compiled 
with Cython, so module finalization/GC pattern is slightly different to that of 
vanilla asyncio.

Serhiy, I'm merging this PR since I'd like to avoid having segfaults in 3.7.0.  
Feel free to debug this further.

--

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 35230d08e09de4e2e52658d5cb09e5b0ca965418 by Yury Selivanov in 
branch 'master':
bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (#7080)
https://github.com/python/cpython/commit/35230d08e09de4e2e52658d5cb09e5b0ca965418


--

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6787

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6788

___
Python tracker 

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



[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This will break the following case:

def geterrmsg(n):
return ('function doesn't have arguments' if n == 0 else
'function have a single argument' if n == 1 else
'function have %d arguments')

print(geterrmsg(n).format(n))

Actually geterrmsg() can take the error message from a translations database, 
and the number of different cases can be dependent on the language.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 23f587e395e41bd5e116312b036183f42bc4159b by Yury Selivanov 
(twisteroid ambassador) in branch 'master':
bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)
https://github.com/python/cpython/commit/23f587e395e41bd5e116312b036183f42bc4159b


--

___
Python tracker 

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



[issue33666] Document removal of os.errno

2018-05-28 Thread Petr Viktorin

Change by Petr Viktorin :


--
title: os.errno gone absent without official leave (AWOL) -> Document removal 
of os.errno

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6789

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6790

___
Python tracker 

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



[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Xiang Zhang

Xiang Zhang  added the comment:

Yes, this is a breaking change. A currently working piece of code suddenly 
raises an exception.

But, please note Serhiy in your example you have the same bug as me, you've 
gotten an oversight bug in it: it's {:d} not %s. That's why I want the 
improvement.

--

___
Python tracker 

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



[issue33623] Fix possible SIGSGV when asyncio.Future is created in __del__

2018-05-28 Thread miss-islington

miss-islington  added the comment:


New changeset 51d0a2c8ddcb9f58d71ff0a62be4e31a1af3f139 by Miss Islington (bot) 
in branch '3.7':
bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ 
(GH-7080)
https://github.com/python/cpython/commit/51d0a2c8ddcb9f58d71ff0a62be4e31a1af3f139


--
nosy: +miss-islington

___
Python tracker 

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



[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-28 Thread Tim Peters

Tim Peters  added the comment:

You missed my point about IPython:  forget "In/Out arrays, etc".  What you 
suggest is inadequate for _just_ changing PS1/PS2 for IPython.  Again, read 
their `parse()` function.  They support _more than one_ set of PS1/PS2 
conventions.  So the code changes you suggest wouldn't help them.  So long as 
they want to support more than one set, they'd still have to write their own 
`parse()` function just to deal with multiple PS1/PS2 conventions.

For the rest, it's not the number of people using non-CPython shells that's 
rare, but the number _of_ non-CPython shells.  IPython is popular, they already 
solved their problem, and the patch wouldn't help them anyway.  Who would it 
help?

I don't take "a plain CPython shell with customized ps1/ps2" seriously because, 
as I said, after some decades now I still don't know of anyone who does that 
(granting that newbies sometimes try it, go 'ha! ha! - cool!", and never try it 
again).  If any such people exist, I would oppose changing doctest just for 
them, because the _point_ of doctest is to help write easily understood tests.  
Catering to changing shell syntax in random ways opposes that goal - 
programming is a social activity.

So, sorry, but I remain opposed.  Something that might change my mind:  find an 
author of a widely used alternative Python shell who says this change would 
allow them to _remove_ their own doctest-PS1/PS2 customization code.  That 
would be a real use case.

--

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6791

___
Python tracker 

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



[issue33670] Use errorlevel of Sphinx main() in Doc\make.bat

2018-05-28 Thread Andrés Delfino

New submission from Andrés Delfino :

Doc\make.bat is exiting without exposing Sphinx's main() return value, showing 
weird things like:

C:\Users\adelfino\Desktop\Personal\repos\cpython\Doc>make venv
Using py -3.6 (found with py.exe)
Merging Misc/NEWS with py -3.6 -m blurb
Running Sphinx v1.7.4

Sphinx error:
Builder name venv not registered or available through entry point

Build succeeded. All output should be in build\venv

PR fixes this.

--
components: Demos and Tools
messages: 317870
nosy: adelfino
priority: normal
severity: normal
status: open
title: Use errorlevel of Sphinx main() in Doc\make.bat
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



[issue33670] Use errorlevel of Sphinx main() in Doc\make.bat

2018-05-28 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

> If the purpose is to detect when the test hangs: use a timeout of 5 minutes, 
> or at least 1 minute (60 seconds).

OK, sounds good, will do that.

--

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Yeah, I agree. The current timeout for the test is 5 seconds and it tries to 
> transfer 2mb of data, which isn't that much actually.  I'll bump the timeout 
> and reduce the amount of data transferred in 
> https://github.com/python/cpython/pull/7130

What is the purpose of a timeout of 5 seconds? Some buildbots are really slow.

If the purpose is to detect when the test hangs: use a timeout of 5 minutes, or 
at least 1 minute (60 seconds).

--

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +6793

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread STINNER Victor

STINNER Victor  added the comment:

> OK, sounds good, will do that.

Race condition! I created https://github.com/python/cpython/pull/7157 to 
increase the timeout from 5 seconds to 60 seconds.

--

___
Python tracker 

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



[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-28 Thread Giampaolo Rodola'

Change by Giampaolo Rodola' :


--
nosy:  -giampaolo.rodola

___
Python tracker 

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



[issue33670] Use errorlevel of Sphinx main() in Doc\make.bat

2018-05-28 Thread Andrés Delfino

Andrés Delfino  added the comment:

After the PR:

C:\Users\adelfino\Desktop\Personal\repos\cpython\Doc>make venv
Using py -3.6 (found with py.exe)
Merging Misc/NEWS with py -3.6 -m blurb
Running Sphinx v1.7.4

Sphinx error:
Builder name venv not registered or available through entry point

Build failed (exit code 2), check for error messages
above.  Any output will be found in build\venv

--

___
Python tracker 

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



[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-28 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

Found yet another race condition -- when creating multiple Tk()s. Attached  
example (loops indefinitely inside Tcl: some internal list becomes circular for 
some reason).

The obvious fix by wrapping Tcl calls with locks in Tkapp_New doesn't fix it -- 
must be something else.

Since creatng multiple Tk's is an uncommon use case, this can wait.

--
Added file: https://bugs.python.org/file47620/test_threads_tk.py

___
Python tracker 

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



[issue32533] SSLSocket read/write thread-unsafety

2018-05-28 Thread Steve Dower

Change by Steve Dower :


--
keywords: +patch
pull_requests: +6794
stage: needs patch -> patch review

___
Python tracker 

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



[issue33666] Document removal of os.errno

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Here is a list of all names removed in 3.7 (except modules that was removed as 
a whole):

abc.WeakSet
argparse._collections
argparse._copy
argparse._ensure_value
argparse._textwrap
ast._NUM_TYPES
asyncio.async
asyncio.base_events.compat
asyncio.base_events.coroutine
asyncio.base_events._ensure_resolved
asyncio.base_events.inspect
asyncio.base_events._is_dgram_socket
asyncio.base_events._is_stream_socket
asyncio.base_futures.events
asyncio.base_subprocess.compat
asyncio.base_subprocess.coroutine
asyncio.coroutines._AwaitableABC
asyncio.coroutines.compat
asyncio.coroutines._CoroutineABC
asyncio.coroutines.debug_wrapper
asyncio.coroutines.events
asyncio.coroutines._inspect_iscoroutinefunction
asyncio.coroutines.opcode
asyncio.coroutines._types_coroutine
asyncio.coroutines._types_CoroutineType
asyncio.coroutines._YIELD_FROM
asyncio.coroutines._YIELD_FROM_BUG
asyncio.events.compat
asyncio.events.constants
asyncio.events.extract_stack
asyncio.events._format_args_and_kwargs
asyncio.events._format_callback
asyncio.events._format_callback_source
asyncio.events.functools
asyncio.events._get_function_source
asyncio.events.inspect
asyncio.events.reprlib
asyncio.events.traceback
asyncio.futures.compat
asyncio.futures.traceback
asyncio.futures._TracebackLogger
asyncio.locks.compat
asyncio.proactor_events.compat
asyncio.queues.compat
asyncio.queues.coroutine
asyncio.selector_events.compat
asyncio.selector_events.coroutine
asyncio.selector_events._SelectorSslTransport
asyncio.selectors
asyncio.sslproto.compat
asyncio.sslproto._is_sslproto_available
asyncio.streams.compat
asyncio.streams.coroutine
asyncio.subprocess.coroutine
asyncio.tasks.async
asyncio.tasks.compat
asyncio.transports.compat
asyncio.unix_events.compat
asyncio.unix_events.coroutine
asyncio.unix_events._fspath
asyncio.unix_events._set_inheritable
asyncio.unix_events._set_nonblocking
code.argparse
collections.AsyncGenerator
collections.AsyncIterable
collections.AsyncIterator
collections.Awaitable
collections.ByteString
collections.Callable
collections._class_template
collections.Collection
collections.Container
collections.Coroutine
collections._field_template
collections.Generator
collections.Hashable
collections.ItemsView
collections.Iterable
collections.Iterator
collections.KeysView
collections.Mapping
collections.MappingView
collections.MutableMapping
collections.MutableSequence
collections.MutableSet
collections._repr_template
collections.Reversible
collections.Sequence
collections.Set
collections.Sized
collections.ValuesView
concurrent.futures.process.multiprocessing
concurrent.futures.process._shutdown
concurrent.futures.process.SimpleQueue
concurrent.futures.process._threads_queues
concurrent.futures.thread
concurrent.futures.ThreadPoolExecutor
distutils.cmd.install_misc
distutils.command.sdist.AsyncGeneratorType
distutils.command.sdist.BuiltinFunctionType
distutils.command.sdist.BuiltinMethodType
distutils.command.sdist.CCompilerError
distutils.command.sdist.CodeType
distutils.command.sdist.CompileError
distutils.command.sdist.coroutine
distutils.command.sdist.CoroutineType
distutils.command.sdist.dep_util
distutils.command.sdist.DistutilsArgError
distutils.command.sdist.DistutilsByteCompileError
distutils.command.sdist.DistutilsClassError
distutils.command.sdist.DistutilsError
distutils.command.sdist.DistutilsExecError
distutils.command.sdist.DistutilsFileError
distutils.command.sdist.DistutilsGetoptError
distutils.command.sdist.DistutilsInternalError
distutils.command.sdist.DistutilsModuleError
distutils.command.sdist.DistutilsPlatformError
distutils.command.sdist.DistutilsSetupError
distutils.command.sdist.DynamicClassAttribute
distutils.command.sdist.FrameType
distutils.command.sdist.FunctionType
distutils.command.sdist.GeneratorType
distutils.command.sdist.GetSetDescriptorType
distutils.command.sdist.LambdaType
distutils.command.sdist.LibError
distutils.command.sdist.LinkError
distutils.command.sdist.MappingProxyType
distutils.command.sdist.MemberDescriptorType
distutils.command.sdist.MethodType
distutils.command.sdist.ModuleType
distutils.command.sdist.new_class
distutils.command.sdist.prepare_class
distutils.command.sdist.PreprocessError
distutils.command.sdist.SimpleNamespace
distutils.command.sdist.TracebackType
distutils.command.sdist.UnknownFileError
doctest.argparse
email.utils.ecre
enum._or_
enum.reduce
functools.MappingProxyType
functools.WeakKeyDictionary
gettext.copy
gettext.ENOENT
gettext.io
gettext.struct
http.client.os
http.cookies._warn_deprecated_setter
http.server.argparse
importlib._bootstrap_external._code_to_bytecode
importlib._bootstrap_external._validate_bytecode_header
inspect.ast
json.tool.collections
lib2to3.pgen2.grammar.tokenize
lib2to3.pgen2.tokenize.t
lib2to3.pytree.warnings
lib2to3.refactor._from_system_newlines
lib2to3.refactor._open_with_encoding
lib2to3.refactor._to_system_newlines
locale.collections
logging.config.thread
modulefinder.struct
multiprocessing.forkserver.read_

[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 1f21ae710d83a37c872355612b58958cef4d5f95 by Yury Selivanov (Miss 
Islington (bot)) in branch '3.7':
bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) 
(GH-7153)
https://github.com/python/cpython/commit/1f21ae710d83a37c872355612b58958cef4d5f95


--

___
Python tracker 

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



[issue31467] cElementTree behaves differently compared to ElementTree

2018-05-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests:  -6786

___
Python tracker 

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



[issue33671] Efficient efficient zero-copy syscalls for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' :

Patch in attachment uses platform specific zero-copy syscalls on Linux and 
Solaris (os.sendfile(2)), Windows (CopyFileW) and OSX (fcopyfile(2)) speeding 
up shutil.copyfile() and other functions using it (copy(), copy2(), copytree(), 
move()).

Average speedup for a 512MB file copy is +24% on Linux, +50% on OSX and +48% on 
Windows by copying file on the same partition (SSD disk was used).

Follows some benchmarks.

Setup
=

Create 128K, 8M, 512M file:

$ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(128 * 
1024))"
$ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(8 * 1024 * 
1024))"
$ python -c "import os; f = open('f1', 'wb'); f.write(os.urandom(512 * 1024 
* 1024))"

Benchmark:

$ time ./python -m timeit -s 'import shutil; p1 = "f1"; p2 = "f2"' 
'shutil.copyfile(p1, p2)'

Linux
=

128K copy (+13%):

without patch:
1000 loops, best of 5: 228 usec per loop
real0m1.756s
user0m0.386s
sys 0m1.116s

with patch:
1000 loops, best of 5: 198 usec per loop
real0m1.464s
user0m0.281s
sys 0m0.958s

8MB copy (+24%):

without patch:
50 loops, best of 5: 10.1 msec per loop
real0m2.703s
user0m0.316s
sys 0m1.847s

with patch:
50 loops, best of 5: 7.78 msec per loop
real0m2.447s
user0m0.086s
sys 0m1.682s

512MB copy (+26%):

without patch:
1 loop, best of 5: 872 msec per loop
real0m5.574s
user0m0.402s
sys 0m3.115s

with patch:
1 loop, best of 5: 646 msec per loop
real0m5.475s
user0m0.037s
sys 0m2.959s

OSX
===

128K copy (+8.5%):

without patch:
500 loops, best of 5: 508 usec per loop
real0m2.971s
user0m0.442s
sys 0m2.168s

with patch:
500 loops, best of 5: 464 usec per loop
real0m2.798s
user0m0.379s
sys 0m2.031s

8MB copy (+67%):

without patch:
20 loops, best of 5: 32.8 msec per loop
real0m3.672s
user0m0.357s
sys 0m1.434s

with patch:
20 loops, best of 5: 10.8 msec per loop
real0m1.860s
user0m0.079s
sys 0m0.719s

512MB copy (+50%):

without patch:
1 loop, best of 5: 953 msec per loop
real0m5.930s
user0m1.021s
sys 0m4.835s

with patch:
1 loop, best of 5: 480 msec per loop
real0m3.150s
user0m0.067s
sys 0m2.740s

Windows
===

128K copy (+69%):

without patch:
50 loops, best of 5: 6.45 msec per loop
with patch:
50 loops, best of 5: 1.99 msec per loop

8M copy (+64%):

without patch:
10 loops, best of 5: 22.6 msec per loop
with patch:
50 loops, best of 5: 7.95 msec per loop

512M copy (+48%):

without patch:
1 loop, best of 5: 1.21 sec per loop
with patch:
1 loop, best of 5: 629 msec per loop

--
components: Library (Lib)
files: shutil-zero-copy.diff
keywords: needs review, patch
messages: 317878
nosy: giampaolo.rodola
priority: normal
severity: normal
stage: patch review
status: open
title: Efficient efficient zero-copy syscalls for shutil.copy* functions 
(Linux, OSX and Win)
type: performance
versions: Python 3.8
Added file: https://bugs.python.org/file47621/shutil-zero-copy.diff

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

Merged, thanks for looking into this!

BTW, if you have any other bugfixes in mind, today is pretty much last chance 
to get them into 3.7.0

--

___
Python tracker 

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



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Giampaolo Rodola'

Change by Giampaolo Rodola' :


--
title: Efficient efficient zero-copy syscalls for shutil.copy* functions 
(Linux, OSX and Win) -> Efficient zero-copy for shutil.copy* functions (Linux, 
OSX and Win)

___
Python tracker 

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



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Giampaolo Rodola'

Change by Giampaolo Rodola' :


--
pull_requests: +6795

___
Python tracker 

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



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

PR: https://github.com/python/cpython/pull/7160

--

___
Python tracker 

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



[issue33666] Document removal of os.errno

2018-05-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

And here is a list of names removed in 3.6:

asynchat.fifo
asyncio.coroutines.futures
asyncio.futures.Error
asyncio.futures.reprlib
asyncio.tasks.linecache
asyncio.tasks.traceback
copy.builtins
copy._copy_with_constructor
copy._copy_with_copy_method
copy._EmptyClass
copy.name
copy.PyStringMap
copy.t
copy.weakref
datetime._divide_and_round
distutils.command.config.sys
distutils.command.register.os
distutils.command.register.string
distutils.command.sdist.string
distutils.extension.sys
distutils.text_file.os
email.feedparser.message
email.header._embeded_header
email._header_value_parser._Folded
email.message.warnings
ensurepip._MISSING_SSL_MESSAGE
ensurepip._require_ssl_for_pip
ensurepip.ssl
fileinput.DEFAULT_BUFSIZE
ftplib.os
ftplib.warnings
glob.glob2
http.server._quote_html
importlib._bootstrap_external._BACKCOMPAT_MAGIC_NUMBER
importlib._bootstrap_external._verbose_message
importlib._bootstrap.FileFinder
importlib._bootstrap._ManageReload
importlib._bootstrap._POPULATE
importlib._bootstrap.SourceFileLoader
importlib.util._BACKCOMPAT_MAGIC_NUMBER
importlib.util._Module
inspect.getmoduleinfo
inspect.ModuleInfo
lib2to3.fixer_util.islice
lib2to3.fixes.fix_dict.ArgList
lib2to3.fixes.fix_dict.LParen
lib2to3.fixes.fix_dict.RParen
lib2to3.fixes.fix_dict.token
lib2to3.fixes.fix_exec.pytree
lib2to3.fixes.fix_filter.Call
lib2to3.fixes.fix_filter.token
lib2to3.fixes.fix_has_key.token
lib2to3.fixes.fix_metaclass.Name
lib2to3.fixes.fix_nonzero.syms
lib2to3.fixes.fix_print.is_tuple
lib2to3.fixes.fix_types.token
lib2to3.fixes.fix_urllib.fixer_base
lib2to3.fixes.fix_zip.Call
lib2to3.patcomp.os
lib2to3.patcomp._PATTERN_GRAMMAR_FILE
lib2to3.refactor.bu
lib2to3.refactor.with_statement
multiprocessing.connection.ForkingPickler
multiprocessing.heap.context
multiprocessing.managers.context
multiprocessing.popen_forkserver.context
multiprocessing.popen_spawn_posix.context
multiprocessing.queues.ForkingPickler
multiprocessing.sharedctypes.ForkingPickler
multiprocessing.spawn.pickle
os._DummyDirEntry
os._dummy_scandir
pathlib._cached
pyclbr.itemgetter
pyclbr.os
_pyio.array
re._cache_repl
re.sys
site.aliasmbcs
site.CONFIG_LINE
sre_parse.isdigit
sre_parse.isident
sre_parse.isname
ssl._import_symbols
statistics._decimal_to_ratio
tarfile.TarIter
trace._err_exit
trace.find_executable_linenos
trace.find_lines
trace.find_lines_from_code
trace.find_strings
trace.fullmodname
trace.Ignore
trace.modname
trace.rx_blank
trace.usage
trace._usage
trace._warn
turtledemo.bytedesign.math
turtledemo.planet_and_moon.sleep
typing._geqv
typing._gorg
unittest.mock.DescriptorTypes
unittest.mock._slotted
wsgiref.simple_server.BufferedWriter
xml.etree.ElementTree._IterParseIterator

--

___
Python tracker 

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



[issue33639] Use high-performance os.sendfile() in shutil.copy*

2018-05-28 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Closing as duplicate of #33671.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Efficient zero-copy for shutil.copy* functions (Linux, OSX and 
Win)

___
Python tracker 

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



[issue33639] Use high-performance os.sendfile() in shutil.copy*

2018-05-28 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Closing as duplicate of #33671.

--
stage: resolved -> patch review

___
Python tracker 

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



[issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines

2018-05-28 Thread Yury Selivanov

Change by Yury Selivanov :


--
components: asyncio
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Fix Task.__repr__ crash when trying to format Cython's bogus coroutines
type: behavior
versions: 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



[issue33672] Fix Task.__repr__ crash when trying to format Cython's bogus coroutines

2018-05-28 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue33667] Mock calls on mutable objects

2018-05-28 Thread Lady Red

Lady Red  added the comment:

To have the behavior that you are expecting, I believe the mock would have to 
store a deep copy of every mutable object that is passed in to any of it's 
calls, in case that object later mutates. 

That would really expand the memory and time footprint of working with a Mock 
object.  The mock object would grow with every call to. (This is already true, 
as it's adding to it's mock_calls list... but it would grow much more. )

I'm also not sure about the safety of trying to deepcopy all objects passed in. 

I think that in addition to the safety and memory/performance issues that I've 
highlighted, deepcopying all objects would lead to it's own unintuitive 
behaviors.  Objects you get back from mock_call wouldn't be the objects that it 
was actually called with, they would be copies. 

I am attaching a file that illustrates this last point.

--
nosy: +mcsc...@gmail.com
Added file: https://bugs.python.org/file47622/unintuitive_side_effect.py

___
Python tracker 

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



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-05-28 Thread Giampaolo Rodola'

Change by Giampaolo Rodola' :


--
nosy: +SilentGhost, StyXman, asvetlov, desbma, facundobatista, gps, josh.r, 
martin.panter, ncoghlan, neologix, petr.viktorin, pitrou, python-dev, 
r.david.murray, tarek, vstinner, yselivanov

___
Python tracker 

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



[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-05-28 Thread miss-islington

miss-islington  added the comment:


New changeset 6ec325d48348fb52a421354ba563ff9c1f368054 by Miss Islington (bot) 
in branch '3.6':
bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)
https://github.com/python/cpython/commit/6ec325d48348fb52a421354ba563ff9c1f368054


--

___
Python tracker 

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



[issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

Documenting this would be a great first step.

--

___
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-28 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue33505] Optimize asyncio.ensure_future by reordering if conditions

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset e549c4be5fb010f5faf12236af8faa720a1429be by Yury Selivanov 
(jimmylai) in branch 'master':
bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836)
https://github.com/python/cpython/commit/e549c4be5fb010f5faf12236af8faa720a1429be


--

___
Python tracker 

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



[issue33469] RuntimeError after closing loop that used run_in_executor

2018-05-28 Thread Yury Selivanov

Yury Selivanov  added the comment:

Hopefully asyncio.run() in Python 3.7 will handle this case correctly.

--

___
Python tracker 

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



[issue33505] Optimize asyncio.ensure_future by reordering if conditions

2018-05-28 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6797

___
Python tracker 

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



[issue32591] Deprecate sys.set_coroutine_wrapper and replace it with more focused API(s)

2018-05-28 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue33469] RuntimeError after closing loop that used run_in_executor

2018-05-28 Thread Yury Selivanov


Yury Selivanov  added the comment:

Ah, I see, the callback that tracks the state of the wrapped concurrent.Future 
doesn't check that the loop is closed and its future has been cancelled. I 
think this is a bug.

--

___
Python tracker 

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



[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If issue28308 be implemented, it may be that the Python compiler itself will 
emit a warning.

--

___
Python tracker 

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



[issue33673] Install python-docs-theme even if Sphinx is already installed

2018-05-28 Thread Andrés Delfino

New submission from Andrés Delfino :

python-docs-theme is being installed only if Sphinx is not installed too. PR 
fixes this.

--
components: Demos and Tools
messages: 317892
nosy: adelfino
priority: normal
severity: normal
status: open
title: Install python-docs-theme even if Sphinx is already installed
type: enhancement
versions: 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



[issue33673] Install python-docs-theme even if Sphinx is already installed

2018-05-28 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue33673] Install python-docs-theme even if Sphinx is already installed

2018-05-28 Thread Andrés Delfino

Andrés Delfino  added the comment:

This applies to Windows's make.bat.

--

___
Python tracker 

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



  1   2   3   >