[issue34093] Reproducible pyc: FLAG_REF is not stable.

2018-07-11 Thread INADA Naoki


Change by INADA Naoki :


--
nosy: +benjamin.peterson, serhiy.storchaka

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread INADA Naoki


INADA Naoki  added the comment:

FYI, same constants are shared even when they are in different tuples on 3.6.

For modules having large constant table containing large integer or floats, non 
name-like string, and bytes are affected significantly.

--

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread Tim Peters


Tim Peters  added the comment:

Fine, Serhiy, so reword it a tiny bit:  it's nice if a code object's co_consts 
vector references as few distinct objects as possible.  Still a matter of 
pragmatics, not of correctness.

--

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The co_consts vector is already as short as possible, except cases when tuples 
are created at code generation time, but this is not related to this issue (see 
issue33318 and issue33325).

>>> def f():
... a = (1.0, 1.0)
... b = (1.0, 1.0)
... 
>>> f.__code__.co_consts
(None, (1.0, 1.0))
>>> f.__code__.co_consts[1][0] is f.__code__.co_consts[1][1]
False

--

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread INADA Naoki


INADA Naoki  added the comment:

OK, unless example code this regression affects seriously is shown, I target 
only 3.8.

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread Tim Peters


Tim Peters  added the comment:

The language doesn't define anything about this - any program relying on 
accidental identity is in error itself.

Still, it's nice if a code object's co_consts vector is as short as reasonably 
possible.  That's a matter of pragmatics, not of correctness.

--
nosy: +tim.peters

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is not only with integers.

>>> a = ((1, 2), (1, 2))
>>> a[0] is a[1]
False
>>> a = ('@#$', '@#$')
>>> a[0] is a[1]
False
>>> a = (1.0, 1.0)
>>> a[0] is a[1]
False

The only exception is short ASCII identifier-like strings (as a side effect of 
interning them):

>>> a = ('foo', 'foo')
>>> a[0] is a[1]
True

I'm not sure this is a problem which should be resolved.

--

___
Python tracker 

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



[issue34100] Same integers in a tuple of constant literals are not merged

2018-07-11 Thread INADA Naoki


Change by INADA Naoki :


--
components: +Interpreter Core
keywords: +3.7regression
title: Python doesn't intern integers in a tuple of constant literals -> Same 
integers in a tuple of constant literals are not merged
type: behavior -> resource usage
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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-11 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 9e9b2c32a34594e901b5b9a03c561a2a2bf63ece by INADA Naoki (Zackery 
Spytz) in branch 'master':
bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261)
https://github.com/python/cpython/commit/9e9b2c32a34594e901b5b9a03c561a2a2bf63ece


--

___
Python tracker 

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



[issue34100] Python doesn't intern integers in a tuple of constant literals

2018-07-11 Thread INADA Naoki


INADA Naoki  added the comment:

Thank you for finding it.

I had worked on constant merging. [1]
It didn't fix this case for now.  I'll continue the suspended work.

[1]: https://github.com/methane/cpython/pull/14/files

But it may be a too big to fix only this regression.
How is this regression critical?
If it's important, I'll try to create minimal version of the patch to backport.

--
assignee:  -> inada.naoki

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-11 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-11 Thread Zackery Spytz


Zackery Spytz  added the comment:

The test added in this change uses the deprecated method assertRaisesRegexp(), 
so -Werror will cause test_functools to fail. PR 8261 fixes this.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue33967] functools.singledispatch: Misleading exception when calling without arguments

2018-07-11 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +7794

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-11 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
pull_requests: +7793

___
Python tracker 

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



[issue33937] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI with: [Errno 12] Cannot allocate memory

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on 
Travis CI -> test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on 
Travis CI with: [Errno 12] Cannot allocate memory

___
Python tracker 

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



[issue33937] [3.6] test_socket: SendmsgSCTPStreamTest.testSendmsgTimeout() failed on Travis CI

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Recent failure (17 days ago) on the master branch:

https://travis-ci.org/python/cpython/jobs/396258134

==
ERROR: testSendmsgTimeout (test.test_socket.SendmsgSCTPStreamTest)
--
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, 
in _tearDown
raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, 
in clientRun
test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2648, 
in _testSendmsgTimeout
self.sendmsgToServer([b"a"*512])
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2337, 
in sendmsgToServer
*(args + self.sendmsg_to_server_defaults[len(args):]))
OSError: [Errno 12] Cannot allocate memory
==
FAIL: testSendmsgDontWait (test.test_socket.SendmsgSCTPStreamTest)
--
Traceback (most recent call last):
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 314, 
in _tearDown
raise exc
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 332, 
in clientRun
test_func()
  File "/home/travis/build/python/cpython/Lib/test/test_socket.py", line 2672, 
in _testSendmsgDontWait
(errno.EAGAIN, errno.EWOULDBLOCK))
AssertionError: 12 not found in (11, 11)

--

___
Python tracker 

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


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



[issue33697] test_zipfile.test_write_filtered_python_package() failed on AppVeyor, Python 3.6

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I only saw the failure once.

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren


Oren  added the comment:

You're right - I misread those examples, sorry about that. It looks like my 
former colleague may have invented the bad code in question.


I'm ok with closing as "not a bug" - I do think not fixing it adds a small 
potential friction for people upgrading their version of python, but maybe 
raising an exception is an improvement over silently doing the wrong thing?

--

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Serhiy for the fix! It seems that new tests helped to find a real bug ;-)

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3b06285d2b7963d9d06b60e85712d5ecc6540deb by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
bpo-34080: Fix a memory leak in the compiler. (GH-8222) (GH-8257)
https://github.com/python/cpython/commit/3b06285d2b7963d9d06b60e85712d5ecc6540deb


--

___
Python tracker 

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



[issue30331] TestPOP3_TLSClass: socket.timeout: timed out on AMD64 FreeBSD 10.x Shared 3.x

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see these failures recently, so I close the issue.

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset 9beed0c36f4ce990ded095575ba3124e2264dbbe by Miss Islington (bot) 
in branch '3.7':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/9beed0c36f4ce990ded095575ba3124e2264dbbe


--

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset a45fa39d85fc500d530d05d3ec7b36eb5d286f5e by Miss Islington (bot) 
in branch '2.7':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/a45fa39d85fc500d530d05d3ec7b36eb5d286f5e


--
nosy: +miss-islington

___
Python tracker 

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



[issue30316] test_default_timeout() of test_threading.BarrierTests: random failures on AMD64 FreeBSD CURRENT Debug 3.x

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see these failures since 1 year, so I close the issue.

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



[issue27838] test_os.test_chown() failure on koobs-freebsd-{current, 9}

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failrue since one year, so I close the issue.

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



[issue23859] asyncio: document behaviour of wait() cancellation

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


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



[issue23770] Rework how exceptions are handled in the parser module (in validate_repeating_list())

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I just lost interest in this old patch, I abandon it.

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



[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7792

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7791

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7790

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7789

___
Python tracker 

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



[issue34080] Memory leak in the compiler in case of errors

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 993030aac576710a46b3dd0b4864f819d4a94145 by Victor Stinner 
(Serhiy Storchaka) in branch 'master':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/993030aac576710a46b3dd0b4864f819d4a94145


--

___
Python tracker 

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



[issue34100] Python doesn't intern integers in a tuple of constant literals

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Should the AST optimizer "interns" constants?

--

___
Python tracker 

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



[issue34100] Python doesn't intern integers in a tuple of constant literals

2018-07-11 Thread Mark Dickinson


Mark Dickinson  added the comment:

This was a side-effect of #29469.

--
nosy: +inada.naoki, mark.dickinson, serhiy.storchaka, vstinner

___
Python tracker 

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



[issue34099] Provide debuggers with a way to know that a function is exiting with an unhandled exception.

2018-07-11 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue34100] Python doesn't intern integers in a tuple of constant literals

2018-07-11 Thread Dan Rose


Dan Rose  added the comment:

Another curious case:

a = (500,500); b = (500,500)
print(a[0] is b[0]) # True
print(a[0] is b[1]) # False
print(a[1] is b[0]) # False
print(a[1] is b[1]) # True

--

___
Python tracker 

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



[issue33897] Add a restart option to logging.basicConfig()

2018-07-11 Thread michael kearney


michael kearney  added the comment:

Thank you!
I just stumbled into this problem with logging.basicConfig. In the course of 
trying to find an acceptable workaround I discovered issue 33897 . I downloaded 
3.8.0 and voila my problem is solved.

So, I'll tread lightly, advance to 3.7.0, and keep the latest 3.8.* around for 
surprises.

Regards to you-all in the development front lines.
-m
Is it acceptable to express appreciation in here?

--
nosy: +michael.kearney

___
Python tracker 

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



[issue34100] Python doesn't intern integers in a tuple of constant literals

2018-07-11 Thread Dan Rose


New submission from Dan Rose :

In the Python 3.7.0 interpreter, the following evaluates to False. In 3.6.4, it 
was True:

c,d = 500,500
c is d

This seems to be because, in some cases, Python 3.7 fails to intern integers 
inside tuples:

a = (500,500)
print(a[0] is a[1]) # False

a = (500,500,42)
print(a[0] is a[1]) # False

a = (500,500,'42')
print(a[0] is a[1]) # False

answer = 42
a = (500,500,answer)
print(a[0] is a[1]) # True

a = (500,500,[42])
print(a[0] is a[1]) # True

a = [500,500]
print(a[0] is a[1]) # True

I believe the above should all return True.

--
messages: 321495
nosy: Dan Rose
priority: normal
severity: normal
status: open
title: Python doesn't intern integers in a tuple of constant literals
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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Vinay Sajip


Vinay Sajip  added the comment:

> Here's some evidence that this is true

I'm not sure that's evidence. That example page you linked to has 4 instances 
of handleError: 2 are definitions of overrides, and the other two are calls to 
the superclass method from those overriding methods, which would execute in an 
exception context if the subclass called handleError() correctly (i.e. from an 
exception handler).

--

___
Python tracker 

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



[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Brett Cannon


Change by Brett Cannon :


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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-11 Thread Neil Schemenauer


Change by Neil Schemenauer :


Added file: https://bugs.python.org/file47685/makesetup_fallback_dist.txt

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-11 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

PR 8229 doesn't work if the build dir is separate from the src dir (mentioned 
in the PR comments).  The attached patch (makesetup_fallback_dist.txt) changes 
makesetup to fallback to using $srcdir/Modules/Setup.dist if Modules/Setup 
doesn't exist.  I removed the copying of Setup.dist to Setup.  Also, I removed 
the dependencies in the makefile that look for an out-of-date Setup file and 
the ones that automatically run makesetup.  There is now a "makesetup" target 
with no deps.  You would have to run "make makesetup" if you want to regenerate 
config.c and the Makefile.  Otherwise, running "configure" would also do the 
job.

One possible issue with the patch: I expect that some build systems expect 
that, after configure, Modules/Setup will exist in the build dir and can be 
modified.  For that reason, I think a better fix is to make 'configure' 
unconditionally create Modules/Setup from $srcdir/Modules/Setup.dist.

I'm attaching as a patch as I'm not sure about creating a bunch of half-baked 
PRs to show ideas.  It seems to me that a small patch as a text attachment is 
better.  Maybe I'm a dinosaur. ;-P

--
nosy: +nascheme -yan12125

___
Python tracker 

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



[issue34099] Provide debuggers with a way to know that a function is exiting with an unhandled exception.

2018-07-11 Thread Fabio Zadrozny


New submission from Fabio Zadrozny :

Right now, debuggers can deal with handled exceptions by detecting the 
'exception' event, but it's hard to know if the exception is handled or 
unhandled at that point (so, debuggers end up checking if it happens in a 
top-level function, but this isn't good if the user started the code and did a 
remote attach later on, where the top-level code is still user code).

My suggestion would be creating another event type (such as 'exception_return') 
which would be issued after the 'return' event with the same information passed 
on the 'exception' info so that debuggers can detect that some exception is 
unhandled (the 'return' would still be issued as usual to minimize breakage to 
existing debuggers).

Another option could be adding that information to the frame itself during a 
'return' event (and then removing right after calling the debugger to avoid any 
cycles) -- although I think the other option is better to avoid making the 
frame bigger.

--
components: Interpreter Core
messages: 321492
nosy: fabioz
priority: normal
severity: normal
status: open
title: Provide debuggers with a way to know that a function is exiting with an 
unhandled exception.
type: enhancement
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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-11 Thread Rodrigo Pinheiro Marques de Araújo

Rodrigo Pinheiro Marques de Araújo  added the comment:

Unfortunately with 'PYTHONMALLOC=debug' the segmentation fault do not happen.

--

___
Python tracker 

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



[issue18971] Use argparse in the profile/cProfile modules

2018-07-11 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue34089] Remove required (non-optional) modules from Modules/Setup.dist

2018-07-11 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-07-11 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren


Oren  added the comment:

The code that was causing this problem looked something like:

--
def emit(self, record):
  ...
  response = requests.post(...)
  if not response.ok:
 self.handleError(record)
  ...
--

In this case, something does apparently go wrong, but it doesn't actually 
involve an exception.

I assume that I'm not the only person in the world dealing with a code base 
where handleError was misused like this.

Here's some evidence that this is true: 
https://www.programcreek.com/python/example/619/logging.Handler (search for 
handleError in the page)

--

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset ec7562068fd123969ab4d27e11f4070271c72e16 by Miss Islington (bot) 
in branch '3.6':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/ec7562068fd123969ab4d27e11f4070271c72e16


--

___
Python tracker 

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



[issue33155] Use super().method instead in Logging

2018-07-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I agree that this shouldn't be done for logging and that likely it shouldn't be 
done for most modules.

--
nosy: +rhettinger
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue34084] possible free statically allocated string in compiler when easter egg on

2018-07-11 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

AFAICT, that future only works in the REPL.

--

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset 48d2aeb009f8e58b1efae00ee0e225951b58737e by Miss Islington (bot) 
in branch '3.7':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/48d2aeb009f8e58b1efae00ee0e225951b58737e


--
nosy: +miss-islington

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ef19fd200d0768919f1658466f8b6080b191fba0 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192). (GH-8255)
https://github.com/python/cpython/commit/ef19fd200d0768919f1658466f8b6080b191fba0


--

___
Python tracker 

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



[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Bruce Richardson


Bruce Richardson  added the comment:

Ah, doh. my bad.

On 11 July 2018 at 16:09, Zachary Ware  wrote:

>
> Zachary Ware  added the comment:
>
> I don't agree with your conclusion here: importlib2 is a PyPI package that
> backports Python 3's importlib to Python 2, thus the ImportError will only
> be raised on Python 2 with the example as written.
>
> --
> nosy: +zach.ware
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7788

___
Python tracker 

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Vinay Sajip


Vinay Sajip  added the comment:

For the crash to occur, it would have to be a handleError() called wrongly, 
when something didn't apparently go wrong (i.e. a call from outside an 
exception handling clause). So I'm not sure I follow your logic.

I agree the change you propose is simple, but that's an orthogonal concern, IMO.

--

___
Python tracker 

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



[issue34098] multiprocessing.Server swallows original exception traceback

2018-07-11 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren


Oren  added the comment:

I totally agree that this involves misusing handleError. I ended up fixing the 
code that originally caused the problem, since it was wrong in the first place.

The reason I filed this bug and that I think it's worth fixing is that in 
previous versions, the problem would be that something might not get logged as 
expected; now the problem turns into a crash.

Not only is it now a crash, but the code that crashes requires something else 
to go wrong (we're not calling handleError() because everything went right), 
which means that applications that previously tolerated something going wrong, 
now break.

If the necessary fix was complicated, I could see the wisdom in not fixing it, 
but since it's simple, why not?

--

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

_PyType_Lookup doesn't set an exception. But if an exception was raised inside, 
it will be cleared, and this will clear an exception if it was raised before 
_PyType_Lookup. assert() is needed for guaranteeing that no exception will be 
lost.

I'm +1 for saving/restoring (or rather chaining) the exception.

--

___
Python tracker 

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



[issue34098] multiprocessing.Server swallows original exception traceback

2018-07-11 Thread Guilherme Salgado


New submission from Guilherme Salgado :

multiprocessing.Server swallows original exception traceback, making it hard to 
debug. For example, the following code:

```
from multiprocessing.managers import BaseManager

class FooBar(object):
def m(self):
self._raise()
def _raise(self):
raise ValueError

class MyManager(BaseManager):
pass

MyManager.register('Foo', callable=FooBar)
manager = MyManager()
manager.start()
manager.Foo()._callmethod('m')
manager.shutdown()
```
Gives me the following exception:

```
Traceback (most recent call last):
  File "/tmp/foo.py", line 15, in 
manager.Foo()._callmethod('m')
  File "/usr/lib/python3.6/multiprocessing/managers.py", line 772, in 
_callmethod
raise convert_to_error(kind, result)
ValueError
```

Ideally, I'd like to get something like this:

```
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/salgado/src/cpython/Lib/multiprocessing/managers.py", line 254, 
in serve_client
res = function(*args, **kwds)
  File "/tmp/foo.py", line 5, in m
self._raise()
  File "/tmp/foo.py", line 7, in _raise
raise ValueError
ValueError
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/foo.py", line 15, in 
manager.Foo()._callmethod('m')
  File "/home/salgado/src/cpython/Lib/multiprocessing/managers.py", line 811, 
in _callmethod
raise convert_to_error(kind, result)
ValueError
```

--
components: Library (Lib)
messages: 321480
nosy: salgado
priority: normal
severity: normal
status: open
title: multiprocessing.Server swallows original exception traceback
type: enhancement
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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2018-07-11 Thread Yury Selivanov


Yury Selivanov  added the comment:

> I don't see why asyncio should prevent people to experiment their own custom 
> executor. You can imagine a custom "green executor" which inherit from 
> Executor but uses its own black magic like greenlet.

Because asyncio and its ecosystem is built around the fact that the default 
executor is a ThreadPoolExecutor.

asyncio users are free to:

1. Pass any kind of executor as a first argument to `loop.run_in_executor()` -- 
no restrictions there.

2. Pass a subclass of ThreadPoolExecutor to `loop.set_default_executor()` -- 
that's how people can experiment.

Mind that (2) also covers exotic use cases like using greenlets under the hood 
(although I don't think it's possible), as long as they subclass 
ThreadPoolExecutor.

My plan so far: 

* in 3.8 add a DeprecationWarning if an executor other than ThreadPoolExecutor 
is set as a default one.

* during 3.8 see what kind of feedback we get.

* if all goes great, in 3.9 we'll only allow subclasses of ThreadPoolExecutor.

--

___
Python tracker 

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



[issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Ah, I see. Can you try to get the Python traceback and/or C traceback using gdb?

--

___
Python tracker 

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



[issue34094] Porting Python 2 to Python 3 example contradicts its own advice

2018-07-11 Thread Zachary Ware


Zachary Ware  added the comment:

I don't agree with your conclusion here: importlib2 is a PyPI package that 
backports Python 3's importlib to Python 2, thus the ImportError will only be 
raised on Python 2 with the example as written.

--
nosy: +zach.ware

___
Python tracker 

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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

> Other than subclasses of thread executor, what are you going to pass in?

I don't see why asyncio should prevent people to experiment their own custom 
executor. You can imagine a custom "green executor" which inherit from Executor 
but uses its own black magic like greenlet. People like to do crazy things to 
implement asynchronous programming :-)

--

___
Python tracker 

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



[issue33155] Use super().method instead in Logging

2018-07-11 Thread Vinay Sajip


Vinay Sajip  added the comment:

See the comments on bpo-31853. I agree with the consensus there that these 
changes aren't worth doing:

msg314518
msg314520
msg314521

So, I propose to close this as "not a bug" which in this context means "not an 
enhancement that's worth doing".

--

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

> res = PyObject_CallMethodObjArgs(self, _PyIO_str_flush, NULL);
> assert(!PyErr_Occurred()); /* < THIS ASSERTION FAILS */

Using this additional assertion, test_io also fails on 
test_flush_error_on_close().

--

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Stefan Behnel: "I added this assertion exactly for the purpose of finding this 
kind of bug. It means that some code tried to look up an attribute with a live 
exception set, which previously could swallow the exception in certain 
situations, and even if not, it is always the wrong thing to do."

The assertion failure is a little bit "far" from the bug: would it make sense 
to add "assert(!PyErr_Occurred());" to the entry point of:

* PyObject_HasAttr()
* PyObject_SetAttr()
* PyObject_SetAttrString()
* _PyObject_SetAttrId()
* type_getattro()
* slot_tp_getattr_hook()
* and other similar functions?

A few years ago, I added "assert(!PyErr_Occurred());" to the entry point of C 
functions which can call arbitrary code like _PyEval_EvalFrameDefault(), 
PyObject_Call(), etc. It helped to find many bugs.

--

___
Python tracker 

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



[issue34067] Problem with contextlib.nullcontext

2018-07-11 Thread Nick Coghlan


Nick Coghlan  added the comment:

Right, the merged PR adds a simpler example that handles "ignore exceptions or 
not" by selecting between suppress() and nullcontext().

The documentation still needs updating to improve or remove the file-based 
example, and point out that for resources that get acquired on construction, 
you either need to delay construction to the start of the with statement, or 
else use ExitStack instead of nullcontext.

--

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I'm able to reproduce the bug on my Fedora using:

vstinner@apu$ gdb -args ENV/bin/python -m coverage run  --pylib -m test 
--fail-env-changed -uall,-cpu  test_urllib -F
(gdb) run

python: Objects/typeobject.c:3086: _PyType_Lookup: Assertion 
`!PyErr_Occurred()' failed.

Program received signal SIGABRT, Aborted.
0x77093f2b in raise () from /lib64/libc.so.6

(gdb) py-bt
Traceback (most recent call first):
  
  File "/home/vstinner/prog/python/master/Lib/http/client.py", line 405, in 
close
super().close() # set "closed" flag
  File "/home/vstinner/prog/python/master/Lib/traceback.py", line 216, in 
clear_frames
tb.tb_frame.clear()
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 205, in 
__exit__
traceback.clear_frames(tb)
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 178, in 
handle
callable_obj(*args, **kwargs)
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 743, in 
assertRaises
return context.handle('assertRaises', args, kwargs)
  File "/home/vstinner/prog/python/master/Lib/test/test_urllib.py", line 382, 
in test_redirect_limit_independent
"http://something;)
  (...)

(gdb) where
#0  0x77093f2b in raise () from /lib64/libc.so.6
#1  0x7707e561 in abort () from /lib64/libc.so.6
#2  0x7707e431 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3  0x7708c692 in __assert_fail () from /lib64/libc.so.6
#4  0x004aa2ea in _PyType_Lookup (type=0xdc1b30, 
name='__IOBase_closed') at Objects/typeobject.c:3086
#5  0x004883ff in _PyObject_GenericSetAttrWithDict (
obj=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', 
length=None, will_close=True, code=302, _finalizing=True) at remote 
0x7fffe581ff50>, name='__IOBase_closed', value=True, dict=0x0) at 
Objects/object.c:1292
#6  0x0048871a in PyObject_GenericSetAttr (
obj=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', 
length=None, will_close=True, code=302, _finalizing=True) at remote 
0x7fffe581ff50>, name='__IOBase_closed', value=True) at Objects/object.c:1340
#7  0x004873a0 in PyObject_SetAttr (
v=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', 
length=None, will_close=True, code=302, _finalizing=True) at remote 
0x7fffe581ff50>, name='__IOBase_closed', value=True) at Objects/object.c:977
#8  0x00486f03 in _PyObject_SetAttrId (
v=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', 
length=None, will_close=True, code=302, _finalizing=True) at remote 
0x7fffe581ff50>, name=0x9d4330 , w=True) at 
Objects/object.c:857
#9  0x00625d9c in _io__IOBase_close_impl (
self=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', chunked=False, chunk_left='UNKNOWN', 
length=None, will_close=True, code=302, _finalizing=---T---Type ---Type 
---Type ---Type 
 to ---Type ---Type ---T---Type ---Type 
---T---Type  to continue, or q  to quit---
) at remote 0x7fffe581ff50>) at ./Modules/_io/iobase.c:239
#10 0x00627e12 in _io__IOBase_close (
self=, 
debuglevel=0, _method='GET', headers=, _headers=[('Location', 
'file://guidocomputer.athome.com:/python/license'), ('Connection', 'close')], 
_unixfrom=None, _payload='', _charset=None, preamble=None, epilogue=None, 
defects=[], _default_type='text/plain') at remote 0x7fffe542f4d0>, msg=<...>, 
version=11, status=302, reason='Found', 

[issue34011] Default preference not given to venv DLL's

2018-07-11 Thread Vinay Sajip


Change by Vinay Sajip :


--
keywords: +patch
pull_requests: +7785
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



[issue34095] [2.7] test_idle fails with: /usr/bin/xvfb-run: line 181: 3617 Segmentation fault

2018-07-11 Thread Eli Schwartz


Eli Schwartz  added the comment:

Note the last line, which shows that the testsuite itself is executed using 
xvfb-run.

The archlinux32 build script is based off the original PKGBUILD for archlinux: 
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/python2

xvfb-run is only involved, because the testsuite depends on being run in a GUI 
environment in order to test GUI components...

--
nosy: +eschwartz

___
Python tracker 

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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2018-07-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I disagree. Other than subclasses of thread executor, what are you going to
pass in? A mock?

On Wed, Jul 11, 2018 at 7:34 AM STINNER Victor 
wrote:

>
> STINNER Victor  added the comment:
>
> > I think we'll only allow instances of c.f.ThreadPoolExecutor (and its
> subclasses) to be passed to set_default_executor.  That's a more robust
> check than just guarding against ProcessPoolExecutor.
>
> I suggest to only reject ProcessPoolExecutor, instead of having a very
> specific test on ThreadPoolExecutor which might fail with funky but valid
> thread executor.
>
> --
> nosy: +vstinner
>
> ___
> Python tracker 
> 
> ___
>
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue30400] Race condition in shutil.copyfile(): source file replaced file during copy

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

> The definitive solution to this problem would theoretically be to have all 
> these interconnected functions pass fds instead of "paths" but of course that 
> is hardly possible.

I agree that it's the way to go.

Python makes little difference between a path and file descriptor. For example, 
os.stat() accepts both a filename (string) or a file descriptor (integer).

Even if we cannot fix everything, it makes sense to me to try to fix at least 
shutil.copyfile(). Even we cannot modify existing other public copy*() 
functions to handle file descriptors, maybe we can add private helper functions 
accepting file descriptors, and modify existing public functions to reuse them?

--
nosy: +vstinner

___
Python tracker 

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



[issue33648] unused with_c_locale_warning option in configure should be removed

2018-07-11 Thread miss-islington


miss-islington  added the comment:


New changeset 020f5ab7170836b277ac8fef2ce7438ae0145caf by Miss Islington (bot) 
in branch '3.7':
bpo-33648: Remove PY_WARN_ON_C_LOCALE (GH-7114)
https://github.com/python/cpython/commit/020f5ab7170836b277ac8fef2ce7438ae0145caf


--
nosy: +miss-islington

___
Python tracker 

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



[issue34068] traceback.clear_frames(): Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: Assertion failure in _PyType_Lookup -> traceback.clear_frames(): 
Objects/typeobject.c:3086: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7784

___
Python tracker 

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



[issue30400] Race condition in shutil.copyfile(): source file replaced file during copy

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: Race condition in shutil.copyfile() -> Race condition in 
shutil.copyfile(): source file replaced file during copy

___
Python tracker 

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Vinay Sajip


Vinay Sajip  added the comment:

It seems innocuous enough, but the documentation for handleError() does say: 
"This method should be called from handlers when an exception is encountered 
during an emit() call."

That documentation is the same for 2.x and 3.x. This is not how you are using 
it. What happens if you just raise an Exception from your transmit() method, 
and just call transmit() from within emit() without making a condition of the 
return value?

--

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7783

___
Python tracker 

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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions: +Python 3.6, Python 3.7, Python 3.8 -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



[issue23927] getargs.c skipitem() doesn't skip 'w*'

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 504373c59b48f1ea12132d515459022730db6047 by Serhiy Storchaka in 
branch 'master':
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
https://github.com/python/cpython/commit/504373c59b48f1ea12132d515459022730db6047


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34097] ZIP does not support timestamps before 1980

2018-07-11 Thread Marcel Plch


Marcel Plch  added the comment:

I'm going to have a closer look at this and try to add the option.

--
nosy: +Dormouse759

___
Python tracker 

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



[issue34067] Problem with contextlib.nullcontext

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

No, the merged PR is not directly related to the original issue.

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Can we close this issue? It seems like the bug has been fixed, no?

--
nosy: +vstinner

___
Python tracker 

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



[issue34067] Problem with contextlib.nullcontext

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

Can we close this issue?

--
nosy: +vstinner

___
Python tracker 

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



[issue34097] ZIP does not support timestamps before 1980

2018-07-11 Thread Petr Viktorin


New submission from Petr Viktorin :

The ZIP format cannot handle times before 1980.
Issue6090 provided a nice error message for trying to add such files.

I'm seeing a system for reproducible builds that sets mtime to 1970 (zero UNIX 
timestamp), resulting in files that Python can't package into (zip-based) 
wheels.

At least here on Fedora, the `zip` command-line utility silently bumps old 
timestamps to 1980-01-01. Of course, silently corrupting data would not be good 
default behavior for Python.
But in many cases timestamps don't matter. It would be nice to give ZipFile and 
ZipFile.write() a `strict_timestamps=True` keyword argument that could be 
turned off.

--
components: Library (Lib)
messages: 321460
nosy: petr.viktorin
priority: normal
severity: normal
status: open
title: ZIP does not support timestamps before 1980
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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

> I think we'll only allow instances of c.f.ThreadPoolExecutor (and its 
> subclasses) to be passed to set_default_executor.  That's a more robust check 
> than just guarding against ProcessPoolExecutor.

I suggest to only reject ProcessPoolExecutor, instead of having a very specific 
test on ThreadPoolExecutor which might fail with funky but valid thread 
executor.

--
nosy: +vstinner

___
Python tracker 

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



[issue34075] asyncio: We should prohibit setting a ProcessPoolExecutor in with set_default_executor

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: We should prohibit setting a ProcessPoolExecutor in with 
set_default_executor -> asyncio: We should prohibit setting a 
ProcessPoolExecutor in with set_default_executor

___
Python tracker 

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



[issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition)

2018-07-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Shouldn't this be considered as a new feature? There are no guaranties that 
shutil.rmtree() should work if files or directories are concurrently removed, 
or created, or made read-only in other threads or processes.

--

___
Python tracker 

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



[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I agree that sndhdr.what() should return None and not raise an exception if the 
file format is not supported or the file is invalid.

--
keywords: +easy
nosy: +vstinner
title: sndhdr.what() throws exceptions on unknown files -> [EASY] sndhdr.what() 
throws exceptions on unknown files

___
Python tracker 

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



[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +easy
title: imaplib noop Debug -> [EASY] imaplib noop Debug: bytes vs Unicode bug in 
debug mode

___
Python tracker 

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



[issue32729] socket.readinto() doesn't catch TimeoutError

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

According to the reporter, it's not a bug in Python.

--
nosy: +vstinner
resolution: fixed -> not a bug
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



[issue32729] socket.readinto() doesn't catch TimeoutError

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: socket error handling needed -> socket.readinto() doesn't catch 
TimeoutError
versions:  -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition)

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33980] distutils upload: SSL Error when uploading package to your own pypi

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: SSL Error when uploading package to your own pypi -> distutils upload: 
SSL Error when uploading package to your own pypi

___
Python tracker 

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



[issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: repr(task) raises AssertionError for coros which loop.create_task 
accepts; complications ensue -> asyncio: repr(task) raises AssertionError for 
coros which loop.create_task accepts; complications ensue

___
Python tracker 

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



[issue33729] Hashlib/blake2* missing 'data' keyword argument

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

> None of the hashlib functions are taking keyword arguments for data: ...

So it's just a documentation issue, no?

https://docs.python.org/dev/library/hashlib.html#creating-hash-objects

Juuso Lehtivarjo: do you want to write a pull request to fix the documentation?

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, vstinner

___
Python tracker 

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



[issue34087] django: segmentation fault on garbage collection in visit_decref()

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: Segmentation fault on visit_decref -> django: segmentation fault on 
garbage collection in visit_decref()

___
Python tracker 

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



  1   2   3   >