[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Ned Deily


Ned Deily  added the comment:

> Would this affect any of the installation adjustments?

I don't think so but there's one way to be sure :)  If you merge your changes 
to master, we can doublecheck before backporting them.

> Is the windowing type determined by the hardware, or by the macOS version?

The windowing type is determined by the variant of Tk that tkinter is 
dynamically linking with.  While Cocoa Tk is now the most common, it is still 
possible to run into the other variants; for example, MacPorts supports 
building an X11 (Xquartz) variant of Tk 8.6 along with a Cocoa one.  If support 
for the various window types isn't causing a maintenance burden, it would be 
nice to retain them.

--

___
Python tracker 

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



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

2018-06-25 Thread hervé

Change by hervé :


--
pull_requests: +7536

___
Python tracker 

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



[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Srinivas Reddy T


Change by Srinivas  Reddy T :


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



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Function local name 'menudict' is initialized empty, two key value pairs are 
added, and it is never touched again.

--
messages: 320470
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE maxosc.overrideRootMenu: remove unused menudict
type: performance
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, I would like to rename at least some of the functions in idlelib.macosx.  
For instance, function overrideRootMenu to override_root_menu.  Would this 
affect any of the installation adjustments?  IE, does the installer import the 
module for whatever reason?

Also, do the windowing types on currently supported machines still include all 
of Xquartz, Cocoa, Carbon (both Aqua), and other?  Is the windowing type 
determined by the hardware, or by the macOS version?

--
nosy: +ned.deily

___
Python tracker 

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



[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
dependencies: +IDLE macosx: add tests.

___
Python tracker 

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



[issue33963] IDLE macosx: add tests.

2018-06-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: IDLE macosc: add tests. -> IDLE macosx: add tests.

___
Python tracker 

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



[issue33963] IDLE macosc: add tests.

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

For overrideRootMenu, move nested functions to module level.
Try to move 3 imports to module level.  Test startup on mac.
Mock 'window' with mock functions.

--
messages: 320468
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE macosc: add tests.
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33956] update vendored expat to 2.2.5

2018-06-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 16137fe22f3f9bbbd50fac2a729172976c553718 by Benjamin Peterson 
(Zachary Ware) in branch '2.7':
bpo-27780: Make pgen.c C89 compliant (GH-7915)
https://github.com/python/cpython/commit/16137fe22f3f9bbbd50fac2a729172976c553718


--

___
Python tracker 

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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Yes, we should use ttk.Spinbox: #33962.

--

___
Python tracker 

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



[issue33962] IDLE: use ttk.spinbox

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Spinoff from #27755, which has a image of tk and ttk versions of a spinbox on 
Mac and asks about using ttk.spinbox.

ttk Spinbox was added to tcl/tk in 8.5.9 and to tkinter.ttk in 3.7. I believe 
there are three cases to consider.
tcl/tk   python  action
>= 8.5.9  >=3.7  from tkinter.tkk import Spinbox
>= 8.5.9   3.6   import Entry and copy class Spinbox(Entry) code
< 8.5.9  from tkinter import Spinbox

Serhiy, is tcl/tk < 8.5.9 something we realistically need to worry about, on 
Linux?

In Dec 2018 or Jan 2019, when 3.6 switches to security fixes only, the 3.6 code 
can be deleted.

For the present, only use config options in the common subset:
cursor, takefocus, validate, validatecommond, invalidcommand,
xscrollcommand, command, to, from_, increment, values, wrap, format.
Is this sufficient?

Whenever we make 8.5.9 or later a requirement, the tkinter Spinbox can be 
dropped and the class and style options used.  Or we can subclass 
tkinter.Spinbox and accept and somehow deal with class and style options.  (We 
are not presently using custom styles.)

For the present, the code can go in query.py, presently only 300 lines.  When 
we only need to cater to 3.7+ and 8.5.9+, the code will be replaced by normal 
import from ttk.

Comman methods: identify, bbox, delete, icursor, index, insert, get.
ttk has set, while tk sets through a textvariable.  If we subclass tk.spinbox, 
it could have a set method that uses a private Var.

 Do the universal widget methods listed on 
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/universal.html
all apply to ttk widgets?
identify,

--
assignee: terry.reedy
components: IDLE
messages: 320465
nosy: cheryl.sabella, markroseman, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: use ttk.spinbox
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33460] "..." is used to confusingly indicate many different things in chapter 3

2018-06-25 Thread ppperry


Change by ppperry :


--
title: ... used to indicate many different things in chapter 3, some are 
confusing -> "..." is used to confusingly indicate many different things in 
chapter 3

___
Python tracker 

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



[issue4260] Document that ctypes.xFUNCTYPE are decorators.

2018-06-25 Thread Andrés Delfino

Andrés Delfino  added the comment:

I suspect we'll be working on this PR a little, but a least it's a start to get 
this moving.

--
nosy: +adelfino

___
Python tracker 

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



[issue4260] Document that ctypes.xFUNCTYPE are decorators.

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Mark's PR added two conversions, in macosx, that I missed.  I rechecked a 
recursive case sensitive whole-word grep of 'windows' in idlelib and I believe 
all remaining occurrences refer to the Windows OS (usually capitalized) or 
multiple windows.

--

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset c6040638aa1537709add895d24cdbbb9ee310fde by Miss Islington (bot) 
in branch '3.6':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/c6040638aa1537709add895d24cdbbb9ee310fde


--

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset ee60e36fbf640e9e2ab6cd26821aad5d90529d96 by Miss Islington (bot) 
in branch '3.7':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/ee60e36fbf640e9e2ab6cd26821aad5d90529d96


--

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7531

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7530

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 42397731d7ba8bdf63025d48008d133cb2070229 by Terry Jan Reedy (Mark 
Roseman) in branch 'master':
bpo-33924: Add missed mac-specific 'windows' to 'window' changes (GH-7920)
https://github.com/python/cpython/commit/42397731d7ba8bdf63025d48008d133cb2070229


--

___
Python tracker 

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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2018-06-25 Thread Mark Roseman


Mark Roseman  added the comment:

Given the difference between the old and new (ttk) spinbox, especially on 
macOS, I'd like to incorporate it into IDLE when available. See screenshot 
spinbox.png, noting white border around old one.

Terry, can we add a spinbox wrapper to IDLE for the time being? If so, would 
you prefer it done as its own (very little) module? Or is there any value to 
adding a module to hold various small UI wrappers and convenience procs?

--
Added file: https://bugs.python.org/file47652/spinbox.png

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2018-06-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Alistair, how did you happen upon this case?

--
nosy: +rhettinger

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like Popen of multiprocess.popen_spawn_win32 has a race condition. If 
the child process is killed in the parent using terminate() before the child 
process "steals" rhandle, rhandle remains open. I wrote the PR 7921 to fix it.

--

___
Python tracker 

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



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

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7528

___
Python tracker 

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



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

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7529

___
Python tracker 

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



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

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 937ee9e745d7ff3c2010b927903c0e2a83623324 by Victor Stinner in 
branch 'master':
Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)
https://github.com/python/cpython/commit/937ee9e745d7ff3c2010b927903c0e2a83623324


--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33924] In IDLE menudefs, change 'windows' to 'window'

2018-06-25 Thread Mark Roseman


Change by Mark Roseman :


--
pull_requests: +7526

___
Python tracker 

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



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Steve Dower


Steve Dower  added the comment:

> outside of the basic Latin characters (0-255)

This should be (0-127). The Latin characters in 128-255 are considered extended 
ones, and may be decomposed by normalization.

--

___
Python tracker 

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



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Steve Dower


Steve Dower  added the comment:

The benchmark may not be triggering that much work. NFKC normalization only 
applies for characters outside of the basic Latin characters (0-255).

I ran the below benchmarks and saw a huge difference. Granted, it's a very 
degenerate case with collections this big, but it appears to be linear with 
len(NAMES), suggesting that the normalization is the expensive part.

>>> CHRS=[c for c in (chr(i) for i in range(65535)) if c.isidentifier()]
>>> def makename():
...  return ''.join(random.choice(CHRS) for _ in range(10))
...
>>> NAMES = [makename() for _ in range(1)]
>>> timeit.timeit('len(set(NAMES))', globals=globals(), number=10)
38.0400752604
>>> timeit.timeit('len(set(unicodedata.normalize("NFKC", n) for n in NAMES))', 
>>> globals=globals(), number=10)
820.2586788580002

I wonder if it's better to catch the SyntaxError and do the check there? That 
way we don't really have a performance impact, since it's only going to show up 
in exceptional cases anyway.

--

___
Python tracker 

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



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

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7403

___
Python tracker 

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



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

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7525

___
Python tracker 

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



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

2018-06-25 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
pull_requests:  -7482

___
Python tracker 

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



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

2018-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7525

___
Python tracker 

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



[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-06-25 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue18932] Optimize selectors.EpollSelector.modify()

2018-06-25 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

This was implemented in https://bugs.python.org/issue30014. Closing as 
duplicate.

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
versions: +Python 2.7 -Python 3.5

___
Python tracker 

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



[issue24596] Script globals in a GC cycle not finalized when exiting with SystemExit

2018-06-25 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


Chris Cogdon  added the comment:

CLA signed.

--

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


Chris Cogdon  added the comment:

Also, one occurrence of s/:/;/

This is my First PR! I've read the contribution docs, but am very open to 
correction.

--

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue33960] IDLE REPL: Strange indentation

2018-06-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Python's secondary prompt in interactive mode is an artifact of the fact the 
command line consoles work with physical lines while python works with 
statements that quite possibly comprises multiple lines.

As mentioned in the its doc, IDLE works with statements.  You edit and enter 
complete statements, not a line at a time. The history mechanism retrieves 
complete statements, not a line at a time.  The side effect is what you 
encountered.  '>>> ' is not an indent.  '' is.

While working with statements instead of lines is one of Shell's best features, 
the indentation awkwardness is one of its worst.  I intend to open an issue 
about separating the prompt from statement entry to remove the latter.  I will 
add you as nosy so you can give an opinion, I hope in support ;-).

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith
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



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I tried 64-bit builds of Python 2.7 and 3.7rc1 (binaries from python.org) on 
Windows 10 on year 2045: start with no error, time.time() and 
datetime.datetime.now() don't fail.

I tried Python 2.7.12 and 3.5.2 on Ubuntu 16.04 in WSL on my Windows 10: same, 
start with no error, time.time() and datetime.datetime.now() don't fail. It's 
64-bit Ubuntu with 64-bit binaries for Python 2 and Python 3 (check 
sys.maxsize).

I even compiled Python 2.7.15 and 3.7rc1 on Ubuntu 16.04 in WSL on my Windows 
10: same again, start with no error, time.time() and datetime.datetime.now() 
don't fail. Python 2 and 3 have been compiled in 64-bit mode, since it's a 
64-bit Ubuntu.

Everything is fine. I failed to reproduce your bug.

--

___
Python tracker 

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



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Valeriya Sinevich


Valeriya Sinevich  added the comment:

I sent a PR and measured how it affected the performance by creating a 
dataclass with 1 members.
python.bat -m timeit -s "from dataclasses import make_dataclass" -s "arg_list = 
[chr(k) * i for k in range(97, 123) for i in range(1, 500)]" 
"make_dataclass('a', arg_list)" 
The performance didn't change, both before and after the changes it takes 
around 14.5s.

--
nosy: +steve.dower, valer

___
Python tracker 

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



[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-25 Thread Valeriya Sinevich


Change by Valeriya Sinevich :


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

___
Python tracker 

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



[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Chris Cogdon


New submission from Chris Cogdon :

The documentation for dataclasses.dataclass includes this text:

"If any of the added methods already exist on the class, a TypeError will be 
raised."

However, the documentation for various options has ONE case of TypeError, some 
cases of ValueError and other cases of "does nothing".

I'll attempt a fix and create a PR for this.

--
assignee: docs@python
components: Documentation
messages: 320444
nosy: chriscog, docs@python
priority: normal
severity: normal
status: open
title: Inconsistency in exceptions for dataclasses.dataclass documentation
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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-25 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +7518

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-25 Thread Tim Peters


Tim Peters  added the comment:

Mark, do you believe that 32-bit Linux uses a different libm?  One that fails 
if, e.g., SSE2 were used instead?  I don't know, but I'd sure be surprised it 
if did.  Very surprised - compilers have been notoriously unpredictable in 
exactly when and where extended precision gets used in compiled code, so sane 
code (outside of assembler) doesn't rely on it.

I'd be similarly surprised if hypothetical 3rd party libraries _assuming_ 
extended arithmetic existed.  Any sane person writing such a library would take 
it upon themselves to force extended precision on entry (if that's what they 
wanted), and restore the original FPU control state on exit.

I'm no more worried about this than, say, worried about that some dumbass 
platform may set the rounding mode to "to plus infinity" by default - and I 
wouldn't hesitate there either for Python startup to force it to nearest/even 
rounding.  Sure, there _may_ be some library out there for such a platform that 
assumes +Inf rounding, but I fundamentally don't care ;-)

In any case, `random` remains a red herring.  There are potential gratuitous 
numeric differences all over the place.

--

___
Python tracker 

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



[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Emily Morehouse


Emily Morehouse  added the comment:

Thanks, Philip! If you're interested in submitting a PR, please do! If not, 
just comment back so someone else can pick it up.

--
nosy: +emilyemorehouse
stage:  -> needs patch

___
Python tracker 

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



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

> I get this error when starting the interpreter in Windows subsystem for Linux 
> (WSL).

This bug is currently closed, please open a new bug.

About your issue. I'm not sure if Windows subsystem for Linux is officially 
supported. How did you install Python 2.7 and 3.7? Are you testing 32-bit or 
64-bit Python? (Again, please answer in your new issue.)

--

___
Python tracker 

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



[issue24935] LDSHARED is not set according when CC is set.

2018-06-25 Thread Martin Scherer


Change by Martin Scherer :


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

___
Python tracker 

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



[issue33960] IDLE REPL: Strange indentation

2018-06-25 Thread Julien Palard


New submission from Julien Palard :

Using IDLE REPL, I found confusing the absence of a "secondary prompt" while 
typing multiline statements, see attached screenshot where the "correctly 
aligned" code raises a SyntaxError while a strangely unaligned code is given 
correctly to the interpreter.

--
assignee: terry.reedy
components: IDLE
files: 2018-06-25-223359_1920x1080_scrot.png
messages: 320440
nosy: mdk, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE REPL: Strange indentation
versions: Python 3.6
Added file: 
https://bugs.python.org/file47651/2018-06-25-223359_1920x1080_scrot.png

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:

When ready, should this (and other AC conversions) be backported to the 
relevant 3.x branches?

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-25 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

On Jun 23, 2018, at 20:21, Nick Coghlan  wrote:
> 
> Only exposing a `forced_hash_seed` (and hiding randomly generated ones as 
> `forced_hash_seed=None`) seems reasonable though, since those can already be 
> read from os.environ anyway.

Only mirroring $PYTHONHASHSEED probably makes the whole ask less useful.  Maybe 
I should abandon the PR, although it may still make sense to export the full 
_PyCoreConfig structure.

--

___
Python tracker 

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



[issue33959] doc Remove time complexity mention from list Glossary entry

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue33959] doc Remove time complexity mention from list Glossary entry

2018-06-25 Thread Andrés Delfino

New submission from Andrés Delfino :

Per Raymond's comment in msg319931 I believe time complexity for list items 
access should be removed from the Glossary.

--
assignee: docs@python
components: Documentation
messages: 320437
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: doc Remove time complexity mention from list Glossary entry
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33958] Unused variable in pur embedding example

2018-06-25 Thread Philip Kendall


New submission from Philip Kendall :

Line 6 of the "Pure Embedding" example at 
https://docs.python.org/3/extending/embedding.html#pure-embedding :

PyObject *pName, *pModule, *pDict, *pFunc;

contains the pDict variable which is not used anywhere else in the code, giving 
a compiler warning. Simple fix: just remove pDict from the list of variables.

I can make a PR if you need one.

--
assignee: docs@python
components: Documentation
messages: 320436
nosy: Philip Kendall, docs@python
priority: normal
severity: normal
status: open
title: Unused variable in pur embedding example
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue33883] doc Mention mypy, pyrex, pytype and PyAnnotate in FAQ

2018-06-25 Thread Andrés Delfino

Andrés Delfino  added the comment:

I'm adding Pyre to the list of type checkers. I have also simplified the 
proposed text.

--
title: doc Mention mypy, pytype and PyAnnotate in FAQ -> doc Mention mypy, 
pyrex, pytype and PyAnnotate in FAQ

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Tim]
> a couple lines of inline assembler could be added at Python startup to
> set the Pentium's FPU "precision control" bits to "round to 53 bits" mode

On second thoughts, I don't think this will work; or at least, not easily. The 
libm on such a platform may expect the FPU to be in 64-bit precision mode. So 
we'd potentially need to switch the precision before calling any math library 
function and then switch it back again afterwards. And then there may be 3rd 
party libraries that need the same treatment.

On the existence of platforms with double rounding, last time I checked, 32-bit 
Linux was the most obvious offender on Intel hardware. Windows used to use the 
x87 but set the precision to 53 bits, and I think newer versions may well use 
SSE2 in preference to x87. macOS has used SSE2 for a good number of releases 
now.

And indeed, I just tested Python 3.5.2 on Ubuntu 16.04.4 LTS 32-bit (running in 
a VM on a not-too-ancient MacBook Pro), and it exhibits double rounding:

>>> (1e16 + 2.).hex()
'0x1.1c37937e08002p+53'
>>> (1/2731).hex()
'0x1.7ff4005ffd002p-12'
>>> 1/(1 - 2**-53)
1.0

Expected results without double rounding:

>>> (1e16 + 2.).hex()
'0x1.1c37937e08001p+53'
>>> (1/2731).hex()
'0x1.7ff4005ffd001p-12'
>>> 1/(1 - 2**-53)
1.0002

--

___
Python tracker 

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



[issue33869] doc Add link to list definition in Glossary list entry

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


--
title: doc Add set, frozen set, and tuple entries to Glossary -> doc Add link 
to list definition in Glossary list entry

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-25 Thread Andrés Delfino

Change by Andrés Delfino :


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



[issue33957] use standard term than generic wording

2018-06-25 Thread Srinivas Reddy T


Change by Srinivas  Reddy T :


--
title: use correct term than generic wording -> use standard term than generic 
wording

___
Python tracker 

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



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread Petter S


Petter S  added the comment:

I get this error when starting the interpreter in Windows subsystem for Linux 
(WSL). 

I am using Python 2.7.15rc1

$ python --version
Python 2.7.15rc1
$ python
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time

  OverflowError: timestamp too 
large to convert to C _PyTime_t 



   Current 
thread 0x7fe547231080 (most recent call first): 

  Aborted (core dumped)

--
nosy: +Petter S
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



[issue33957] use correct term than generic wording

2018-06-25 Thread Srinivas Reddy T


New submission from Srinivas  Reddy T :

I think it is better to use "Big-O notation" than a generic wording "computer 
science notation". I understand  the use of latter, but i guess it helps the 
programmer since it makes him/her to google it or ask some one if he/she didn't 
know it yet.

--
assignee: docs@python
components: Documentation
messages: 320433
nosy: docs@python, thatiparthy
priority: normal
pull_requests: 7515
severity: normal
status: open
title: use correct term than generic wording
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue25155] Windows: datetime.datetime.now() raises an OverflowError for date after year 2038

2018-06-25 Thread Petter S


Petter S  added the comment:

For Python 3:

$ python3 --version
Python 3.7.0b3
$ python3
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
OverflowError: timestamp too large to convert to C _PyTime_t

Current thread 0x7f0232c21080 (most recent call first):
Aborted (core dumped)

--

___
Python tracker 

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



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

2018-06-25 Thread Srinivas Reddy T


Srinivas  Reddy T  added the comment:

Hi Raymond,
   I find your statement hard to understand.I agree with Solstag, it is 
always helpful to have an example.

+1 for solstag wording.

--
nosy: +thatiparthy

___
Python tracker 

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



[issue30237] Access violation due to CancelSynchronousIo of console read

2018-06-25 Thread Valeriya Sinevich


Change by Valeriya Sinevich :


--
keywords: +patch
pull_requests: +7514
stage: test needed -> patch review

___
Python tracker 

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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you Inada-san! Seems this issue can be closed as a third party issue.

--

___
Python tracker 

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



[issue33278] libexpat uses HAVE_SYSCALL_GETRANDOM instead of HAVE_GETRANDOM_SYSCALL

2018-06-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Python calls XML_SetHashSalt, so expat itself doesn't need to generate 
randomness.

--
nosy: +benjamin.peterson
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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

I found original pull request and issue report

https://github.com/conda/conda/pull/4558
https://github.com/ContinuumIO/anaconda-issues/issues/1410

--

___
Python tracker 

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



[issue33956] update vendored expat to 2.2.5

2018-06-25 Thread Benjamin Peterson


New submission from Benjamin Peterson :

https://github.com/libexpat/libexpat/releases/tag/R_2_2_5

Release 2.2.5 Tue October 31 2017
Bug fixes:
  #8  If the parser runs out of memory, make sure its internal
state reflects the memory it actually has, not the memory
it wanted to have.
 #11  The default handler wasn't being called when it should for
a SYSTEM or PUBLIC doctype if an entity declaration handler
was registered.
   #137 #138  Fix a case of mistakenly reported parsing success where
XML_StopParser was called from an element handler
#162  Function XML_ErrorString was returning NULL rather than
a message for code XML_ERROR_INVALID_ARGUMENT
introduced with release 2.2.1

Other changes:
#106  xmlwf: Add argument -N adding notation declarations
#75 #106  Test suite: Resolve expected failure cases where xmlwf
output was incomplete
#127  Windows: Fix test suite compilation
   #126 #127  Windows: Fix compilation for Visual Studio 2012
#33 #132  tests: Mass-fix compilation for XML_UNICODE_WCHAR_T
#129  examples: Fix compilation for XML_UNICODE_WCHAR_T
#130  benchmark: Fix compilation for XML_UNICODE_WCHAR_T
#144  xmlwf: Fix compilation for XML_UNICODE_WCHAR_T; still needs
Windows or MinGW for 2-byte wchar_t
  #9  Address two Clang Static Analyzer false positives
 #59  Resolve troublesome macros hiding parser struct membership
and dereferencing that pointer
  #6  Resolve superfluous internal malloc/realloc switch
   #153 #155  Improve docbook2x-man detection
#160  Undefine NDEBUG in the test suite (rather than rejecting it)
#161  Address compiler warnings
Version info bumped from 7:6:6 to 7:7:6

--
components: Extension Modules, XML
messages: 320428
nosy: benjamin.peterson
priority: normal
severity: normal
stage: needs patch
status: open
title: update vendored expat to 2.2.5
versions: Python 2.7, 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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

I grepped PYTHONIOENCODING and found this line.
https://github.com/conda/conda/blob/082fe8fd7458ecd9dd7547749039f4b1f06d76db/conda/activate.py#L726

--

___
Python tracker 

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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

When I grepped "Unknown encoding 874", I see some people got trouble from 
anaconda installation.

I don't know about what anaconda setup does, but it will not happen on normal 
CPython.
We use UTF-8 by default on Windows, for fsencoding and console encoding, from 
Python 3.6.

--

___
Python tracker 

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



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


Change by INADA Naoki :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue24567] random.choice IndexError due to double-rounding

2018-06-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Python _configuration_ should be changed to disable double rounding on such 
> platforms

That sounds good to me, with the nitpick that setting an x87 FPU to 53-bit 
precision still doesn't avoid potential double rounding on underflow, and I'm 
not aware of any easy way to "fix" x87-using code to avoid double rounding on 
underflow.

That said, the vast majority of practical applications, including 
random.choice, math.fsum, dtoa.c, aren't going to be affected by double 
rounding on underflow, so it should only rear its ugly head in corner cases.

If we do this, can we also persuade Guido to Pronounce that Python 
implementations assume IEEE 754 format and semantics for floating-point?

--

___
Python tracker 

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



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

2018-06-25 Thread Al-Scandar Solstag


Al-Scandar Solstag  added the comment:

Speaking frankly, I might not have grasped what might happen by reading your 
line. I think having at least a minimal example is crucial. Perhaps:

"Distinct argument patterns, such as `f(1)` and `f(first_arg=1)`, may not cache 
for each other even if the underlying function sees them as equivalent calls."

--

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

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



[issue33914] test_gdb fails for Python 2.7.15

2018-06-25 Thread Vibhuti


Vibhuti  added the comment:

STINNER Hi
I tried the commit but it did not work.The same failure is observed.

--

___
Python tracker 

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



[issue33851] 3.7 regression: ast.get_docstring() for a node that lacks a docstring

2018-06-25 Thread Marius Gedminas


Marius Gedminas  added the comment:

I've ran my findimports testsuite with CPython's git commit 
a50b825c18a92655f3dd7939e793fa3d4440d886 and my tests passed, so yes.

--

___
Python tracker 

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



[issue33914] test_gdb fails for Python 2.7.15

2018-06-25 Thread Vibhuti


Vibhuti  added the comment:

Hi ,sorry for the delayed reply
The architecture is s390x and the OS is SLES 12 SP3 
(however test_gdb fails on SLES 11 SP4 too)
Python was installed using 
https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz
The whole output of `./python -Werror -m test -v test_gdb` is as below:

test@4e227cf6c7ae:~/Python-2.7.15> sudo ./python -Werror -m test -v test_gdb
== CPython 2.7.15 (default, Jun 25 2018, 05:10:18) [GCC 4.8.5]
==   Linux-4.15.0-22-generic-s390x-with-SuSE-12-s390x big-endian
==   /home/test/Python-2.7.15/build/test_python_21830
== CPU count: 2
Run tests sequentially
0:00:00 load avg: 4.32 [1/1] test_gdb
GDB version 8.0:
GNU gdb (GDB; SUSE Linux Enterprise 12) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "s390x-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
test_NULL_instance_dict (test.test_gdb.PrettyPrintTests)
Ensure that a PyInstanceObject with with a NULL in_dict is handled ... skipped 
'Python was compiled with optimizations'
test_NULL_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with NULL ob_type is handled gracefully ... skipped 
'Python was compiled with optimizations'
test_NULL_ptr (test.test_gdb.PrettyPrintTests)
Ensure that a NULL PyObject* is handled gracefully ... skipped 'Python was 
compiled with optimizations'
test_builtin_function (test.test_gdb.PrettyPrintTests) ... skipped 'Python was 
compiled with optimizations'
test_builtin_method (test.test_gdb.PrettyPrintTests) ... skipped 'Python was 
compiled with optimizations'
test_builtins_help (test.test_gdb.PrettyPrintTests)
Ensure that the new-style class _Helper in site.py can be handled ... skipped 
'Python was compiled with optimizations'
test_classic_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of classic class instances ... skipped 'Python was 
compiled with optimizations'
test_corrupt_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... 
skipped 'Python was compiled with optimizations'
test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_flags is handled ... 
skipped 'Python was compiled with optimizations'
test_corrupt_tp_name (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_name is handled ... skipped 
'Python was compiled with optimizations'
test_dicts (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of dictionaries ... skipped 'Python was compiled 
with optimizations'
test_exceptions (test.test_gdb.PrettyPrintTests) ... skipped 'Python was 
compiled with optimizations'
test_frames (test.test_gdb.PrettyPrintTests) ... skipped 'Python was compiled 
with optimizations'
test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets ... skipped 'Python was compiled with 
optimizations'
test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... skipped 'Python was 
compiled with optimizations'
test_int (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various "int" values ... skipped 'Python was 
compiled with optimizations'
test_lists (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of lists ... skipped 'Python was compiled with 
optimizations'
test_long (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various "long" values ... skipped 'Python was 
compiled with optimizations'
test_modern_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of new-style class instances ... skipped 'Python was 
compiled with optimizations'
test_selfreferential_dict (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a dict doesn't lead proxyval ... skipped 
'Python was compiled with optimizations'
test_selfreferential_list (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a list doesn't lead proxyval ... skipped 
'Python was compiled with optimizations'
test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... 
skipped 'Python was compiled with optimizations'
test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... 
skipped 'Python was compiled with optimizations'
test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets ... skipped 'Python was compiled with 
optimizations'
test_singletons 

[issue33930] Segfault with deep recursion into object().__dir__

2018-06-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The trashcan mechanism is used for slot wrappers. The following code doesn't 
crash:

o = object()
for x in range(100):
o = o.__hash__

--

___
Python tracker 

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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread Tal Einat


Change by Tal Einat :


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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset 8fd8cfa369fe4b6d6ac430cd28ead32717df7bee by Tal Einat (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-33573: docs to suggest median() alternatives for non-numeric data 
(GH-7587) (GH-7907)
https://github.com/python/cpython/commit/8fd8cfa369fe4b6d6ac430cd28ead32717df7bee


--

___
Python tracker 

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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset 150cd3cb272021e9a2d865dd28486b00199fe77d by Tal Einat (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-33573: docs to suggest median() alternatives for non-numeric data 
(GH-7587) (GH-7906)
https://github.com/python/cpython/commit/150cd3cb272021e9a2d865dd28486b00199fe77d


--

___
Python tracker 

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



[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2018-06-25 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The (non-portable) pthread APIs "pthread_get_stacksize_np()" and 
"pthread_get_stackaddr_np()" can be used to implement PyOS_CheckStack on macOS, 
which would give nicer behavior than crashing when the recursion limit is too 
high for the stack size of the current thread.

Creating a patch should be fairly easy, but does require C knowledge.

--
components: Interpreter Core
messages: 320415
nosy: ronaldoussoren
priority: low
severity: normal
stage: needs patch
status: open
title: Implement PyOS_CheckStack on macOS using pthread_get_stack*_np
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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7513

___
Python tracker 

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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7512

___
Python tracker 

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



[issue33573] statistics.median does not work with ordinal scale, add doc

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset fdd6e0bf18517c3dc5e24c48fbfe890229fad1b5 by Tal Einat in branch 
'master':
bpo-33573: docs to suggest median() alternatives for non-numeric data (GH-7587)
https://github.com/python/cpython/commit/fdd6e0bf18517c3dc5e24c48fbfe890229fad1b5


--

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2018-06-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The crash is likely caused by recursion during the clean-up of the 
object().__dir__.__dir__ chain. 

The trashcan API (see Py_TRASHCAN_SAFE_BEGIN/Py_TRASHCAN_SAFE_END in 
Include/object.h) can help here. 

Those do some real work and have a cost, I can't predict if that cost is 
substational enough to affect benchmarks (method objects are destroyed a lot).

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-25 Thread Nick Coghlan


Nick Coghlan  added the comment:

Ah, part of the confusion is that I misremembered the command we run implicitly 
during startup - it's only `setlocale(LC_CTYPE, "")`, not `setlocale(LC_ALL, 
"")`.

However, the default category for `locale.getlocale()` is `LC_CTYPE`, so it 
reports the text encoding locale configured during startup, not the C level 
default.

The difference on Windows is expected - the startup code that implicitly runs 
`setlocale(LC_CTYPE, "")` doesn't get compiled in there.

So I think we have a few different potential ways of viewing this bug report:

1. As a docs issue, where we advise users to run 
`locale.getlocale(locale.LC_MESSAGES)` to find out whether or not a specific 
locale really has been configured (vs the interpreter's default text encoding 
change that runs implicitly on startup)
2. As a defaults change for 3.8+, where we switch `locale.getlocale()` over to 
checking `locale.LC_MESSAGES` instead of `locale.LC_CTYPES`, since the 
interpreter always sets the latter on startup, so it doesn't convey much useful 
information.
3. As (1) for maintenance releases, and as (2) for 3.8+

--

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Tal Einat

Tal Einat  added the comment:

Thanks for the PR, Andrés! Merged and backported.

--

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset 78209734a0ecd1567f819d95314b1c7c9b26f48a by Tal Einat in branch 
'2.7':
[2.7] bpo-33952: Fix typo in str.upper() documentation (GH-7898) (GH-7905)
https://github.com/python/cpython/commit/78209734a0ecd1567f819d95314b1c7c9b26f48a


--

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset ac5a6e35ef4a73846136804fff924760ec67ebbd by Tal Einat (Miss 
Islington (bot)) in branch '3.6':
bpo-33952: Fix typo in str.upper() documentation (GH-7898) (GH-7904)
https://github.com/python/cpython/commit/ac5a6e35ef4a73846136804fff924760ec67ebbd


--

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Tal Einat


Tal Einat  added the comment:


New changeset 80f1a908a87e55c318776fb8e6f8c21d8a8664ef by Tal Einat (Miss 
Islington (bot)) in branch '3.7':
bpo-33952: Fix typo in str.upper() documentation (GH-7898) (GH-7903)
https://github.com/python/cpython/commit/80f1a908a87e55c318776fb8e6f8c21d8a8664ef


--

___
Python tracker 

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



[issue33952] doc Fix typo in str.upper() documentation

2018-06-25 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +7511

___
Python tracker 

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



  1   2   >