[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for the report.  The error line "del mainmenu.menudefs[-2][1][0]" 
follows this comment.
  # Remove the 'Configure Idle' entry from the options menu, it is in the
  # application menu as 'Preferences'
However, -2 is the Window menu, while Options is -3.  Before the c1b patch, 
Window started with one entry, Zoom Height.  This explains why 'Configure IDLE' 
is still present, and Zoom Height is absent.  I did not notice the latter gone 
before because there is an Apple-supplied Zoom entry, which maximizes width as 
well as height.  I did not notice that this was a replacement.

After the patch, Window starts empty, which is why even index 0 fails.  So try 
changing -2 to -3 in macosx, getting [-3][1][0] and see if everything works.

When the dialog is removed, the menu will start with a separator bar.  It 
should go to.  So next try [-3][1][0:1]

--
stage:  -> needs patch
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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Not sure. IMHO it is not a *notable* change worth to be mentioned in 
https://docs.python.org/3/whatsnew/3.7.html#notable-changes-in-python-3-7-2

--

___
Python tracker 

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



[issue25522] IDLE: warn if save-as name matches stdlib name

2019-01-18 Thread Vedran Čačić

Vedran Čačić  added the comment:

Many beginners don't write files in order to import them. For them, these 
name-checking is simply adding noise. If you want to do something in this area, 
I think a much more useful (and difficult) course of action would be to check 
on the opposite end. If an AttributeError "module blah has no attribute foo" is 
raised, then check whether a file in the current directory (or simply the 
current file) is named blah, and there is also a stdlib blah that has fool.

--
nosy: +veky

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks, I can confirm that your fix launches idlelib.

Not working : del mainmenu.menudefs[-2][1][0]

Working : del mainmenu.menudefs[-3][1][0]

Options menu listing on master with the fix with "Show code context" disabled.
- Show code context
- Zoom height

git checkout v3.7.2 Lib/idlelib/ also works fine so I guess it's a regression 
but I don't know if this affects other versions of Mac OS.

Options menu listing on 3.7.2
- Configure IDLE
- Code Context

--

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +11326

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +11326, 11327

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +11326, 11327, 11328

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Dong-hee Na


Dong-hee Na  added the comment:

I've upload PR 11604
Thanks always

--

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-18 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +patch, patch
pull_requests: +11329, 11330
stage:  -> patch review

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-18 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-18 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +patch, patch, patch
pull_requests: +11329, 11330, 11331
stage:  -> patch review

___
Python tracker 

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 36d9e9a4d5238d5a2f09679b6c51be66fbfc12c4 by Victor Stinner 
(Dong-hee Na) in branch 'master':
bpo-35283: Update the docstring of threading.Thread.join method (GH-11596)
https://github.com/python/cpython/commit/36d9e9a4d5238d5a2f09679b6c51be66fbfc12c4


--

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


New submission from STINNER Victor :

The following test_tarfile tests fail on ppc64 when using tmpfs filesystem 
(which is the case on RHEL package build server):

* test_sparse_file_00 (test.test_tarfile.GNUReadTest)
* test_sparse_file_01 (test.test_tarfile.GNUReadTest)
* test_sparse_file_10 (test.test_tarfile.GNUReadTest)
* test_sparse_file_old (test.test_tarfile.GNUReadTest)

Example of failure:

==
FAIL: test_sparse_file_00 (test.test_tarfile.GNUReadTest)
--
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.6/Lib/test/test_tarfile.py", line 964, 
in test_sparse_file_00
self._test_sparse_file("gnu/sparse-0.0")
  File "/builddir/build/BUILD/Python-3.6.6/Lib/test/test_tarfile.py", line 958, 
in _test_sparse_file
self.assertLess(s.st_blocks * 512, s.st_size)
AssertionError: 131072 not less than 86016

Bug first report on RHEL8:
https://bugzilla.redhat.com/show_bug.cgi?id=1639490


test_tarfile has _fs_supports_holes() function to check if the filesystem 
supports sparse files with holes. The function returns True on:

* ext4 filesystem on x86_64 on my Fedora 29 (kernel 4.19)
* ext4 filesystem on x86_64 on my Fedora 29 (kernel 4.19)
* XFS filesystem on ppc64le (kernel 4.18)
* tmpfs filesystem on ppc64le (kernel 4.18)

In short, it always return True on x86_64 and ppc64le Linux kernels.

Problem: in practice, "tmpfs filesystem on ppc64le (kernel 4.18)" doesn't fully 
support sparse files.

--

Example from:
https://bugzilla.redhat.com/show_bug.cgi?id=1639490#c5

# ls -lhs ~/sparse 
48K -rw-r--r--. 1 root root 84K Jan 18 05:36 /root/sparse

Copy a sparse file from XFS to tmpfs: cp --sparse=always and fallocate --dig 
fail to punch holes, the file always take 128K on disk on tmpfs.

# cp sparse /root/mytmp/sparse --sparse=always
# ls -lhs /root/mytmp/sparse 
128K -rw-r--r--. 1 root root 84K Jan 18 06:10 /root/mytmp/sparse
# fallocate --dig /root/mytmp/sparse
# ls -lhs /root/mytmp/sparse 
128K -rw-r--r--. 1 root root 84K Jan 18 06:10 /root/mytmp/sparse

Counter example on XFS, source and destionation files use 48K on disk fo 84K of 
data:

# cp sparse sparse2 --sparse=always
# ls -lhs sparse*
48K -rw-r--r--. 1 root root 84K Jan 18 05:36 sparse
48K -rw-r--r--. 1 root root 84K Jan 18 06:13 sparse2

--

Attached PR fix the _fs_support_holes() heuristic to return properly False on 
tmpfs on ppc64le.

--
components: Tests
messages: 333956
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_tarfile fails on ppc64le when using tmpfs filesystem
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



[issue35762] subprocess.Popen with universal_newlines and nonblocking streams fails with "can't concat NoneType to bytes"

2019-01-18 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
title: subprocess.Popen with universal_newlines and nonblocking streams failes 
with "can't concat NoneType to bytes" -> subprocess.Popen with 
universal_newlines and nonblocking streams fails with "can't concat NoneType to 
bytes"

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch, patch
pull_requests: +11332, 11333
stage:  -> patch review

___
Python tracker 

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



[issue35755] Remove current directory from posixpath.defpath to enhance security

2019-01-18 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue35773] test_bdb fails on AIX bot (regression)

2019-01-18 Thread Michael Felt


New submission from Michael Felt :

I see in the bot history that test_bdb is now failing on AIX

https://buildbot.python.org/all/#/builders/161/builds/718/steps/4/logs/stdio

== CPython 3.8.0a0 (heads/master:a37f52436f, Jan 15 2019, 22:53:01) [C]
== AIX-1-00C291F54C00-powerpc-32bit big-endian
== cwd: 
/home/buildbot/buildarea/3.x.aixtools-aix-power6/build/build/test_python_5177546
== CPU count: 8
== encodings: locale=ISO8859-15, FS=iso8859-15

FYI: it is not failing on the GCC based bot (mine is based on XLC).

--
components: Tests
messages: 333957
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: test_bdb fails on AIX bot (regression)
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



[issue35774] ASAN, memory leak

2019-01-18 Thread Dhiraj


New submission from Dhiraj :

Hi Team, 

I have compiled cpython via clang using ASAN and memory leak was observed.

After successful build of python,
1. Run python
2. Ctrl + D

==21461==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 257790 byte(s) in 93 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x644d77 in PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:640:12

Direct leak of 1640 byte(s) in 3 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x644d77 in PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:640:12
#4 0x96cea4 in _PyObject_GC_Malloc 
/home/input0/Desktop/cpython/Modules/gcmodule.c:1908:12
#5 0x96cea4 in _PyObject_GC_NewVar 
/home/input0/Desktop/cpython/Modules/gcmodule.c:1937

Direct leak of 663 byte(s) in 1 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x644d77 in PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:640:12
#4 0x8b9dd8 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1362:20
#5 0x8b84a5 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1194:18
#6 0x8b9e09 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1365:22
#7 0x8bf86a in read_object 
/home/input0/Desktop/cpython/Python/marshal.c:1451:9
#8 0x8bf86a in marshal_loads_impl 
/home/input0/Desktop/cpython/Python/marshal.c:1763
#9 0x8bf86a in marshal_loads 
/home/input0/Desktop/cpython/Python/clinic/marshal.c.h:158
#10 0x564da7 in _PyMethodDef_RawFastCallKeywords 
/home/input0/Desktop/cpython/Objects/call.c

Direct leak of 579 byte(s) in 1 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x644d77 in PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:640:12
#4 0x8b9dd8 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1362:20
#5 0x8b84a5 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1194:18
#6 0x8b9e09 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1365:22
#7 0x8b84a5 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1194:18
#8 0x8b9e09 in r_object 
/home/input0/Desktop/cpython/Python/marshal.c:1365:22
#9 0x8b409d in PyMarshal_ReadObjectFromString 
/home/input0/Desktop/cpython/Python/marshal.c:1568:14
#10 0x8a0d81 in get_frozen_object 
/home/input0/Desktop/cpython/Python/import.c:1277:12
#11 0x8a0d81 in _imp_get_frozen_object_impl 
/home/input0/Desktop/cpython/Python/import.c:2036
#12 0x8a0d81 in _imp_get_frozen_object 
/home/input0/Desktop/cpython/Python/clinic/import.c.h:198
#13 0x5623eb in _PyCFunction_FastCallDict 
/home/input0/Desktop/cpython/Objects/call.c:584:14
#14 0x5623eb in PyCFunction_Call 
/home/input0/Desktop/cpython/Objects/call.c:789

Direct leak of 536 byte(s) in 1 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x6403b0 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x6403b0 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x6403b0 in pymalloc_realloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1869
#4 0x6403b0 in _PyObject_Realloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1888
#5 0x644ead in PyObject_Realloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:658:12

Indirect leak of 15640 byte(s) in 17 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:1550
#3 0x644d77 in PyObject_Malloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:640:12
#4 0x675f9a in PyType_GenericAlloc 
/home/input0/Desktop/cpython/Objects/typeobject.c:975:15

Indirect leak of 7440 byte(s) in 7 object(s) allocated from:
#0 0x4f1460 in malloc (/home/input0/Desktop/cpython/python+0x4f1460)
#1 0x63fc59 in PyMem_RawMalloc 
/home/input0/Desktop/cpython/Objects/obmalloc.c:527:12
#2 0x63fc59 in _PyObje

[issue35774] ASAN, memory leak

2019-01-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Karthikeyan,

Thanks for catching this!  Did you want to submit the patch for it or did you 
want me to make the PR?  We're still working on the tests for the menus, so 
this would just be a code change.

--

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Cheryl, feel free to submit a patch since I have less exposure to IDLE code. I 
can manually test the PR on my Mac and report back since this seems to be a Mac 
specific patch. It would be helpful if someone with access to other Mac OS 
versions can possibly test this so that it doesn't cause issues on other 
versions.

Applying the fix suggested by Terry on my machine and running tests

$ git diff | cat
diff --git a/Lib/idlelib/macosx.py b/Lib/idlelib/macosx.py
index 9be4ed2ec4..16a13a0f2e 100644
--- a/Lib/idlelib/macosx.py
+++ b/Lib/idlelib/macosx.py
@@ -178,7 +178,7 @@ def overrideRootMenu(root, flist):
 del mainmenu.menudefs[-1][1][0:2]
 # Remove the 'Configure Idle' entry from the options menu, it is in the
 # application menu as 'Preferences'
-del mainmenu.menudefs[-2][1][0]
+del mainmenu.menudefs[-3][1][0]
 menubar = Menu(root)
 root.configure(menu=menubar)
 menudict = {}

$ ./python.exe -m unittest idlelib.idle_test
sss..s..ss..ss...s...s.s.s...s.ss..sss.sssss..s..s..s...s.s.s.ss..sss.....sss..s.sss...ss...s.s.s
--
Ran 241 tests in 1.246s

OK (skipped=66)

--

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +lars.gustaebel

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-18 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11334

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-18 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11334, 11335

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-18 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11334, 11335, 11336

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-18 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

My proposal vastly improves the situation for Decimal. I will write a PR for 
this and I hope that it won't be rejected just because it's not perfect.

--

___
Python tracker 

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



[issue35761] Allow dataclasses to be updated in place

2019-01-18 Thread Théophile Chevalier

Théophile Chevalier  added the comment:

I understand your points, I'll give an example with a simplified version of my 
problem:


import dataclasses
import othermodule # is an external dependency

@dataclass
class City:
name: str
position: othermodule.Point # Point is a dataclass

def update_position(self):
obj = anymodule.get_position(name=self.name)

# The classic solution would be to do
self.position.x = obj.x
self.position.y = obj.y

# what if othermodule adds z (altitude) to Point?
# we could imagine:
dataclasses.update(self.position, obj)

# I'm currently doing:
self.position.__dict__.update(obj.__dict__)

Maybe I simply handle the issue the wrong way, so my dataclass proposal is out 
of scope.

--

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

> Not for Decimal! In fact sleep(Decimal("0.99")) is interpreted as sleep(0) 
> because __int__ is used to convert.

Oh oh. I didn't know that. It should be fixed.

--

___
Python tracker 

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



[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

Like discussed in #30999, the attached PR adds a general selection function to 
the statistics module. This allows to simply get the element at a given 
quantile of a collection.

https://www.cs.rochester.edu/~gildea/csc282/slides/C09-median.pdf

--
components: Library (Lib)
messages: 333964
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Add a general selection function to statistics
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



[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +rhettinger, steven.daprano

___
Python tracker 

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



[issue35775] Add a general selection function to statistics

2019-01-18 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
keywords: +patch, patch
pull_requests: +11337, 11338
stage:  -> patch review

___
Python tracker 

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



[issue30999] statistics module: add "key" keyword argument to median, mode, ...

2019-01-18 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I suggest we closed this issue in favor of #35775 to discuss adding a selection 
function and the attached PR.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c2647f2e45d2741fc44fd621966e05d15f2cd26a by Victor Stinner 
(Dong-hee Na) in branch '3.7':
bpo-35283: Add pending deprecation warning for Thread.isAlive (GH-11604)
https://github.com/python/cpython/commit/c2647f2e45d2741fc44fd621966e05d15f2cd26a


--

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-18 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I guess I should wait until PR 11507 is merged, to avoid merge conflicts.

--

___
Python tracker 

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



[issue35761] Allow dataclasses to be updated in place

2019-01-18 Thread Théophile Chevalier

Théophile Chevalier  added the comment:

I cannot do self.position = obj because I have references on position elsewhere.

--

___
Python tracker 

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



[issue35707] time.sleep() should support objects with __float__

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

No please don't wait for my PR 11507. I'm not sure that it's correct, and this 
bug is more important than NaN/inf :-)

--

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2019-01-18 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, I forgot to attached my test script: create_sparse.py

--
Added file: https://bugs.python.org/file48067/create_sparse.py

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread Florian Weimer


Florian Weimer  added the comment:

offsets = ( 4096, 12288, 20480, 28672, 36864, 45056, 53248, 61440, 69632,
77824,)

These offsets are less than 64 KiB apart.  On systems with a 64 KiB page size, 
this will not result in a sparse file on tmpfs because the effective block size 
is the page size (tmpfs lives in the page cache).

Red Hat Enterprise Linux uses 64 KiB pages on aarch64, ppc64, ppc64le.  Only 
s390x and x86_64 use 4 KiB pages.

--
nosy: +fweimer

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Ah yes, I confirm that ppc64le uses 64 KiB page size:

# python3
Python 3.6.8 (default, Jan 11 2019, 01:44:37) 
[GCC 8.2.1 20180905 (Red Hat 8.2.1-3)] on linux
>>> import resource
>>> resource.getpagesize()
65536

whereas my x86_64 laptop uses 4 KiB page size:

$ python3
Python 3.7.2 (default, Jan  3 2019, 09:14:01) 
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
>>> import resource
>>> resource.getpagesize()
4096

--

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11339, 11340, 11341

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11339, 11340

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11339

___
Python tracker 

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



[issue35772] test_tarfile fails on ppc64le when using tmpfs filesystem

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

I updated PR 11606 to mention the link between tmpfs and the page size.

--

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 34de2d312b3687994ddbc29adb66e88f672034c7 by Victor Stinner 
(Christian Heimes) in branch 'master':
bpo-35045: Accept TLSv1 default in min max test (GH-11510)
https://github.com/python/cpython/commit/34de2d312b3687994ddbc29adb66e88f672034c7


--

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11342, 11343

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11342, 11343, 11344

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11342

___
Python tracker 

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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot, OpenSSL 1.1.1a

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot -> test_ssl 
fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot, OpenSSL 1.1.1a

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is not affected: test_ssl doesn't test minimum_version.

--

___
Python tracker 

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



[issue34834] test_ssl.test_options does not correctly account for built-in ctx defaults with openssl 1.1.1

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 doesn't support properly OpenSSL 1.1.1 yet, see:

* PR 10607
* PR 10608

I would prefer to have _ssl.OP_ENABLE_MIDDLEBOX_COMPAT rather than have an 
hardcoded constant in test_ssl. In master, test_ssl has been fixed and the 
constant has been added by:

commit 05d9fe32a1245b9a798e49e0c1eb91f110935b69
Author: Christian Heimes 
Date:   Tue Feb 27 08:55:39 2018 +0100

bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (#5663)

* bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes

Misc fixes and workarounds for compatibility with OpenSSL 1.1.1-pre1 and
TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2. Other tests currently
fail because the threaded or async test servers stop after failure.

I'm going to address these issues when OpenSSL 1.1.1 reaches beta.

OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's 
test suite needs
it to verify default options.

Signed-off-by: Christian Heimes 

diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index 7371024dce..5d5232eda3 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -831,6 +831,15 @@ Constants
 
.. versionadded:: 3.3
 
+.. data:: OP_ENABLE_MIDDLEBOX_COMPAT
+
+   Send dummy Change Cipher Spec (CCS) messages in TLS 1.3 handshake to make
+   a TLS 1.3 connection look more like a TLS 1.2 connection.
+
+   This option is only available with OpenSSL 1.1.1 and later.
+
+   .. versionadded:: 3.8
+
 .. data:: OP_NO_COMPRESSION
 
Disable compression on the SSL channel.  This is useful if the application
(...)

--
nosy: +vstinner

___
Python tracker 

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



[issue33995] test_min_max_version in test_ssl.py fails when Python is built against LibreSSL; {min,max}imum_version behavior differs from OpenSSL

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, this issue looks like bpo-35045 which has been fixed.

--
nosy: +vstinner
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_min_max_version (test.test_ssl.ContextTests) fails on 
Fedora 29+ and openssl 1.1.1

___
Python tracker 

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



[issue20479] Efficiently support weight/frequency mappings in the statistics module

2019-01-18 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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



[issue20479] Efficiently support weight/frequency mappings in the statistics module

2019-01-18 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Is this proposal still relevant? If so, I would like to work on its 
implementation.

I think the third proposition to change the API to have a new `weights` 
parameter is the best has it does not blindly suppose that a tuple is a pair 
(value, weight) which could not always be true.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread miss-islington


miss-islington  added the comment:


New changeset 6ca7183b3549d3eaa8a0c3b73255eeac24d7974d by Miss Islington (bot) 
in branch '3.7':
bpo-35045: Accept TLSv1 default in min max test (GH-11510)
https://github.com/python/cpython/commit/6ca7183b3549d3eaa8a0c3b73255eeac24d7974d


--
nosy: +miss-islington

___
Python tracker 

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



[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Christian. I merged your PR.

I like the simplicity of your fix ;-)

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



[issue30212] test_ssl.py is broken in Centos7

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

@david-cpi: Ping? Can you please try comments in my previous comment?

Without feedback from your side, I will close the issue as "outdated" in 2 
weeks.

--

___
Python tracker 

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



[issue21257] Document parse_headers function of http.client

2019-01-18 Thread Brian Curtin


Brian Curtin  added the comment:


New changeset 478f8291327a3e3ab17b5857699565df43a9e952 by Brian Curtin (Ashwin 
Ramaswami) in branch 'master':
bpo-21257: document http.client.parse_headers (GH-11443)
https://github.com/python/cpython/commit/478f8291327a3e3ab17b5857699565df43a9e952


--
nosy: +brian.curtin

___
Python tracker 

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



[issue30212] test_ssl.py is broken in Centos7

2019-01-18 Thread David Antonio Garcia Campos


David Antonio Garcia Campos  added the comment:

Hello Victor,
I just saw your message. I will try to setup my enviorment and will come back 
to you.
BR David Garcia

--
nosy: +David Antonio Garcia Campos

___
Python tracker 

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



[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-18 Thread Tasy


Tasy  added the comment:

Compiler:
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4

OS:
$ uname -a
Linux machine 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 
2018 x86_64 x86_64 x86_64 GNU/Linux

Home directory is of type nfs in case that is relevant.
I'll try to do the gdb thing over the weekend.

--

___
Python tracker 

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



[issue20399] Comparison of memoryview

2019-01-18 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

The lack of support for the rich comparison operators on even the most basic 
memoryviews (e.g. 'B' format) means that memoryview is still a regression from 
some of the functionality buffer offered back in Python 2 ( 
https://stackoverflow.com/a/13574862/364696 ); you either need to convert back 
to bytes (losing the zero-copy behavior) or hand-write a comparator of your own 
to allow short-circuiting (which thanks to sort not taking cmp functions 
anymore, means you need to write it, then wrap it with functools.cmp_to_key if 
you're sorting, not just comparing individual items).

While I'll acknowledge it gets ugly to try to support every conceivable format, 
it seems like, at the very least, we could provide the same functionality as 
buffer for 1D contiguous memoryviews in the 'B' and 'c' formats (both of which 
should be handleable by a simple memcmp).

--
nosy: +josh.r

___
Python tracker 

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



[issue20399] Comparison of memoryview

2019-01-18 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue35776] Virtualenv 16.2.0 Error Finding Pip

2019-01-18 Thread Nazar


New submission from Nazar :

Issue resolved by downgrading virtualenv from 16.2.0 to 15.1.0.

$ virtualenv -p python my_venv
Already using interpreter /usr/bin/python
New python executable in /home/your_user_name/my_venv/bin/python
Cannot find a wheel for setuptools
Cannot find a wheel for pip
Installing setuptools, pip, wheel...

  Complete output from command /home/your_user_name/my_venv/bin/python - 
setuptools pip wheel:
  Traceback (most recent call last):
  File "", line 11, in 
ImportError: No module named pip

...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 11, in 
load_entry_point('virtualenv==16.2.0', 'console_scripts', 'virtualenv')()
  File "build/bdist.cygwin--x86_64/egg/virtualenv.py", line 768, in 
main
  File "build/bdist.cygwin--x86_64/egg/virtualenv.py", line 1030, in 
create_environment
  File "build/bdist.cygwin--x86_64/egg/virtualenv.py", line 983, in 
install_wheel
  File "build/bdist.cygwin--x86_64/egg/virtualenv.py", line 861, in 
call_subprocess
OSError: Command /home/your_user_name/my_venv/bin/python - setuptools pip wheel 
failed with error code 1

--
components: Installation
messages: 333986
nosy: NazarTrilisky
priority: normal
severity: normal
status: open
title: Virtualenv 16.2.0 Error Finding Pip
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue20399] Comparison of memoryview

2019-01-18 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Josh, could you say what your use case is?

--

___
Python tracker 

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



[issue35775] Add a general selection function to statistics

2019-01-18 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue34782] Pdb crashes when code is executed in a mapping that does not define `__contains__`

2019-01-18 Thread Henry Chen


Henry Chen  added the comment:

An attempt to clarify the issue in my own mind:

def foo():
# import pdb; pdb.set_trace()
exec('pass', {}, FakeContainer())

This function runs successfully. But if you uncomment the pdb line and then 
step thru in the pdb console, there is an Exception.

I *think* the underlying principle is that code that runs normally should also 
run under pdb, which this example violates. However, to adhere to the principle 
100% could be a very steep technical cost.

Alternatively, I'd argue that the function should NOT run even without pdb, 
since exec requires a (complete) mapping type according to the documentation. 
Perhaps the thing to do is to add more stringent type checking to exec and eval?

--

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11345

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11345, 11346

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-01-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11345, 11346, 11347

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Since it is my fix, I will write the PR.  But first, please test part 2, 
changing '0' to '0:1', just to make sure it works.

c1b added 'None,' (for separater bar) after the configdialog entry.  When the 
configdialog entry is removed, the None should be also.  On Windows, a menu 
that starts with None starts with a visible bar.  On my Mac Mohave, and perhaps 
on your machine, it is supressed.  But a) I would rather have the data 
structure match what is shown, and b) we cannot know if the supression occurs 
on all versions of macOS and predecessors.

--

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

On Fedora 29 with OpenSSL 1.1.1 FIPS  11 Sep 2018, test_connect_cadata() of 
test_ssl fails randomly:

---
$ ./python -m test -u all -F -m test_connect_cadata test_ssl 
Run tests sequentially
0:00:00 load avg: 0.43 [  1] test_ssl
test test_ssl failed -- Traceback (most recent call last):
  File "/home/vstinner/prog/python/3.6/Lib/test/test_ssl.py", line 1642, in 
test_connect_cadata
s.connect(self.server_addr)
  File "/home/vstinner/prog/python/3.6/Lib/ssl.py", line 1109, in connect
self._real_connect(addr, False)
  File "/home/vstinner/prog/python/3.6/Lib/ssl.py", line 1100, in _real_connect
self.do_handshake()
  File "/home/vstinner/prog/python/3.6/Lib/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
  File "/home/vstinner/prog/python/3.6/Lib/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

test_ssl failed

== Tests result: FAILURE ==

1 test failed:
test_ssl

Total duration: 131 ms
Tests result: FAILURE
---

This bug has been fixed in master by commit 
529525fb5a8fd9b96ab4021311a598c77588b918. It was partially backported in 3.6 
with commit 2a4ee8aa01d61b6a9c8e9c65c211e61bdb471826, but the backport is 
incomplete.

I wrote PR 11612 to backport remaining fixes.

--
nosy: +vstinner

___
Python tracker 

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



[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-18 Thread David Heiberg


David Heiberg  added the comment:

Agreed. I will fix the documentation and submit a PR this weekend hopefully.

--

___
Python tracker 

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



[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-18 Thread STINNER Victor


STINNER Victor  added the comment:

Hum. Are you aware that PGO with GCC is broken on such old and unsupported 
Ubuntu version?

My old note about that:

"PGO is broken on Ubuntu 14.04 LTS with GCC 4.8.4-2ubuntu1~14.04: 
Modules/socketmodule.c:7743:1: internal compiler error: in edge_badness, at 
ipa-inline.c:895"

https://pyperformance.readthedocs.io/usage.html#compile

See also https://bugs.python.org/issue31963

I suggest you to not use PGO compilation on old Ubuntu. Maybe upgrade to latest 
Ubuntu LTS?

--

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Terry,

I've started working on a PR to change menudefs to a dictionary.  Since 
dictionaries are in guaranteed order now, it would be easier to reference the 
menus by their name instead of an index number.

--

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-18 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

>> * pass_fds: there is not API to mark a fd as inheritable (clear O_CLOEXEC 
>> flag)

> POSIX has a bug for this [5]. It's marked fixed, but the current POSIX docs 
> doesn't reflect the changes. The idea is to make 
> posix_spawn_file_actions_adddup2() clear O_CLOEXEC if the source and the 
> destination are the same (unlike dup2(), which would do nothing). musl has 
> already implemented the new behavior [6], but glibc hasn't.

Update: glibc has implemented it for 2.29 
(https://sourceware.org/bugzilla/show_bug.cgi?id=23640).

--

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> Since it is my fix, I will write the PR.  But first, please test part 2, 
> changing '0' to '0:1', just to make sure it works.

Just tested it and it works fine with slice. Please find the respective diff 
and options menu displayed as below : 

git diff | cat
diff --git a/Lib/idlelib/macosx.py b/Lib/idlelib/macosx.py
index 9be4ed2ec4..16a13a0f2e 100644
--- a/Lib/idlelib/macosx.py
+++ b/Lib/idlelib/macosx.py
@@ -178,7 +178,7 @@ def overrideRootMenu(root, flist):
 del mainmenu.menudefs[-1][1][0:2]
 # Remove the 'Configure Idle' entry from the options menu, it is in the
 # application menu as 'Preferences'
-del mainmenu.menudefs[-2][1][0]
+del mainmenu.menudefs[-3][1][0]
 menubar = Menu(root)
 root.configure(menu=menubar)
 menudict = {}

Options menu
- Show code context (disabled)
- Zoom height

git diff | cat
diff --git a/Lib/idlelib/macosx.py b/Lib/idlelib/macosx.py
index 9be4ed2ec4..d6a1b376a1 100644
--- a/Lib/idlelib/macosx.py
+++ b/Lib/idlelib/macosx.py
@@ -178,7 +178,7 @@ def overrideRootMenu(root, flist):
 del mainmenu.menudefs[-1][1][0:2]
 # Remove the 'Configure Idle' entry from the options menu, it is in the
 # application menu as 'Preferences'
-del mainmenu.menudefs[-2][1][0]
+del mainmenu.menudefs[-3][1][0:1]
 menubar = Menu(root)
 root.configure(menu=menubar)
 menudict = {}

Options menu
- Show code context (disabled)
- Zoom height

--

___
Python tracker 

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



[issue35776] Virtualenv 16.2.0 Error Finding Pip

2019-01-18 Thread Zachary Ware


Zachary Ware  added the comment:

virtualenv is not part of the Python standard library; please open an issue on 
the virtualenv bug tracker (https://github.com/pypa/virtualenv/issues).

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



[issue33944] Deprecate and remove pth files

2019-01-18 Thread Vedran Čačić

Vedran Čačić  added the comment:

I have a directory inside my home directory, and inside it I have files with 
various utilities I have written over the years. So far, whenever I have 
installed a new version of Python, I have simply put a util.pth into 
site-packages. If you remove that possibility, what am I supposed to do? Every 
other solution is either much more complicated, or doesn't enable me to evolve 
my utilities inplace, or both. What am I missing? (My OS is Windows, and 
shortcuts don't work, I've tried.)

--
nosy: +veky

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Cheryl, that sort of change needs an issue for discussion before going very 
far.  I am dubious that it will work (but you can try to show otherwise).

1. overrideRootMenu does an insertion that I don't think you can do with a dict.
  mainmenu.menudefs[0][1].insert(6, closeItem)

2. The structure of menudefs is part of the extension interface.  (The file 
should say so.)  The test extension zzdummy is incomplete.  test_zzdummy has 
not yet been written, and the definition of ZaDummy.menudefs, currently 
commented out, needs to me made conditional on whether tests are being run 
(__init__.testing)

--

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2019-01-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +11348

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2019-01-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +11348, 11349

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2019-01-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +11348, 11349, 11350

___
Python tracker 

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



[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-18 Thread Tasy


Tasy  added the comment:

compiling without optimizations worked.

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

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch
pull_requests: +11351, 11352
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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch, patch, patch
pull_requests: +11351, 11352, 11353
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



[issue17005] Add a topological sort algorithm

2019-01-18 Thread Gareth Rees


Gareth Rees  added the comment:

I approve in general with the principle of including a topological sort 
algorithm in the standard library. However, I have three problems with the 
approach in PR 11583:

1. The name "topsort" is most naturally parsed as "top sort" which could be 
misinterpreted (as a sort that puts items on top in some way). If the name must 
be abbreviated then "toposort" would be better.

2. "Topological sort" is a terrible name: the analogy with topological graph 
theory is (i) unlikely to be helpful to anyone; and (ii) not quite right. I 
know that the name is widely used in computing, but a name incorporating 
"linearize" or "linear order" or "total order" would be much clearer.

3. The proposed interface is not suitable for all cases! The function topsort 
takes a list of directed edges and returns a linear order on the vertices in 
those edges (if any linear order exists). But this means that if there are any 
isolated vertices (that is, vertices with no edges) in the dependency graph, 
then there is no way of passing those vertices to the function. This means that 
(i) it is inconvenient to use the proposed interface because you have to find 
the isolated vertices in your graph and add them to the linear order after 
calling the function; (ii) it is a bug magnet because many programmers will 
omit this step, meaning that their code will unexpectedly fail when their graph 
has an isolated vertex. The interface needs to be redesigned to take the graph 
in some other representation.

--
nosy: +g...@garethrees.org

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I'll submit a quick PR as a PoC.  Tal emailed with additional ideas about 
menudefs, so I agree that another issue would probably be suitable for more 
discussion.

I haven't looked at the extensions too closely yet, but the insert you're 
referring to is actually on the 'values' part, so it's not an issue.

mainmenu.menudefs[0][1] refers to menu item 0 (file menu) and the [1] means the 
nested list of tuples within menu 0.  I learned that while converting to a dict.

A trickier one is this because it changes the menus:
mainmenu.menudefs.insert(0,
('application', [
('About IDLE', '<>'),
None,
]))

But I think this will work for that:
appmenu = {'application': [
('About IDLE', '<>'),
 None,
]}
mainmenu.menudefs = {**appmenu, **mainmenu.menudefs}

--
stage: patch review -> needs patch

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
pull_requests: +11354, 11355
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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
pull_requests: +11354
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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
pull_requests: +11354, 11355, 11356
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



[issue17005] Add a topological sort algorithm

2019-01-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> 1. The name "topsort" is most naturally parsed as "top sort" which could be 
> misinterpreted (as a sort that puts items on top in some way). If the name 
> must be abbreviated then "toposort" would be better.


I totally agree that `topsort` is a bad name, I used it more or less as a dummy 
for starting the discussion about the implementation.

> 2. "Topological sort" is a terrible name: the analogy with topological graph 
> theory is (i) unlikely to be helpful to anyone; and (ii) not quite right. I 
> know that the name is widely used in computing, but a name incorporating 
> "linearize" or "linear order" or "total order" would be much clearer.


Topological sort (not as the function name) but as an operation is a very well 
known concept and is well defined. If you are referring to not use "Topological 
Sort" in the docstrings or the documentation, I strongly oppose.


Regarding the interface, I am more happy to change it once there is an 
agreement. I am still awaiting Raymond's comments regarding this so we can 
start discussing.

--

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 39ed289a3511d2e9bf0950a9d5dc53c8194f61b9 by Terry Jan Reedy in 
branch 'master':
bpo-35770: IDLE macosx deletes Options => Configure IDLE. (GH-11614)
https://github.com/python/cpython/commit/39ed289a3511d2e9bf0950a9d5dc53c8194f61b9


--

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11357, 11358, 11359

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11357

___
Python tracker 

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



[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4

2019-01-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11357, 11358

___
Python tracker 

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



  1   2   >