[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset d59f97c8325ba509c9b08d488091f45ca642f0b6 by INADA Naoki in branch 
'3.6':
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395)
https://github.com/python/cpython/commit/d59f97c8325ba509c9b08d488091f45ca642f0b6


--

___
Python tracker 

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



[issue16865] ctypes arrays >=2GB in length causes exception

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7068

___
Python tracker 

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



[issue33778] update Unicode database to 11.0

2018-06-05 Thread Benjamin Peterson


Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue33778] update Unicode database to 11.0

2018-06-05 Thread Benjamin Peterson


New submission from Benjamin Peterson :

http://blog.unicode.org/2018/06/announcing-unicode-standard-version-110.html

--
assignee: benjamin.peterson
components: Unicode
messages: 318799
nosy: benjamin.peterson, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: update Unicode database to 11.0
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



[issue33776] Segfault when passing invalid argument to asyncio.ensure_future

2018-06-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

Thanks for reporting it.  Looks like this has been fixed in 3.6 (not yet 
released) and 3.7.0b5 in issue 33584.

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



[issue33625] Release GIL for grp.getgr{nam, gid} and pwd.getpw{nam, uid}

2018-06-05 Thread Ned Deily


Ned Deily  added the comment:

With the updated PR that uses reentrant system functions if available, this now 
seems like a pretty big change to be adding to older maintenance releases, 
especially since it seems like it would be primarily a performance enhancement 
and not fixing a "repeatable" bug.  I don't think we should backport this to 
3.6 or 2.7.  If we can get it in prior to 3.7.0rc1, I'd be kinda OK with 
backporting to 3.7.  Sound OK?

--
nosy: +ned.deily
versions:  -Python 2.7, Python 3.6

___
Python tracker 

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



[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2018-06-05 Thread Nate Atkinson


Nate Atkinson  added the comment:

I notice that I maybe have inadvertently assigned this to the wrong group. I 
suspect that this should apply to the "Library" rather than "Core". Sorry!

--

___
Python tracker 

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



[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2018-06-05 Thread Nate Atkinson


New submission from Nate Atkinson :

Here's what I expect to happen (Python2 behavior):


Python 2.7.14+ (default, Dec  5 2017, 15:17:02)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from dummy_threading import Thread
>>> def f(): print 'foo'
...
>>> t = Thread(target=f)
>>> t.start()
foo
>>> t.is_alive()
False
>>>




Here's what actually happens (Python3.6):


Python 3.6.4 (default, Jan  5 2018, 02:13:53)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from dummy_threading import Thread
>>> def f(): print('foo')
...
>>> t = Thread(target=f)
>>> t.start()
foo
>>> t.is_alive()
True
>>>



After completion of the target function, I would expect .is_alive() to return 
False for an instance of dummy_thread.Thread. Instead, it returns True until 
the .join() method of the instance of dummy_thread.Thread is called.

--
components: Interpreter Core
messages: 318795
nosy: njatkinson
priority: normal
severity: normal
status: open
title: dummy_threading: .is_alive method returns True after execution has 
completed
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue33776] Segfault when passing invalid argument to asyncio.ensure_future

2018-06-05 Thread Jason McKellar


New submission from Jason McKellar :

If time.monotonic() is yielded from a generator that is passed to 
asyncio.ensure_future a segfault occurs when it's scheduled. 

The example below shows time.monotonic called in the generator, however the 
segfault will also occur if a function is called (not a lambda) that uses 
time.monotonic.

I've tested on Python 3.6 and 3.7.0b4.


For example:

import asyncio
import time
import faulthandler

faulthandler.enable()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

# Note that ensure_future argument is generator
# which yields time.monotonic() return value
tasks = [asyncio.ensure_future(
time.monotonic()
for i in range(1)
)]
results_future = asyncio.gather(*tasks)

# Segmentation fault
results = loop.run_until_complete(results_future)


The fault handler output:

Fatal Python error: Segmentation fault

Current thread 0x7f4b7a042b88 (most recent call first):
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88 in _run
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1738 in _run_once
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 521 in 
run_forever
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 553 in 
run_until_complete
  File "/test-seg.py", line 19 in 
Segmentation fault (core dumped)


An example with time.monotonic call nested in a function:

import asyncio
import time
import faulthandler

def bad():
return {'nested': time.monotonic()}

faulthandler.enable()

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

tasks = [asyncio.ensure_future(
bad()
for i in range(1)
)]
results_future = asyncio.gather(*tasks)

# Segmentation fault
results = loop.run_until_complete(results_future)

--
components: asyncio
messages: 318794
nosy: Jason McKellar, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Segfault when passing invalid argument to asyncio.ensure_future
type: crash
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue33774] Document that @lru_cache caches based on exactly how the function arguments are specified

2018-06-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sure, I can add a line mentioning that distinct argument patterns may be 
considered as distinct cache entries even though they otherwise seem to be 
equivalent calls.  That will just be a general statement though. 
The specific details are implementation dependent, have changed over time, and 
may change again in the future.

--
assignee: docs@python -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread INADA Naoki


Change by INADA Naoki :


--
pull_requests: +7065

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset d6e789c402330905b1bd9103538d1027fcfb08a4 by Miss Islington (bot) 
in branch '3.7':
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395)
https://github.com/python/cpython/commit/d6e789c402330905b1bd9103538d1027fcfb08a4


--
nosy: +miss-islington

___
Python tracker 

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



[issue33610] IDLE: Make multiple improvements to CodeContext

2018-06-05 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Menu location:

If Code Context is moved under Windows, maybe Configure IDLE should be moved as 
well?  

- VS Code has Preferences under the File menu.
- Spyder has a menu option called Tools which contains Preferences, Update 
PYTHONPATH manager, and Reset Spyder to defaults
- Atom has Preferences under the Edit menu.
- Sublime Text has a menu called Preferences.
- Notepad++ has a menu called Settings, which includes Preferences.

--

___
Python tracker 

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



[issue33504] configparser should use dict instead of OrderedDict in 3.7+

2018-06-05 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue33504] configparser should use dict instead of OrderedDict in 3.7+

2018-06-05 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 3a5b0d8988491d9408b22bceea6fd70b91345724 by Łukasz Langa (John 
Reese) in branch 'master':
bpo-33504: Migrate configparser from OrderedDict to dict. (#6819)
https://github.com/python/cpython/commit/3a5b0d8988491d9408b22bceea6fd70b91345724


--

___
Python tracker 

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



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-05 Thread Dmitry


Dmitry  added the comment:

@taleinat - yes, that does look much better!

--

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

> buildbot@stormageddon ~/python27 $ ./python -m test -v -m 'test_interrupted*' 
> -F test_io

I'm unable to reproduce this issue on my Fedora 28 laptop (Linux kernel 
4.16.11-300.fc28.x86_64). In the previous message, I reproduced the issue 
directly on Zach's Gentoo buildbot builder.

--

___
Python tracker 

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



[issue33775] argparse: the word 'default' (in help) is not marked as translatable

2018-06-05 Thread woutgg


woutgg  added the comment:

Note: the line number in the link is not correct anymore, I'm not sure how to 
link to a specific commit so here is the source line: `help += ' (default: 
%(default)s)'`.

--

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, issues with test_io.test_interrupted*() are old. See for example the 
bpo-23680.

Two years ago,  Martin Panter saw test_io.test_interrupted_write_text() hangs 
on Python 3.6 and on AMD64 FreeBSD 9.x 3.5:
https://bugs.python.org/issue22331#msg266688
https://bugs.python.org/issue22331#msg266725

Martin proposed a fix using signal.pthread_kill() rather than scheduling a 
SIGALRM signal in 1 second, but the fix was not merged and I closed the issue 
since I didn't see the issue recently.

--

___
Python tracker 

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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, I succeeded to reproduce a hang in test_io using the command:

***
buildbot@stormageddon ~/python27 $ ./python -m test -v -m 'test_interrupted*' 
-F test_io
(...)
0:04:38 load avg: 3.36 [ 44] test_io
test_interrupted_write_buffered (test.test_io.CSignalsTest) ... ok
test_interrupted_write_text (test.test_io.CSignalsTest) ... ok
test_interrupted_write_unbuffered (test.test_io.CSignalsTest) ... ok
test_interrupted_write_buffered (test.test_io.PySignalsTest) ... ok
test_interrupted_write_text (test.test_io.PySignalsTest) ... ok
test_interrupted_write_unbuffered (test.test_io.PySignalsTest) ... ok

--
Ran 6 tests in 6.167s

OK
0:04:45 load avg: 3.65 [ 45] test_io
test_interrupted_write_buffered (test.test_io.CSignalsTest) ... ok
test_interrupted_write_text (test.test_io.CSignalsTest) ... ok
test_interrupted_write_unbuffered (test.test_io.CSignalsTest) ... ok
test_interrupted_write_buffered (test.test_io.PySignalsTest) ... ok
test_interrupted_write_text (test.test_io.PySignalsTest) ... 
***

Traces in gdb of the stuck process:

***
(gdb) py-bt
Traceback (most recent call first):
  Waiting for the GIL
  
  File "/buildbot/python27/Lib/threading.py", line 340, in wait
waiter.acquire()
  File "/buildbot/python27/Lib/threading.py", line 940, in join
self.__block.wait()
  File "/buildbot/python27/Lib/test/test_io.py", line 3161, in 
check_interrupted_write
t.join()
  File "/buildbot/python27/Lib/test/test_io.py", line 3186, in 
test_interrupted_write_text
self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii")
  File "/buildbot/python27/Lib/unittest/case.py", line 329, in run
testMethod()
  File "/buildbot/python27/Lib/unittest/case.py", line 393, in __call__
return self.run(*args, **kwds)
  File "/buildbot/python27/Lib/unittest/suite.py", line 108, in run
test(result)
  File "/buildbot/python27/Lib/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
  File "/buildbot/python27/Lib/unittest/suite.py", line 108, in run
test(result)
  File "/buildbot/python27/Lib/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
  File "/buildbot/python27/Lib/unittest/runner.py", line 151, in run
test(result)
  File "/buildbot/python27/Lib/test/support/__init__.py", line 1535, in 
_run_suite
result = runner.run(suite)
  File "/buildbot/python27/Lib/test/support/__init__.py", line 1626, in 
run_unittest
_run_suite(suite)
  File "/buildbot/python27/Lib/test/test_io.py", line 3367, in test_main
support.run_unittest(*tests)
  File "/buildbot/python27/Lib/test/regrtest.py", line 1236, in runtest_inner
indirect_test()
  File "/buildbot/python27/Lib/test/regrtest.py", line 1044, in runtest
return runtest_inner(test, verbose, quiet, huntrleaks, pgo, testdir)
  File "/buildbot/python27/Lib/test/regrtest.py", line 837, in local_runtest
testdir=testdir)
  File "/buildbot/python27/Lib/test/regrtest.py", line 851, in main
result = local_runtest()
  File "/buildbot/python27/Lib/test/regrtest.py", line 2025, in main_in_temp_cwd
main()
  File "/buildbot/python27/Lib/test/__main__.py", line 3, in 
regrtest.main_in_temp_cwd()
  File "/buildbot/python27/Lib/runpy.py", line 72, in _run_code
exec code in run_globals
  File "/buildbot/python27/Lib/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)

(gdb) info threads
  Id   Target Id Frame 
* 1Thread 0xb7518700 (LWP 14442) "python" 0xb7772b49 in __kernel_vsyscall ()
  2Thread 0xb6b36b40 (LWP 18865) "python" 0xb7772b49 in __kernel_vsyscall ()

(gdb) t 2
[Switching to thread 2 (Thread 0xb6b36b40 (LWP 18865))]
#0  0xb7772b49 in __kernel_vsyscall ()

(gdb) py-bt
Traceback (most recent call first):
  
  File "/buildbot/python27/Lib/test/test_io.py", line 3141, in _read
s = os.read(r, 1)
  File "/buildbot/python27/Lib/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
  File "/buildbot/python27/Lib/threading.py", line 801, in __bootstrap_inner
self.run()
  File "/buildbot/python27/Lib/threading.py", line 774, in __bootstrap
self.__bootstrap_inner()
***

And now I recall how much I hate this test. It made me crazy in Python 2 for a 
long time.

This specific test was my motiviation to add signal.pthread_sigmask() to Python 
3.3.

Note: I also implemented the PEP 475 in Python 3.5 to make Python more reliable 
when getting signals.

--

___
Python tracker 

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



[issue33775] argparse: the word 'default' (in help) is not marked as translatable

2018-06-05 Thread woutgg


New submission from woutgg :

The word 'default', used to indicate default arguments in the help text (found 
here: Lib/argparse.py:681) is missing the gettext wrapper, causing it to be 
untranslatable.

--
messages: 318784
nosy: woutgg
priority: normal
severity: normal
status: open
title: argparse: the word 'default' (in help) is not marked as translatable
type: behavior

___
Python tracker 

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



[issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed

2018-06-05 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



[issue31731] [2.7] test_io hangs on x86 Gentoo Refleaks 2.7

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

I succeeded to attach gdb to a regrtest slave process stuck in test_io... but 
somehow attaching the process into gdb unblocked the process... and the test 
completed.


Sadly, the first time that I attached the process, I forgot to allow a 
directory to load python-gdb.py. So I had to detach and attach again the 
process to get a working "py-bt" command. Maybe this action unblocked Python. 
It's hard to say.

(gdb) py-bt
Traceback (most recent call first):
  File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/_pyio.py", 
line 1126, in _flush_unlocked
def _flush_unlocked(self):
  File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/_pyio.py", 
line 1104, in write
self._flush_unlocked()
  File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/_pyio.py", 
line 1302, in write
return BufferedWriter.write(self, b)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/test_io.py", 
line 1186, in check_writes
self.assertEqual(bufio.write(contents[n:n+size]), size)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/test_io.py", 
line 1723, in test_writes_and_peek
self.check_writes(_peek)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", 
line 329, in run
testMethod()
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", 
line 393, in __call__
return self.run(*args, **kwds)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", 
line 108, in run
test(result)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", 
line 70, in __call__
return self.run(*args, **kwds)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", 
line 108, in run
test(result)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", 
line 70, in __call__
return self.run(*args, **kwds)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py",
 line 1461, in run
test(result)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py",
 line 1535, in _run_suite
result = runner.run(suite)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py",
 line 1626, in run_unittest
_run_suite(suite)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/test_io.py", 
line 3367, in test_main
support.run_unittest(*tests)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 1361, in run_the_test
indirect_test()
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 1375, in dash_R
run_the_test()
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 1239, in runtest_inner
huntrleaks)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 1044, in runtest
return runtest_inner(test, verbose, quiet, huntrleaks, pgo, testdir)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 513, in main
result = runtest(*args, **kwargs)
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 2025, in main_in_temp_cwd
main()
  File 
"/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", 
line 2038, in 
main_in_temp_cwd()
  File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", 
line 72, in _run_code
exec code in run_globals
  File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/runpy.py", 
line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)

(gdb) where
#0  0x0050b6fd in PyEval_EvalFrameEx (
f=Frame 0xb6bd1634, for file 
/buildbot/buildarea/2.7.ware-gentoo-x86.refleak/build/Lib/_pyio.py, line 1126, 
in _flush_unlocked 
(self=', '?@A', 'BCD', 'EFG', 'HIJ', 
'KLM', 'NOP', 'QRS', 'TUV', 'WXY', 'Z[\\]', '^_`a', 'bcde', 'fghi', 'jklm', 
'nopq', 'rstu', 'vwxy', 'z{|}', '~\x7f\x80\x81', '\x82\x83\x84\x85', 
'\x86\x87\x88\x89', '\x8a\x8b\x8c\x8d', '\x8e\x8f\x90\x91', '\x92\x93\x94\x95', 
'\x96\x97\x98\x99\x9a', '\x9b\x9c\x9d\x9e\x9f', '\xa0\xa1\xa2\xa3\xa4', 
'\xa5\xa6\xa7\xa8\xa9', '\xaa\xab\xac\xad\xae', '\xaf\xb0\xb1\xb2\xb3', 
'\xb4\xb5\xb6\xb7\xb8', '\xb9\xba\xbb\xbc\xbd', '\xbe\xbf\xc0\xc1\xc2', 
'\xc3\xc4\xc5\xc6\xc7', '\xc8\xc9\xca\xcb\xcc',
  '\xcd\xce\xcf\xd0\xd1', '\xd2\x...(truncated), 
throwflag=0) at Python/ceval.c:1094
#1  0x0051a9e8 in PyEval_EvalCodeEx (co=0xb6ccdda8, 
globals={'BufferedReader': , ]), _pending_removals=[], 
_remove=, _iterating=set([])) at remote 
0xb668a4cc>, peek=, 
_abc_negative_cache_version=26, tell=, 
read=, __doc__=u'BufferedReader(raw[, 
buffer_size])\n\nA buffer for a readable, sequential BaseRawIO object.\n\n  
  The 

[issue33600] [EASY DOC] Python 2: document that platform.linux_distribution() has been removed

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7b9b87e76c44660de8a973c0e0a118f539532496 by Victor Stinner (Timo 
Furrer) in branch '2.7':
bpo-33600: document that platform.linux_distribution() has been removed 
(GH-7281)
https://github.com/python/cpython/commit/7b9b87e76c44660de8a973c0e0a118f539532496


--

___
Python tracker 

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



[issue33755] Failed separate tests in test_importlib

2018-06-05 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


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



[issue33755] Failed separate tests in test_importlib

2018-06-05 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset e135032ffa08ad66caea8205488e037da85d2bf8 by Barry Warsaw (Miss 
Islington (bot)) in branch '3.7':
bpo-33755: Fix importlib.resources isolation tests (GH-7412) (#7434)
https://github.com/python/cpython/commit/e135032ffa08ad66caea8205488e037da85d2bf8


--

___
Python tracker 

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



[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

Paul,

In your opening post to this issue you suggested to change one line [1] in 
Lib/datetime.py from

dtdst = dt.dst()

to

dtdst = dt.replace(fold=1).dst()

This looks like a rather innocuous change, but it does not by itself make 
fromutc() return properly "enfolded" instances.  IIRC, the best algorithm that 
Tim and I were able to come up with to derive the fold value required something 
like six utcoffset() probes.

PR 7425 that you submitted looks somewhat involved.  Can you submit an 
equivalent datetime.py patch?

[1]: 
https://github.com/python/cpython/blob/c56b17bd8c7a3fd03859822246633d2c9586f8bd/Lib/datetime.py#L1125

--

___
Python tracker 

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



[issue33477] Document that compile(code, 'exec') has different behavior in 3.7+

2018-06-05 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Closing as the ast changes have been reverted.

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



[issue12486] tokenize module should have a unicode API

2018-06-05 Thread Thomas Kluyver


Thomas Kluyver  added the comment:

Thanks Carol :-)

--

___
Python tracker 

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



[issue33751] Failed separate testTruncateOnWindows in test_file

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset f74a1244eba88b562add5193242ac55115aaf25c by Miss Islington (bot) 
in branch '3.6':
bpo-33751: Fix test_file. (GH-7378)
https://github.com/python/cpython/commit/f74a1244eba88b562add5193242ac55115aaf25c


--

___
Python tracker 

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



[issue33751] Failed separate testTruncateOnWindows in test_file

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset 1d419faccdaae27d968cef1e1ece6b9374694573 by Miss Islington (bot) 
in branch '3.7':
bpo-33751: Fix test_file. (GH-7378)
https://github.com/python/cpython/commit/1d419faccdaae27d968cef1e1ece6b9374694573


--
nosy: +miss-islington

___
Python tracker 

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



[issue12486] tokenize module should have a unicode API

2018-06-05 Thread Carol Willing


Change by Carol Willing :


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



[issue12486] tokenize module should have a unicode API

2018-06-05 Thread Carol Willing


Carol Willing  added the comment:


New changeset c56b17bd8c7a3fd03859822246633d2c9586f8bd by Carol Willing (Thomas 
Kluyver) in branch 'master':
bpo-12486: Document tokenize.generate_tokens() as public API (#6957)
https://github.com/python/cpython/commit/c56b17bd8c7a3fd03859822246633d2c9586f8bd


--
nosy: +willingc

___
Python tracker 

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



[issue33774] Document that @lru_cache caches based on exactly how the function arguments are specified

2018-06-05 Thread R. David Murray


R. David Murray  added the comment:

Agreed that this should be documented.

--
nosy: +r.david.murray, rhettinger
stage:  -> needs patch
title: Improve doc of @lru_cache to avoid misuse and confusion -> Document that 
@lru_cache caches based on exactly how the function arguments are specified
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



[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

> I am aware of that.  In fact, some of the draft versions of PEP 495 
> implementation did contain such code.  The problem is that any such 
> tz.fromutc() implementation would necessarily change the behavior of the old 
> programs.

This I'm not sure about - the implementation I've provided gives the same 
answer for any program that pays no attention to `fold`, because I'm relying on 
`utcoffset` and `dst`'s reaction to a change in fold. Any code that's not 
explicitly handling fold will give the same answer as it always has.

> Moreover, any implementation of tz.fromutc() in terms of tz.utcoffset() is 
> more complicated and less efficient than code that he's direct access to a 
> database of transition times.

While true, that does not argue in favor of having a version of `fromutc` that 
doesn't respect `fold`, because anyone looking for a more efficient 
implementation will have to reimplement `fromutc` anyway if necessary.

Another argument in favor of having `fromutc` respect fold by default is that 
it makes it very simple to support fold, particularly for people who aren't 
optimizing for speed. As it is now, you have to duplicate a lot of 
fold-handling and transition lookup logic in both `fromutc` and `utcoffset` / 
`dst`, because they are getting the same information but they are not 
implemented in terms of one another (and it's not even amazingly easy to write 
a function that factors out the common code). That's more code to write and 
maintain and test.

At the end of the day, almost everyone who cares about efficiency will use 
dateutil or pytz for their application, and dateutil and pytz can and do 
re-implement fromutc when appropriate - though there are still some `dateutil` 
tzinfo subclasses where this would be *more* efficient than what's there now. I 
don't see why the perfect has to be the enemy of the good here, though; having 
fold support in `fromutc` is a net benefit for anyone using `fromutc` and for 
adoption of PEP 495 in a wider context.

--

___
Python tracker 

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



[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

> it's actually possible to implement full `fold` support in a generic way 

I am aware of that.  In fact, some of the draft versions of PEP 495 
implementation did contain such code.  The problem is that any such 
tz.fromutc() implementation would necessarily change the behavior of the old 
programs.  Moreover, any implementation of tz.fromutc() in terms of 
tz.utcoffset() is more complicated and less efficient than code that he's 
direct access to a database of transition times.

--

___
Python tracker 

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



[issue33774] Improve doc of @lru_cache to avoid misuse and confusion

2018-06-05 Thread Al-Scandar Solstag


New submission from Al-Scandar Solstag :

Ni!

It is not clear at all in the documentation of @lru_cache that the cache takes 
into account the exact way the function was called, not the values passed to 
its arguments, as one could/would expect.

I mean that for function(a, b, c=3) the three calls below are not considered 
equivalent as far as the cache is concerned:

function(1, 2, 3)
function(1, 2, c=3)
function(1, 2)

I hope this can be clarified in the documentation. I wasted a great deal of 
time today trying to understand why my calls were not getting cached and only 
figured it out when I decided to go read @lru_cache's code.

It seems very likely that other people have had the same problem. Or worse, 
people might be using @lru_cache believing it is working when it isn't.

Cheers!

--
assignee: docs@python
components: Documentation
messages: 318770
nosy: docs@python, solstag
priority: normal
severity: normal
status: open
title: Improve doc of @lru_cache to avoid misuse and confusion

___
Python tracker 

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



[issue33751] Failed separate testTruncateOnWindows in test_file

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c2745d2d05546d76f655ab450eb23d1af39e0b1c by Serhiy Storchaka in 
branch 'master':
bpo-33751: Fix test_file. (GH-7378)
https://github.com/python/cpython/commit/c2745d2d05546d76f655ab450eb23d1af39e0b1c


--

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-06-05 Thread Steve Dower


Steve Dower  added the comment:

Thanks. Agreed this should stay open, but it is blocked on a compiler fix.

--

___
Python tracker 

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



[issue33751] Failed separate testTruncateOnWindows in test_file

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7061

___
Python tracker 

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



[issue33761] Leaked file in test_iterparse in test_xml_etree

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33751] Failed separate testTruncateOnWindows in test_file

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7062

___
Python tracker 

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



[issue33753] Leaked file in test_nextfile_oserror_deleting_backup in test_fileinput

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset b8baa33d931de557d2915c604df85ab168da0904 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33753: Refactor creating temporary files in test_fileinput. 
(GH-7377). (GH-7431)
https://github.com/python/cpython/commit/b8baa33d931de557d2915c604df85ab168da0904


--

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33759] Failed separate ServerProxyTestCase tests in test_xmlrpc

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3014d6eb7f6ed8cc61b9b26fe1c4454760dc8621 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381) 
(GH-7432)
https://github.com/python/cpython/commit/3014d6eb7f6ed8cc61b9b26fe1c4454760dc8621


--

___
Python tracker 

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



[issue33753] Leaked file in test_nextfile_oserror_deleting_backup in test_fileinput

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33755] Failed separate tests in test_importlib

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7060

___
Python tracker 

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



[issue33755] Failed separate tests in test_importlib

2018-06-05 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset ac1ee1badade69d5cd6d8b9112281f121183e7c0 by Barry Warsaw in 
branch 'master':
bpo-33755: Fix importlib.resources isolation tests (#7412)
https://github.com/python/cpython/commit/ac1ee1badade69d5cd6d8b9112281f121183e7c0


--

___
Python tracker 

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



[issue33057] logging.Manager.logRecordFactory is never used

2018-06-05 Thread Vinay Sajip


Vinay Sajip  added the comment:

I'm closing this, please reopen if you have more information which might change 
my view.

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



[issue33165] Add stacklevel parameter to logging APIs

2018-06-05 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue33165] Add stacklevel parameter to logging APIs

2018-06-05 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset dde9fdbe453925279ac3d2a6a72102f6f9ef247c by Vinay Sajip in branch 
'master':
bpo-33165: Added stacklevel parameter to logging APIs. (GH-7424)
https://github.com/python/cpython/commit/dde9fdbe453925279ac3d2a6a72102f6f9ef247c


--

___
Python tracker 

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



[issue27397] email.message.Message.get_payload(decode=True) raises AssertionError that "should never happen"

2018-06-05 Thread Tal Einat


Tal Einat  added the comment:

See #33770, which will make recognizing and handling this case straightforward.

--
nosy: +taleinat

___
Python tracker 

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



[issue33748] test_discovery_failed_discovery in test_unittest modifies sys.path

2018-06-05 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-05 Thread Tal Einat


Tal Einat  added the comment:

Would an exception message as following be acceptable? "Invalid base64-encoded 
string: length cannot be 1 more than a multiple of 4"

--

___
Python tracker 

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



[issue33745] 3.7.0b5 changes the line number of empty functions with docstrings

2018-06-05 Thread Nick Coghlan


Nick Coghlan  added the comment:

While I wouldn't describe this as completely intentional (as it's an artifact 
of the change-and-revert dance with 3.7 previously removing docstring nodes 
from the AST entirely), I also wouldn't want to change it again at this late 
stage of the release process.

Instead I'd suggest simply noting it in the porting section of What's New. 
Something like "Due to a change in the way docstrings are handled by the 
compiler, the implicit ``return None`` in a function body consisting solely of 
a docstring is now marked as occurring on the same line as the docstring, not 
on the function's header line".

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33769] Cleanup start_tls() implementation

2018-06-05 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



[issue33769] Cleanup start_tls() implementation

2018-06-05 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 79c7e57c46a9e5ae2b99a821e152f334b775df2d by Yury Selivanov (Miss 
Islington (bot)) in branch '3.7':
bpo-33769: start_tls: Fix error message; cancel callbacks on error (GH-7403) 
(GH-7428)
https://github.com/python/cpython/commit/79c7e57c46a9e5ae2b99a821e152f334b775df2d


--

___
Python tracker 

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



[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2018-06-05 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 9ef1b0690b90c526798b6b3125b0fa7ae98319a2 by Nick Coghlan (Mayank 
Singhal) in branch 'master':
bpo-31215: Add version changed notes for OpenSSL 1.1.0 compatibility (GH-7346)
https://github.com/python/cpython/commit/9ef1b0690b90c526798b6b3125b0fa7ae98319a2


--

___
Python tracker 

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



[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Thanks, Victor.  Sorry about the noise.

No worry, it's my fault: I forgot to mention bpo-33771 in my PR.

--

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset ffd72acc508bbc994812cefbfb9532d3be2ab737 by Miss Islington (bot) 
in branch '3.7':
bpo-33752: Fix a file leak in test_dbm. (GH-7376)
https://github.com/python/cpython/commit/ffd72acc508bbc994812cefbfb9532d3be2ab737


--

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset 194a5c07228342106c98dcf85c8a5f4cd2c8b04e by Miss Islington (bot) 
in branch '3.6':
bpo-33752: Fix a file leak in test_dbm. (GH-7376)
https://github.com/python/cpython/commit/194a5c07228342106c98dcf85c8a5f4cd2c8b04e


--
nosy: +miss-islington

___
Python tracker 

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



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-05 Thread R. David Murray


R. David Murray  added the comment:

I agree, but that would be a separate enhancement PR.  The email library would 
use that capability if it existed...currently it adds padding in a loop trying 
to do the decode if it gets the invalid padding message.  Which of course is 
going to fail for this case.

--

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7058

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset 631fe1fa423c42197d533103dcf349ca19baed0c by Miss Islington (bot) 
in branch '3.7':
bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381)
https://github.com/python/cpython/commit/631fe1fa423c42197d533103dcf349ca19baed0c


--
nosy: +miss-islington

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset ae55d29fe04ee1aeb1bcb2e9b84e5bc9d4ecb070 by Miss Islington (bot) 
in branch '3.6':
bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381)
https://github.com/python/cpython/commit/ae55d29fe04ee1aeb1bcb2e9b84e5bc9d4ecb070


--

___
Python tracker 

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



[issue33753] Leaked file in test_nextfile_oserror_deleting_backup in test_fileinput

2018-06-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7057

___
Python tracker 

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



[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2018-06-05 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok

___
Python tracker 

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



[issue33769] Cleanup start_tls() implementation

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7054

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6592d7fe11477f8f974d2d4a85c3382a1ad05217 by Serhiy Storchaka in 
branch 'master':
bpo-33752: Fix a file leak in test_dbm. (GH-7376)
https://github.com/python/cpython/commit/6592d7fe11477f8f974d2d4a85c3382a1ad05217


--

___
Python tracker 

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



[issue33770] base64 throws 'incorrect padding' exception when the issue is NOT with the padding

2018-06-05 Thread Dmitry

Dmitry  added the comment:

I think something like “invalid length” message does make more sense in this 
case than the misleading “incorrect padding”.

It would also be great if there was a way to force it to try its best at 
decoding the string. :)

--

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7053

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7056

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7052

___
Python tracker 

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



[issue33752] Leaked file in test_anydbm_creation_n_file_exists_with_invalid_contents in test_dbm

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7055

___
Python tracker 

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



[issue33767] Improper use of SystemError in the mmap module

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e9e397605789b2a67b67558fbbe756b7b88934f5 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381)
https://github.com/python/cpython/commit/e9e397605789b2a67b67558fbbe756b7b88934f5


--

___
Python tracker 

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



[issue33769] Cleanup start_tls() implementation

2018-06-05 Thread Yury Selivanov


Yury Selivanov  added the comment:


New changeset 415bc46a78e785f357c8960ae70f18a6b6cccbb6 by Yury Selivanov in 
branch 'master':
bpo-33769: start_tls: Fix error message; cancel callbacks on error (GH-7403)
https://github.com/python/cpython/commit/415bc46a78e785f357c8960ae70f18a6b6cccbb6


--

___
Python tracker 

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



[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thanks, Victor.  Sorry about the noise.

--

___
Python tracker 

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



[issue33748] test_discovery_failed_discovery in test_unittest modifies sys.path

2018-06-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, and there are helpers in test.support and test.test_importlib.util.

--

___
Python tracker 

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



[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

I created https://github.com/python/cpython/pull/7419 to update the 
documentation.

--

___
Python tracker 

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



[issue33771] Module: timeit. According to documentation default_repeat should have the value 3. Has 5.

2018-06-05 Thread Cheryl Sabella


New submission from Cheryl Sabella :

Looks like this was changed in #28240.

@svyatoslav, would you like to make a github pull request for the change?

--
keywords: +easy
nosy: +cheryl.sabella
stage:  -> needs patch

___
Python tracker 

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



[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

So I created a little patch for this, and when I was working on it I realized 
that it's actually possible to implement full `fold` support in a generic way 
in `fromutc` under the assumption that `utcoffset - dst` holds at all points 
(which is the fundamental assumption of the builtin `fromutc` function).

It adds a bit of overhead, but I think any current fold-aware operations need 
to be implemented in pure Python anyway (and involve even more overhead), so I 
think it would be a net gain.

The big downside I see here is that it cannot take advantage of any sort of 
"is_ambiguous" function and has to rely on the method of "change the fold and 
see if the answer is different" to determine ambiguity. I think this is a small 
cost to pay for a generic implementation, though. I'm pretty busy this week and 
next week will be hectic too, but towards the end of the month I can probably 
come up with a test suite for this and look at some actual performance numbers.

--

___
Python tracker 

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



[issue33578] cjkcodecs missing getstate and setstate implementations

2018-06-05 Thread Christopher Thorne


Christopher Thorne  added the comment:

Ah, good find. I suppose that means `MultibyteCodec_State` and `pending` are 
both needed to fully capture state, as is done in `decoder.getstate`/`setstate` 
by returning a tuple of both. Unfortunately `encoder.getstate` is defined to 
return an integer, and because `MultibyteCodec_State` can occupy 8 bytes, and 
`pending` can occupy 2 bytes (MAXENCPENDING), we get a total of 10 bytes which 
I think exceeds what a PyLong can represent.

Returning either `pending` or `MultibyteCodec_State` seems infeasible because 
`setstate` will not know how to process it, and both may be needed together.

Some alternatives could be:

1. If we are restricted to returning an integer, perhaps this integer could be 
an index that references a state in a pool of encoder states stored internally 
(effectively a pointer). Managing this state pool seems quite complex.

2. encoder.getstate could be redefined to return a tuple, but obviously this is 
a breaking change. Backwards compatibility could be somewhat preserved by 
allowing setstate to accept either an integer or tuple.

3. Remove `PyObject *pending` from `MultibyteStatefulEncoderContext` and change 
encoders to only use `MultibyteCodec_State`. Not sure how feasible this is.

I think approach 2 would be simplest and matches the decoder interface. 

Does anyone have any opinions or further alternatives?

--

___
Python tracker 

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



[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2018-06-05 Thread Paul Ganssle


Change by Paul Ganssle :


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



[issue17045] Improve C-API doc for PyTypeObject

2018-06-05 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

This isn't directly related to this change, but I wanted to point out #23869 
since you seem to understand the topic enough to respond to that ticket.

Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



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

2018-06-05 Thread miss-islington


miss-islington  added the comment:


New changeset 23b7ee205270320f836e93e411b28ac995cbabf1 by Miss Islington (bot) 
in branch '3.7':
bpo-32392: Document env keyword argument of subprocess.run() (GH-7289)
https://github.com/python/cpython/commit/23b7ee205270320f836e93e411b28ac995cbabf1


--
nosy: +miss-islington

___
Python tracker 

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



[issue33748] test_discovery_failed_discovery in test_unittest modifies sys.path

2018-06-05 Thread Tal Einat


Tal Einat  added the comment:

It seems that adding a directory to sys.path is the intended behavior of 
`loader.discover()`. Should the test be restoring sys.path back to it original 
value when it's done?

Also, shouldn't this test (and some others) be restoring sys.modules when 
they're done?

--
nosy: +taleinat

___
Python tracker 

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



[issue33165] Add stacklevel parameter to logging APIs

2018-06-05 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7047

___
Python tracker 

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



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

2018-06-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7048

___
Python tracker 

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



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

2018-06-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset af1ec97a6d1dde68b2dc0ee9b78965eb219061a8 by Berker Peksag (Tobias 
Kunze) in branch 'master':
bpo-32392: Document env keyword argument of subprocess.run() (GH-7289)
https://github.com/python/cpython/commit/af1ec97a6d1dde68b2dc0ee9b78965eb219061a8


--

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-06-05 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset e33648484775fa533fc8f1e5cc45f60061d29d54 by INADA Naoki in branch 
'master':
bpo-5755: Move -Wstrict-prototypes to CFLAGS_NODIST (GH-7395)
https://github.com/python/cpython/commit/e33648484775fa533fc8f1e5cc45f60061d29d54


--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

fd_count() has been added by bpo-18174. I just backported it to Python 2.7 to 
check for leak of file descriptors in tests. I found the bug when I fixed a bug 
on Python 2.7 on FreeBSD.

--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-05 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2018-06-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bc3df70b266304f78ebe5eabead71cabd4738d12 by Victor Stinner in 
branch '2.7':
bpo-18174: Fix fd_count() on FreeBSD (GH-7420)
https://github.com/python/cpython/commit/bc3df70b266304f78ebe5eabead71cabd4738d12


--

___
Python tracker 

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



[issue33773] test.support.fd_count(): off-by-one error when listing /proc/self/fd/

2018-06-05 Thread STINNER Victor


New submission from STINNER Victor :

test.support.fd_count() has two implementation: list /proc/self/fd/ on Linux 
and FreeBSD, or check all file descriptors from 0 and MAXFD. The problem is 
that the two implementation don't give the same result...

List /proc/self/fd/ (used by default on Linux):

vstinner@apu$ ./python -c 'from test.support import fd_count; print(fd_count())'
4

Check all FD (I modified fd_count() to force using this implementation):

vstinner@apu$ ./python -c 'from test.support import fd_count; print(fd_count())'
3

On Linux and FreeBSD, listdir() opens internally a file descriptor to list the 
content of the /proc/self/fd/ directory. So the function should substract one 
to the result.

Attached PR fixes the issue.

--
components: Tests
messages: 318734
nosy: pitrou, vstinner
priority: normal
severity: normal
status: open
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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2018-06-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7045

___
Python tracker 

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



[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2018-06-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7044

___
Python tracker 

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



  1   2   >