[issue33336] [imaplib] MOVE is a legal command

2018-07-21 Thread Anthony Singleton


Anthony Singleton  added the comment:

Fuck you

--
components: +Cross-Build, Extension Modules
nosy: +Alex.Willmer, Anthony Singleton

___
Python tracker 

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



[issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 25326dea8b907fdd2bf087baab3c31b617438f2e by Serhiy Storchaka 
(Xtreak) in branch '3.7':
[3.7] bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367) (GH-8369)
https://github.com/python/cpython/commit/25326dea8b907fdd2bf087baab3c31b617438f2e


--

___
Python tracker 

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



[issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7

2018-07-21 Thread miss-islington


miss-islington  added the comment:


New changeset 916bcc6fde2db95199454b22f608648467fbbc54 by Miss Islington (bot) 
in branch '3.6':
bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367)
https://github.com/python/cpython/commit/916bcc6fde2db95199454b22f608648467fbbc54


--
nosy: +miss-islington

___
Python tracker 

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



[issue16817] test___all__ affects other tests by doing too much importing

2018-07-21 Thread Matej Cepl


Matej Cepl  added the comment:

> This is superceded by:
> 
> http://bugs.python.org/issue18906

Then it should be closed, right?

--
nosy: +mcepl

___
Python tracker 

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



[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-21 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

Mac OS builds fail due to test_site in VSTS for 3.7 branches only

Ref : 
https://python.visualstudio.com/cpython/_build/results?buildId=17921&view=logs

2018-07-21T07:01:08.5912930Z Traceback (most recent call last):
2018-07-21T07:01:08.5927520Z   File 
"/Users/vsts/agent/2.136.1/work/1/s/Lib/test/test_site.py", line 199, in 
test_s_option
2018-07-21T07:01:08.5942120Z self.assertIn(usersite, sys.path)
2018-07-21T07:01:08.5959870Z AssertionError: 
'/Users/vsts/.local/lib/python3.7/site-packages' not found in 
['/Users/vsts/agent/2.136.1/work/1/s', '/usr/local/lib/python37.zip', 
'/Users/vsts/agent/2.136.1/work/1/s/Lib', 
'/Users/vsts/agent/2.136.1/work/1/s/build/lib.macosx-10.13-x86_64-3.7-pydebug', 
'/usr/local/lib/python3.7/site-packages']
2018-07-21T07:01:08.5971110Z 
2018-07-21T07:01:08.5985860Z 
==
2018-07-21T07:01:08.6000880Z FAIL: test_startup_imports 
(test.test_site.StartupImportTests)
2018-07-21T07:01:08.6017050Z 
--
2018-07-21T07:01:08.6033630Z Traceback (most recent call last):
2018-07-21T07:01:08.6048270Z   File 
"/Users/vsts/agent/2.136.1/work/1/s/Lib/test/test_site.py", line 487, in 
test_startup_imports
2018-07-21T07:01:08.6063180Z 
self.assertFalse(modules.intersection(collection_mods), stderr)
2018-07-21T07:01:08.6079990Z AssertionError: {'reprlib', 'heapq', 
'collections', 'keyword', 'operator', 'functools', 'types'} is not false : 
import _frozen_importlib # frozen

I couldn't find any related issues in search and hence opened this. Feel free 
to close this if it's a duplicate or fixed in some other branch.

Thanks

--
messages: 322082
nosy: xtreak
priority: normal
severity: normal
status: open
title: test_site fails in macOS-PR VSTS builds for 3.7 branch

___
Python tracker 

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



[issue34177] test_site fails in macOS-PR VSTS builds for 3.7 branch

2018-07-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

It seems that the last successful build in 3.7 was for 
https://github.com/python/cpython/commit/339e0c1296c61c9dbc1f8f880c5c668bf4007e5e
 and all PRs after it had the same failure.

Sorry for not adding the relevant components during ticket creation.

Thanks

--
components: +Build
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



[issue34136] Del on class __annotations__ regressed, failing test

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In the edition of PR 8364 the test is failed on 3.6.

def test_do_not_recreate_annotations(self):
annotations = {}
# Don't rely on the existence of the '__annotations__' global.
with support.swap_item(globals(), '__annotations__', annotations):
class C:
del __annotations__
x: int  # Updates the '__annotations__' global.
self.assertIn('x', annotations)
self.assertIs(annotations['x'], int)

It is possible to write it in less strong form which will be passed on 3.6 too.

def test_do_not_recreate_annotations(self):
# Don't rely on the existence of the '__annotations__' global.
with support.swap_item(globals(), '__annotations__', {}):
del globals()['__annotations__']
class C:
del __annotations__
with self.assertRaises(NameError):
x: int

In 3.6 the annotation declaration fails immediately if __annotations__ is 
deleted. In 3.7 it falls back to the global __annotations__.

The question is whether the difference in the behavior between 3.6 and 3.7 is 
intended and is a part of the language specification, or is an implementation 
detail of CPython. In the former case we can keep the stronger test. In the 
latter case we should make it weaker.

--

___
Python tracker 

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



[issue34158] Documentation of datetime '%z' format code is odd

2018-07-21 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Added as part of 018d353c1c8c87767d2335cd884017c2ce12e045 and a fix regarding 
duplicate words for that part was added at 
bac2d5ba30339298db7d4caa9c8cd31d807cf081. 

Relevant format string at 
https://github.com/python/cpython/pull/2896/files#diff-25e2d173c84057d069b7890450714eddR214.

Relevant test case with 6-digit string for microsecond : 
https://github.com/python/cpython/pull/2896/files#diff-acc40bec51c7de832de3361db3edae52R309.

Table at 
https://docs.python.org/3.7/library/datetime.html#strftime-and-strptime-behavior
 could also be updated with microseconds being optional in the second column

%z | UTC offset in the form ±HHMM[SS] (empty string if the object is naive). | 
(empty), +, -0400, +1030

You can raise a GitHub PR for the same.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue33336] [imaplib] MOVE is a legal command

2018-07-21 Thread Matej Cepl


Change by Matej Cepl :


--
pull_requests: +7904

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Matthias Klose


New submission from Matthias Klose :

test_tcl fails at least on the 3.7 branch with:

==
FAIL: test_join (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File "/usr/lib/python3.7/test/test_tcl.py", line 670, in test_join
check('{spam}')
  File "/usr/lib/python3.7/test/test_tcl.py", line 660, in check
self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? ++

--
components: Tkinter
messages: 322086
nosy: doko
priority: normal
severity: normal
status: open
title: test_tcl fails on the 3.7 branch
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



[issue25943] Integer overflow in _bsddb leads to heap corruption

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 32522050773c257a5c3c0c8929ba5c64123b53ed by Serhiy Storchaka 
(Zackery Spytz) in branch '2.7':
bpo-25943: Fix potential heap corruption in bsddb's _db_associateCallback() 
(GH-8337)
https://github.com/python/cpython/commit/32522050773c257a5c3c0c8929ba5c64123b53ed


--

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 56868f940e0cc0b35d33c0070107ff3bed2d8766 by Serhiy Storchaka 
(jdemeyer) in branch 'master':
bpo-34126: Fix crashes while profiling invalid calls. (GH-8300)
https://github.com/python/cpython/commit/56868f940e0cc0b35d33c0070107ff3bed2d8766


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7905

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Can you please add information about your OS and how you are running the tests? 
It passes in Travis for 3.7 branch for my last PR. Tests were added as part of 
https://bugs.python.org/issue33974 .

Ref : https://travis-ci.org/python/cpython/jobs/406532961#L2397

I tried the latest 3.7 branch on my Ubuntu box and tests run fine

➜  cpython git:(25326de) ./python
Python 3.7.0+ (remotes/upstream/3.7:25326de, Jul 21 2018, 09:05:57)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
➜  cpython git:(25326de) time ./python -m unittest -v 
test.test_tcl.TclTest.test_join
patchlevel = 8.6.5
test_join (test.test_tcl.TclTest) ... ok

--
Ran 1 test in 0.013s

OK
./python -m unittest -v test.test_tcl.TclTest.test_join  0.24s user 0.01s 
system 97% cpu 0.249 total


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-21 Thread tzickel


tzickel  added the comment:

>>> from multiprocessing import Pool
>>> import gc
>>> a = Pool(10)
>>> del a
>>> gc.collect()
0
>>>

After this, there are still left behind Process (Pool) or Dummy (ThreadPool) 
and big _cache data (If you did something with it) which lingers till the 
process dies.

You are correct on the other issue (I'm using and reading the Python 2 
documentation which does not have that...).

--

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Tests
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Matthias Klose


Matthias Klose  added the comment:

seen on Linux x86_64, using Tcl 8.6.8, running the tests in the installed 
location.

--

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-21 Thread ANJALI BANSAL


ANJALI BANSAL  added the comment:

Is this still active? I want to fix the patch.

--
nosy: +ANJALI BANSAL

___
Python tracker 

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



[issue25094] [EASY][Windows] test_tools fails on Windows when passing

2018-07-21 Thread Lorenz Mende


Lorenz Mende  added the comment:

Approving the behaviour on 3.6.5 and fresh cpython-built @master:

>From the docs: test_sundry "contains extremely basic regression tests... which 
>don't have separate tests of their own".

IMHO 2to3 can be added to the whitelist of test_sundry as it comes with its own 
unit tests. When test_sundry runs import_tool with '2to3', lib2to3 is called 
without args, resulting in an exit 2 which breaks the basic test.

--
nosy: +LorenzMende

___
Python tracker 

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



[issue33336] [imaplib] MOVE is a legal command

2018-07-21 Thread Matej Cepl


Change by Matej Cepl :


--
pull_requests: +7906

___
Python tracker 

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



[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-07-21 Thread Anjali Bansal


Anjali Bansal  added the comment:

I would work on it. please guide me how to proceed?

Thanks
Anjali

--
nosy: +Anjali Bansal

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-07-21 Thread Michael Felt


Michael Felt  added the comment:

OK. as promised when I closed PR 5183 - a restart.

You may skip the wall that follows - it is just documentation.

The key points:
* AIX ifconfig and arp do not supply maccaddr
* netstat supplies a macaddr, but uses '.' not ':' as a delimiter
** also, AIX netstat value is not always 17 characters (dec 15 is 'f' not '0f')
* since Python3-3.7 there is support for _uuid so test_unix_getnode passes 
"WithExtModule" but fails "WithoutExtModule"

A minor point:
test_find_mac() has always passed on AIX because the test was passed a
macaddr using ':' and tested for ':'. The test has been modified to provide a 
macaddr in "AIX" format. IMHO - the test would be better if the string was not 
"forced to be 17 characters" (e.g., this is my macaddr as returned by netstat: 
"0.12.a3.53.c9.46"

My question - getting back to what I had done previously - even though _uuid is 
working, should the "WithoutExtModule" and support for test_find_mac() be 
adjusted in uuid.py - OR - are these errors in test just going to be accepted 
asis?

Details: (skip the wall :p )


So, with only test_uuid.py patched, the verbose returns ('ok' tests not 
included!):

root@x066:[/data/prj/python/python3-3.8]./python 
../git/**3.8/Lib/test/regrtest.py -v test_uuid | egrep -v "ok$"
== CPython 3.8.0a0 (default, Jul 20 2018, 00:54:36) [C]
== AIX-1-00C291F54C00-powerpc-32bit big-endian
== cwd: /data/prj/python/python3-3.8/build/test_python_11468890
== CPU count: 4
== encodings: locale=ISO8859-1, FS=iso8859-1
Run tests sequentially
0:00:00 [1/1] test_uuid
test_arp_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'because AIX "arp" does not provide macaddr'
test_find_mac (test.test_uuid.TestInternalsWithExtModule) ... FAIL
test_ifconfig_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'because AIX "ifconfig" does not provide macaddr'
test_ip_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires ip'
test_ipconfig_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires Windows'
test_lanscan_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires lanscan'
test_netbios_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires win32wnet'
test_netstat_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires netstat'
test_windll_getnode (test.test_uuid.TestInternalsWithExtModule) ... skipped 
'requires Windows'
test_arp_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'because AIX "arp" does not provide macaddr'
test_find_mac (test.test_uuid.TestInternalsWithoutExtModule) ... FAIL
test_ifconfig_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... 
skipped 'because AIX "ifconfig" does not provide macaddr'
test_ip_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires ip'
test_ipconfig_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... 
skipped 'requires Windows'
test_lanscan_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires lanscan'
test_netbios_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires win32wnet'
test_netstat_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires netstat'
test_unix_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires uuid_generate_time'
test_windll_getnode (test.test_uuid.TestInternalsWithoutExtModule) ... skipped 
'requires Windows'
test_uuid1_safe (test.test_uuid.TestUUIDWithExtModule) ... skipped 'requires 
uuid_generate_time_safe(3)'
test_uuid1_bogus_return_value (test.test_uuid.TestUUIDWithoutExtModule) ... 
skipped 'need uuid._generate_time_safe'
test_uuid1_is_safe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need 
uuid._generate_time_safe'
test_uuid1_is_unsafe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 
'need uuid._generate_time_safe'
test_uuid1_safe (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'requires 
uuid_generate_time_safe(3)'
test_uuid1_unknown (test.test_uuid.TestUUIDWithoutExtModule) ... skipped 'need 
uuid._generate_time_safe'
test test_uuid failed

==
FAIL: test_find_mac (test.test_uuid.TestInternalsWithExtModule)
--
Traceback (most recent call last):
  File "/data/prj/python/git/python3-3.8/Lib/test/test_uuid.py", line 548, in 
test_find_mac
self.assertEqual(mac, 0x1234567890ab)
AssertionError: None != 20015998341291

==
FAIL: test_find_mac (test.test_uuid.TestInternalsWithoutExtModule)
--
Traceback (most recent call last):
  File "/data/prj/python/git/python3-3.8/Lib/test/test_uuid.py", line 548, in 
test_find_mac
self.assertEqual(mac, 0x1234567890ab)
AssertionError: None != 20015998341291

-

[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2018-07-21 Thread Jeffrey Walton


Jeffrey Walton  added the comment:

I know this is a bit late but I wanted to share...

OpenCSW has a build farm with Solaris machines and Sparc hardware. The farm 
provides x86 and Sparc machines with Solaris 9 through 11.

I believe OpenCSW operates in the same spirit as GCC compile farm. They welcome 
open source developers and upstream maintainers to help ensure packages build 
and run on Solaris machines.

You can read about it at
https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/ .

If Python is performing memory access patterns as discussed in the report then 
it would probably benefit the project to test on a Sparc machine with Solaris 
11.

--
nosy: +Jeffrey.Walton

___
Python tracker 

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



[issue33145] unaligned accesses in siphash24() lead to crashes on sparc

2018-07-21 Thread Jeffrey Walton


Jeffrey Walton  added the comment:

I know this is a bit late but I wanted to share...

OpenCSW has a build farm with Solaris machines and Sparc hardware. The farm 
provides x86 and Sparc machines with Solaris 9 through 11.

I believe OpenCSW operates in the same spirit as GCC compile farm. They welcome 
open source developers and upstream maintainers to help ensure packages build 
and run on Solaris machines.

You can read about it at
https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/ .

If Python is performing memory access patterns as discussed in the report then 
it would probably benefit the project to test on a Sparc machine with Solaris 
11.

--
nosy: +Jeffrey.Walton

___
Python tracker 

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



[issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2018-07-21 Thread Brett Randall


Change by Brett Randall :


--
nosy: +javabrett

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python -m test -v test_time test_statistics
...
==
FAIL: test_decimals_exact (test.test_statistics.TestHarmonicMean)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1484, in 
test_decimals_exact
self.assertEqual(self.func(data), D(66528)/70723)
AssertionError: Decimal('0.9406840773157247288717955969') != 
Decimal('0.9406840773157247288717955970')

==
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) 
(x=Decimal('4.125'), count=2)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in 
test_repeated_single_value
self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124') != Decimal('4.125')

==
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) 
(x=Decimal('4.125'), count=5)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in 
test_repeated_single_value
self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124') != Decimal('4.125')

==
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) 
(x=Decimal('4.125'), count=10)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in 
test_repeated_single_value
self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124') != Decimal('4.125')

==
FAIL: test_repeated_single_value (test.test_statistics.TestHarmonicMean) 
(x=Decimal('4.125'), count=20)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_statistics.py", line 1332, in 
test_repeated_single_value
self.assertEqual(self.func(data), x)
AssertionError: Decimal('4.124') != Decimal('4.125')

--

--
components: Tests
messages: 322098
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_statistics fails after test_time
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue25943] Integer overflow in _bsddb leads to heap corruption

2018-07-21 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



[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-21 Thread Clint Hepner


Clint Hepner  added the comment:

This came up in response to https://stackoverflow.com/q/51443795/1126841.

I realize the current documentation is informative, not normative, but I think
there is a legitimate reason to allow an explicit None argument like the pure 
Python suggests.

Currently, there is no way to trigger the default behavior explicitly, as 
repeat behaves more like iter (in that the number of arguments has special 
meaning) than like islice (whose optional arguments behave like regular 
parameters with default values).

For example, these two calls are equivalent:

islice(itr, 5) 
islice(itr, 5, None)

For some functions, it makes sense for the number of arguments to be 
significant. For example, there is no meaningful default value for the second 
argument to iter(), since the second argument completely changes the semantics 
of the call.

iter({'a': 1, 'b': 2})  # Return an iterator for the argument
iter(lambda f: f.read(4), '')  # Call a function until it returns ''

As an another example, the first argument to map() determines how many
additional arguments are needed.

map(lambda x: x + 1, [1,2,3])   # yield values form [2,3,4]
map(lambda x: x + y, [1,2,3], [1,2,3])  # yield values from [2,4,6]


However, with repeat(), it makes sense to think of the second argument as an 
upper limit that can be either finite or infinite. Lacking an infinite integer 
value, None makes sense if you read it as "no upper limit"


repeat(1) # infinite stream of 1s
repeat(1, 10322)  # a finite stream
repeat(1, None)   # proposed: an infinite stream of 1s

I prefer the current description of

def repeat(object, times=None):

over

def repeat(object, *times)

because it accurately reflects the number of arguments you can pass to repeat.

--

___
Python tracker 

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



[issue33187] Document ElementInclude (XInclude) support in ElementTree

2018-07-21 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Please read the devguide on how to get started contributing: 
https://devguide.python.org.

You'll also need to sign the CLA:
https://devguide.python.org/pullrequest/?highlight=Cla#licensing

--
nosy: +Mariatta

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread bbayles


Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread bbayles


Change by bbayles :


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

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue34158] Documentation of datetime '%z' format code is odd

2018-07-21 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +7908
stage:  -> patch review

___
Python tracker 

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



[issue33462] reversible dict

2018-07-21 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Serhiy and Inada, is there a reason not to move forward with this patch?

--

___
Python tracker 

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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-21 Thread Noah Haasis


Noah Haasis  added the comment:

This is a list of all valid keywordarguments of Listbox.__init__() listed in 
the test file: 
'activestyle', 'background', 'borderwidth', 'cursor',
'disabledforeground', 'exportselection',
'font', 'foreground', 'height',
'highlightbackground', 'highlightcolor', 'highlightthickness',
'listvariable', 'relief',
'selectbackground', 'selectborderwidth', 'selectforeground',
'selectmode', 'setgrid', 'state',
'takefocus', 'width', 'xscrollcommand', 'yscrollcommand'

The ones that are missing in the doc string:
'activestyle', 'disabledforeground', 
'listvariable','state'

--

___
Python tracker 

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



[issue34180] bool(Q) always return True for a priority queue Q

2018-07-21 Thread Victor Porton


New submission from Victor Porton :

It seems that bool(Q) always return True for a priority queue Q.

It should behave the same way as for bool(L) where L is a list, that is return 
False on an empty queue.

Please check also other objects in https://docs.python.org/3/library/queue.html

After the bug is fixed, the documentation should be clear that there was a 
change in the behavior in certain Python version.

--
components: Library (Lib)
messages: 322103
nosy: porton
priority: normal
severity: normal
status: open
title: bool(Q) always return True for a priority queue Q
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



[issue34180] bool(Q) always return True for a priority queue Q

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue34180] bool(Q) always return True for a priority queue Q

2018-07-21 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Relevant SO answer : https://stackoverflow.com/a/41861322/2610955

Ref : https://docs.python.org/3/reference/datamodel.html#object.__bool__

> If a class defines neither __len__() nor __bool__(), all its instances are 
> considered true.

I don't know why it's not implemented and the SO answer comments has some 
discussion. Maybe this can be clarified in the doc.

➜  cpython git:(master) rlwrap ./python
Python 3.8.0a0 (heads/master:56868f9, Jul 21 2018, 14:28:31)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from queue import PriorityQueue
>>> len(PriorityQueue([1]))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object of type 'PriorityQueue' has no len()


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34136] Del on class __annotations__ regressed, failing test

2018-07-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for the research. At this point I'm wondering what this test is testing. 
There is no prescribed behavior once you delete __annotations__ from the scope 
-- it is not a supported operation. At the same time I don't want to add any 
code enforcing that it fails. Unless you disagree, I think in 3.6 we should 
just delete the test.

--

___
Python tracker 

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



[issue34136] Del on class __annotations__ regressed, failing test

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Shouldn't it be deleted in 3.7+ too? The behavior tested after PR 8364 (falling 
back to the global __annotations__) looks to me even more questionable than 
NameError.

--

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 7638eb892a50d101fe06342da180f0ab63a0b334 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) (GH-8371)
https://github.com/python/cpython/commit/7638eb892a50d101fe06342da180f0ab63a0b334


--

___
Python tracker 

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



[issue34126] Profiling certain invalid calls crashes Python

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your contribution Jeroen.

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



[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-21 Thread Noah Haasis


Change by Noah Haasis :


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



[issue34181] Lib/test/test_typing.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python Lib/test/test_typing.py
...
==
FAIL: test_repr (__main__.GenericTests)
--
Traceback (most recent call last):
  File "Lib/test/test_typing.py", line 654, in test_repr
"")
AssertionError: "" != ""
- 
?  ^^^  ^^
+ 
? + ^^^  ^


--

--
assignee: serhiy.storchaka
components: Tests
messages: 322109
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Lib/test/test_typing.py failed when ran as a script
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34181] Lib/test/test_typing.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I looked into the code of test_execute_multiple_tasks and 
designate/worker/processing.py from which the executor was initialized. I have 
converted the test case code removing the project related code as a standalone 
script. I hope the attached code is the minimal code required. The change from 
Queue to SimpleQueue was made with commit : 
ab74504346a6e2569b3255b7b621c589716888c4 and relevant issue is 
https://bugs.python.org/issue32576 .

I ran the test code by checking out each commit obtained by `git log --oneline 
--format="%h" Lib/concurrent/futures/thread.py` . The tests finish successfully 
without any hanging as below

Testing on commit :  c4b695f
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0012586116790771484fs
Testing on commit :  ab74504
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0013058185577392578fs
Testing on commit :  63ff413
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0012793540954589844fs
Testing on commit :  bc61315
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0013325214385986328fs
Testing on commit :  a3d91b4
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0012831687927246094fs
Testing on commit :  15f44ab
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0013515949249267578fs
Testing on commit :  50abe87
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0020570755004882812fs
Testing on commit :  cfd4661
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0012753009796142578fs
Testing on commit :  20efceb
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0012905597686767578fs
Testing on commit :  6b97374
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.001275777816772461fs
Testing on commit :  04842a8
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.001427702392578fs
Testing on commit :  27be5da
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0013408660888671875fs
Testing on commit :  c13d454
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0014138221740722656fs
Testing on commit :  81c4d36
Finished Tasks ['UnnamedTask', 'UnnamedTask', 'UnnamedTask', 'UnnamedTask', 
'UnnamedTask']s in 0.0013227462768554688fs


Can you please check if I am correct on the above approach?

Thanks

--
Added file: https://bugs.python.org/file47707/bpo34173.py

___
Python tracker 

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



[issue34182] Lib/test/test_pydoc.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python Lib/test/test_pydoc.py
...
==
ERROR: test_mixed_case_module_names_are_lower_cased (__main__.PydocDocTest)
--
Traceback (most recent call last):
  File "Lib/test/test_pydoc.py", line 460, in 
test_mixed_case_module_names_are_lower_cased
self.assertIn('xml.etree.elementtree', doc_link)
  File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1103, in assertIn
if member not in container:
TypeError: argument of type 'NoneType' is not iterable

--

Since it works in 3.6, seems the regression was introduced in issue32031.

--
components: Tests
messages: 322111
nosy: serhiy.storchaka, xdegaye
priority: normal
severity: normal
status: open
title: Lib/test/test_pydoc.py failed when ran as a script
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34183] Lib/test/test_contextlib_async.py failed when run as a script

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python Lib/test/test_contextlib_async.py
Lib/test/test_contextlib_async.py:7: ImportWarning: can't resolve package from 
__spec__ or __package__, falling back on __name__ and __path__
  from .test_contextlib import TestBaseExitStack
Traceback (most recent call last):
  File "Lib/test/test_contextlib_async.py", line 7, in 
from .test_contextlib import TestBaseExitStack
ModuleNotFoundError: No module named '__main__.test_contextlib'; '__main__' is 
not a package

--
assignee: serhiy.storchaka
components: Tests
messages: 322112
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Lib/test/test_contextlib_async.py failed when run as a script
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34183] Lib/test/test_contextlib_async.py failed when run as a script

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python Lib/test/test_dataclasses.py
...
==
ERROR: test_classvar_module_level_import (__main__.TestStringAnnotations)
--
Traceback (most recent call last):
  File "Lib/test/test_dataclasses.py", line 2716, in 
test_classvar_module_level_import
from . import dataclass_module_1
ImportError: cannot import name 'dataclass_module_1' from '__main__' 
(Lib/test/test_dataclasses.py)

==
FAIL: test_no_repr (__main__.TestRepr)
--
Traceback (most recent call last):
  File "Lib/test/test_dataclasses.py", line 1970, in test_no_repr
repr(C(3)))
AssertionError: 'test_dataclasses.TestRepr.test_no_repr..C object at' 
not found in '<__main__.TestRepr.test_no_repr..C object at 
0x7f11745df2c8>'

--

--
assignee: serhiy.storchaka
components: Tests
messages: 322113
nosy: eric.smith, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Lib/test/test_dataclasses.py failed when ran as a script
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue34184] Lib/test/test_dataclasses.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue34183] Lib/test/test_contextlib_async.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: Lib/test/test_contextlib_async.py failed when run as a script -> 
Lib/test/test_contextlib_async.py failed when ran as a script

___
Python tracker 

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



[issue34136] Del on class __annotations__ regressed, failing test

2018-07-21 Thread Guido van Rossum

Guido van Rossum  added the comment:

I wouldn’t object. Of course my opinion no longer matters that much.

On Sat, Jul 21, 2018 at 9:33 AM Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> Shouldn't it be deleted in 3.7+ too? The behavior tested after PR 8364
> (falling back to the global __annotations__) looks to me even more
> questionable than NameError.
>
> --
>
> ___
> 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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7913

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 938045f335b52ddb47076e9fbe4229a33b4bd9be by Stefan Krah (Bo 
Bayles) in branch 'master':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (#8376)
https://github.com/python/cpython/commit/938045f335b52ddb47076e9fbe4229a33b4bd9be


--
nosy: +skrah

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7914

___
Python tracker 

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



[issue34185] Lib/test/test_bdb.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python Lib/test/test_bdb.py
...
==
FAIL: test_skip (__main__.StateTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 731, in test_skip
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 448, in __exit__
self.test_case.fail(err_msg)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: Wrong event type at expect_set item 2, got 'call'
  Expected: ('line', 3, 'tfunc_import')
  Got:  ('call', 84, '_id'),('quit',),

==
FAIL: test_runeval_step (__main__.RunTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 976, in test_runeval_step
tracer.runeval('test_module.main()', globals(), locals())
  File "Lib/test/test_bdb.py", line 448, in __exit__
self.test_case.fail(err_msg)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: Wrong event type at expect_set item 2, got 'exception'
  Expected: ('call', 2, 'main')
  Got:  ('exception', 1, '', AttributeError), ('step',),
All paired tuples have not been processed, the last one was number 2

==
FAIL: test_bp_condition (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 843, in test_bp_condition
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_case.fail(not_empty)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: All paired tuples have not been processed, the last one was 
number 1

==
FAIL: test_bp_exception_on_condition_evaluation (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 862, in 
test_bp_exception_on_condition_evaluation
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_case.fail(not_empty)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: All paired tuples have not been processed, the last one was 
number 1

==
FAIL: test_bp_ignore_count (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 883, in test_bp_ignore_count
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_case.fail(not_empty)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: All paired tuples have not been processed, the last one was 
number 1

==
FAIL: test_clear_two_bp_on_same_line (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 935, in test_clear_two_bp_on_same_line
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_case.fail(not_empty)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: All paired tuples have not been processed, the last one was 
number 4

==
FAIL: test_disabled_temporary_bp (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 823, in test_disabled_temporary_bp
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_case.fail(not_empty)
  File "Lib/test/test_bdb.py", line 582, in fail
raise self.failureException(msg) from None
AssertionError: All paired tuples have not been processed, the last one was 
number 1

==
FAIL: test_ignore_count_on_disabled_bp (__main__.BreakpointTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_bdb.py", line 910, in test_ignore_count_on_disabled_bp
tracer.runcall(tfunc_import)
  File "Lib/test/test_bdb.py", line 456, in __exit__
self.test_c

[issue34179] test_statistics fails after test_time

2018-07-21 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 92ce6a64afcebd414def3b80b18b56448792a587 by Stefan Krah (Miss 
Islington (bot)) in branch '3.7':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (GH-8376) 
(#8383)
https://github.com/python/cpython/commit/92ce6a64afcebd414def3b80b18b56448792a587


--

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread Stefan Krah


Stefan Krah  added the comment:


New changeset 9c136700aa1f755fa2ea64594688a0930b716597 by Stefan Krah (Miss 
Islington (bot)) in branch '3.6':
bpo-34179:  Make sure decimal context doesn't affect other tests.  (GH-8376) 
(#8384)
https://github.com/python/cpython/commit/9c136700aa1f755fa2ea64594688a0930b716597


--

___
Python tracker 

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



[issue34179] test_statistics fails after test_time

2018-07-21 Thread Stefan Krah


Stefan Krah  added the comment:

Ok, looks fixed to me.

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



[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-21 Thread Keith Campbell


Keith Campbell  added the comment:

> It's up to the OP to file an issue there though

Will do; thanks!

--

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Thanks by install do you mean running the test with an installed version of 
python 3.7.0 from package manager or as a downloaded binary ? I can reproduce 
it with an installed version from anaconda but the binary compiled on the 
latest 3.7 branch works fine. Unfortunately, I can't compile tcl 8.6.8 after 
several tries. I think the test was added after the release of 3.7.0 is made 
thus causing failure on the released binary but works fine with the compiled 
one. If the above is correct then the test will also fail with latest 3.6.6 
release.

# Test added : June 30, 2018 
(https://github.com/python/cpython/commit/42ea5226642c2a416b32278914fa4738093298ff)
# 3.7.0 final : June 27, 2018 
(https://github.com/python/cpython/commit/1bf9cc509326bc42cd8cb1650eb9bf64550d817e)

# Running test with installed version of python 3.7.0

➜  cpython git:(25326de) python3.7
Python 3.7.0 (default, Jun 28 2018, 02:32:19)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

➜  cpython git:(25326de) python3.7 Lib/test/test_tcl.py
patchlevel = 8.6.5
testCall (__main__.TclTest) ... ok
testCallException (__main__.TclTest) ... ok
testCallException2 (__main__.TclTest) ... ok
testEval (__main__.TclTest) ... ok
testEvalException (__main__.TclTest) ... ok
testEvalException2 (__main__.TclTest) ... ok
testEvalFile (__main__.TclTest) ... ok
testEvalFileException (__main__.TclTest) ... ok
testGetVar (__main__.TclTest) ... ok
testGetVarArray (__main__.TclTest) ... ok
testGetVarArrayException (__main__.TclTest) ... ok
testGetVarException (__main__.TclTest) ... ok
testLoadWithUNC (__main__.TclTest) ... skipped 'Requires Windows'
testPackageRequireException (__main__.TclTest) ... ok
testSetVar (__main__.TclTest) ... ok
testSetVarArray (__main__.TclTest) ... ok
testUnsetVar (__main__.TclTest) ... ok
testUnsetVarArray (__main__.TclTest) ... ok
testUnsetVarException (__main__.TclTest) ... ok
test_booleans (__main__.TclTest) ... ok
test_eval_null_in_result (__main__.TclTest) ... ok
test_evalfile_null_in_result (__main__.TclTest) ... ok
test_expr_bignum (__main__.TclTest) ... ok
test_exprboolean (__main__.TclTest) ... ok
test_exprdouble (__main__.TclTest) ... ok
test_exprlong (__main__.TclTest) ... ok
test_exprstring (__main__.TclTest) ... ok
test_getboolean (__main__.TclTest) ... ok
test_getdouble (__main__.TclTest) ... ok
test_getint (__main__.TclTest) ... ok
test_join (__main__.TclTest) ... FAIL
test_new_tcl_obj (__main__.TclTest) ... ok
test_passing_values (__main__.TclTest) ... ok
test_split (__main__.TclTest) ... ok
test_splitdict (__main__.TclTest) ... ok
test_splitlist (__main__.TclTest) ... ok
test_user_command (__main__.TclTest) ... ok
testFlattenLen (__main__.TkinterTest) ... ok
test_huge_string_builtins (__main__.BigmemTclTest) ... skipped 'not enough 
memory: 4.0G minimum needed'
test_huge_string_builtins2 (__main__.BigmemTclTest) ... skipped 'not enough 
memory: 12.0G minimum needed'
test_huge_string_call (__main__.BigmemTclTest) ... skipped 'not enough memory: 
10.0G minimum needed'

==
FAIL: test_join (__main__.TclTest)
--
Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 670, in test_join
check('{spam}')
  File "Lib/test/test_tcl.py", line 660, in check
self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? ++


--
Ran 41 tests in 0.108s

FAILED (failures=1, skipped=4)
Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 752, in 
test_main()
  File "Lib/test/test_tcl.py", line 749, in test_main
support.run_unittest(TclTest, TkinterTest, BigmemTclTest)
  File "/usr/lib/python3.7/test/support/__init__.py", line 1972, in run_unittest
_run_suite(suite)
  File "/usr/lib/python3.7/test/support/__init__.py", line 1891, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_tcl.py", line 670, in test_join
check('{spam}')
  File "Lib/test/test_tcl.py", line 660, in check
self.assertEqual(unpack(unpack(join([[value]]))), value)
AssertionError: 'spam' != '{spam}'
- spam
+ {spam}
? ++


Thanks

--

___
Python tracker 

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



[issue34181] Lib/test/test_typing.py failed when ran as a script

2018-07-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7915

___
Python tracker 

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



[issue34181] Lib/test/test_typing.py failed when ran as a script

2018-07-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 961360923e7997a04833652623ea549b0dc02262 by Serhiy Storchaka in 
branch 'master':
bpo-34181: Fix running Lib/test/test_typing.py as a script. (GH-8380)
https://github.com/python/cpython/commit/961360923e7997a04833652623ea549b0dc02262


--

___
Python tracker 

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



[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-21 Thread Yonatan Zunger


Yonatan Zunger  added the comment:

Definitely agree about the difference.

I'd say that either SystemExit or EOFError would be a reasonable thing for
the interactive session to do, but the combination of closing stdin and
SystemExit is really weird. Honestly, I would have just expected interact()
to return like an ordinary function when it was done; the logic of "it's
time to close the terminal window" feels like it belongs at a *much* higher
level of the stack.

On Fri, Jul 20, 2018 at 10:16 PM Terry J. Reedy 
wrote:

>
> Terry J. Reedy  added the comment:
>
> There is an important difference between a program saying 'I am done
> executing' and a user saying 'I am done with the interactive session'.
> This is especially true in an IDE where 'session' can include many editing
> and shell sessions.
>
> 'Stop executing'  happens when execution reaches the end of the file,
> which causes EOFError upon a read attempt.  It can also be done gracefully
> before the end of input with sys.exit(), which raises SystemExit.
>
> In Interactive Python, 'leave session' can be done with SystemExit or the
> EOF control signal, which appears to raise EOFError.  This suggests that
> quit() and exit(), which were added because newbies did not know the proper
> way to exit, should raise EOFError rather than SystemExit.  The fact that
> 'quit' displays 'Use quit() or Ctrl-Z plus Return to exit' (EOF on Windows)
> suggests the same.  But I need to experiment (another day).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33336] [imaplib] MOVE is a legal command

2018-07-21 Thread Matej Cepl


Change by Matej Cepl :


--
pull_requests: +7916

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Matthias Klose


Matthias Klose  added the comment:

this is the python3.7 build for Debian, so yes, installed via a package manager 
;) 

see
https://ci.debian.net/data/packages/unstable/amd64/p/python3.7/
for the test results.

and yes, that seems to be a regression compared to the 3.7.0 release.

--

___
Python tracker 

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



[issue34180] bool(Q) always return True for a priority queue Q

2018-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The class is not documented to support __len__() or __bool__(), so this is not 
a bug.  There is an empty() method provided for the purposes of testing whether 
a queue is empty or not.  Likewise, there is a qsize() method for determining 
the current size.

Note, these methods have a built in race condition -- the information may be 
out of date by the time it is used.  In general, an EAFP approach is preferred 
for reliable behavior (i.e. call get() in a try/except to see whether an Empty 
exception is raised).

FWIW, this module's API was designed by Guido a long time ago.  Presumably, he 
had his reasons for choosing empty(), full(), and qsize() over the __len__() 
method.  Once the API has been published and then become widely used, the time 
for debating his API decisions is over and we work with it as published.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
type: behavior -> enhancement
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-21 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue34182] Lib/test/test_pydoc.py failed when ran as a script

2018-07-21 Thread bbayles


Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue34182] Lib/test/test_pydoc.py failed when ran as a script

2018-07-21 Thread bbayles


Change by bbayles :


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

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Raymond, will we accept a patch for this?

If the patch is simple and minimal, then this seems like a minor but nice 
little improvement.

--

___
Python tracker 

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



[issue34178] test_tcl fails on the 3.7 branch

2018-07-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Got it. Thanks for the details. I understand the change in behavior since it 
was added as part of https://bugs.python.org/issue33974 after 3.7.0 but I don't 
know if this should be classified as a regression or as a bug fix after a 
stable release. This was merged to master, 3.7, 3.6 and 2.7 branches. 
https://bugs.python.org/issue33974#msg320663 also states that it needs a more  
a complex fix. I don't know the policy and I will leave it to @serhiy.storchaka 
to decide if it's a regression or a bug fix.

Thanks

--

___
Python tracker 

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



[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34186] [3.6.6 on macOS] os.listdir replacing "/" with ":"

2018-07-21 Thread Todd


New submission from Todd :

Short back story - I am organizing music where "/" appears in a lot a metadata 
for the songs. For instance, the artist "AC/DC" or "ACDC w/ Axl Rose". On 
macOS, it is acceptable to name a folder "AC/DC" while the slash would cause an 
issue in Windows.

Issue - While using os.listdir to list a number of artist folders inside my 
iTunes music folder os.listdir replaced "/" with ":" IF the "/" appears in the 
name itself. It does not replace the slash delimiters. 

I have included a screen shot. On the right side of the image is an example 
directory I made with a few folders. Two of the folders have "/" in their 
names.  On the left side of the image is the Python shell showing the use of 
os.listdir along with the output. You'll notice that the listed directories 
don't include "/", but instead include ":".

--
components: macOS
files: Screen Shot 2018-07-21 at 9.29.59 PM.png
messages: 322128
nosy: coleman4...@hotmail.com, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: [3.6.6 on macOS] os.listdir replacing "/" with ":"
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47708/Screen Shot 2018-07-21 at 9.29.59 
PM.png

___
Python tracker 

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



[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-21 Thread Windson Yang


Windson Yang  added the comment:

A patch would just add 

def __del__(self):
self.terminate()

in the Pool object.

--

___
Python tracker 

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



[issue34186] [3.6.6 on macOS] os.listdir replacing "/" with ":"

2018-07-21 Thread Zachary Ware


Zachary Ware  added the comment:

That's nothing to do with Python and everything to do with macOS.  As a test, 
open Terminal, do `ls ~/Example`, and you'll see `AC:DC` instead of `AC/DC`.  
As a further test, do `mkdir ~/Example/dir:with:colons` and then have a look in 
Finder.

See here [1] for more information.

[1] 
https://apple.stackexchange.com/questions/173529/when-did-the-colon-character-become-an-allowed-character-in-the-filesystem

--
nosy: +zach.ware
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



[issue940286] pydoc.Helper.help() ignores input/output init parameters

2018-07-21 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +7918

___
Python tracker 

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



[issue940286] pydoc.Helper.help() ignores input/output init parameters

2018-07-21 Thread Berker Peksag

Berker Peksag  added the comment:

I just noticed the same bug described by Éric in msg127840. PR 8390 should fix 
it. Unfortunately, it wasn't easy to create a test case, so I skipped that 
part. I'm open to suggestions if you have an idea on how to write a simple test 
that reproduces the bug.

Éric, could you confirm that the attached PR fixes the bug?

--
keywords:  -easy
nosy: +berker.peksag
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.1, Python 
3.2

___
Python tracker 

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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-21 Thread Noah Haasis


Noah Haasis  added the comment:

This are all the classes where the keywords are missing in the docs and their 
missing keywords:
TopLevel
['padx', 'pady']

Checkbutton
['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue']

Entry
['disabledbackground', 'disabledforeground', 'readonlybackground']

Frame
['padx', 'pady']

Label
['compound']

Radiobutton
['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue']

Text
['blockcursor', 'endline', 'inactiveselectbackground', 'insertunfocussed', 
'startline', 'tabstyle']

Spinbox
['validatecommand', 'values']

Menubutton
['activebackground', 'activeforeground', 'anchor', 'background', 'bitmap', 
'borderwidth', 'compound', 'cursor', 'direction', 'disabledforeground', 'font', 
'foreground', 'height', 'highlightbackground', 'highlightcolor', 
'highlightthickness', 'image', 'indicatoron', 'justify', 'menu', 'padx', 
'pady', 'relief', 'state', 'takefocus', 'text', 'textvariable', 'underline', 
'width', 'wraplength']

Message
['anchor', 'aspect', 'background', 'borderwidth', 'cursor', 'font', 
'foreground', 'highlightbackground', 'highlightcolor', 'highlightthickness', 
'justify', 'padx', 'pady', 'relief', 'takefocus', 'text', 'textvariable', 
'width']

The missing keywords appear in the OPTIONS list in the test but not in the 
docstring.

--

___
Python tracker 

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



[issue21446] Update reload fixer to use importlib instead of imp

2018-07-21 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +7919

___
Python tracker 

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



[issue21446] Update reload fixer to use importlib instead of imp

2018-07-21 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks, Brett. I've opened PR 8391. Should we backport this to 3.7? We do 
backport mimetypes additions (see 
https://github.com/python/cpython/commit/8204b903683f9e0f037ccfaa87622716019914d7
 for an example) I think lib2to3 falls into the same category as mimetypes and 
it might be better to keep fixers in sync at least in 3.7 and 3.8.

--

___
Python tracker 

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