[issue32986] multiprocessing, default assumption of Pool size unhelpful

2019-02-25 Thread Eryk Sun


Change by Eryk Sun :


--
nosy: +eryksun

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

It seems that return code  3221225477 in Windows is:

#define STATUS_ACCESS_VIOLATION  ((NTSTATUS)0xC005L)

so this is a segfault in the manager.

--
nosy: +pitrou

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

It also fails on Windows 7:

https://buildbot.python.org/all/#/builders/58/builds/1983/steps/3/logs/stdio

--

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

test test_multiprocessing_spawn failed
test_import (test.test_multiprocessing_spawn._TestImportStar) ... ok
==
FAIL: test_mymanager_context 
(test.test_multiprocessing_spawn.WithManagerTestMyManager)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.bolen-windows8\build\lib\test\_test_multiprocessing.py", line 
2747, in test_mymanager_context
self.assertIn(manager._process.exitcode, (0, -signal.SIGTERM))
AssertionError: 3221225477 not found in (0, -15)
--
Ran 344 tests in 328.196s
FAILED (failures=1, skipped=40)
1 test failed again:
test_multiprocessing_spawn
== Tests result: FAILURE then FAILURE ==

https://buildbot.python.org/all/#/builders/32/builds/2204/steps/3/logs/stdio

--
components: Tests, Windows
messages: 336625
nosy: pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn fails on AMD64 Windows8 3.x
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



[issue36103] Increase shutil.COPY_BUFSIZE

2019-02-25 Thread Inada Naoki


Inada Naoki  added the comment:

>
> desbma  added the comment:
>
> If you do a benchmark by reading from a file, and then writing to /dev/null 
> several times, without clearing caches, you are measuring *only* the syscall 
> overhead:
> * input data is read from the Linux page cache, not the file on your SSD 
> itself

Yes.  I measures syscall overhead to determine reasonable buffer size.
shutil may be used when page cache is warm.

> * no data is written (obviously because output is /dev/null)

As I said before, my SSD doesn't have stable write performance.  (It
is typical for consumer SSD).
So this is intensional.
And there are use cases copy from/to io.BytesIO or other file-like objects.

>
> Your current command line also measures open/close timings, without that I 
> think the speed should linearly increase when doubling buffer size, but of 
> course this is misleading, because its a synthetic benchmark.

I'm not measuring speed of my cheap SSD.  The goal of this benchmark is finding
reasonable buffer size.
There are vary real usages.  So reducing syscall overhead with
reasonable buffer size
is worth enough.

>
> Also if you clear caches in between tests, and  write the output file to the 
> SSD itself, sendfile will be used, and should be even faster.

No.  sendfile is not used by shutil.copyfileobj, even if dst is real
file on disk.

>
> So again I'm not sure this means much compared to real world usage.
>

"Real world usage" is vary.  Sometime it is not affected.  Sometime it affects.

On the other hand, what is the cons of changing 16KiB to 64KiB?
Windows used 1MiB already.  And CPython runtime uses a few MBs of memory too.

--

___
Python tracker 

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



[issue36115] test_ctypes leaks references and memory blocks

2019-02-25 Thread miss-islington


miss-islington  added the comment:


New changeset d5a551c2694e32835bcdafc01d611f3227ca36b3 by Miss Islington (bot) 
(Benjamin Peterson) in branch 'master':
closes bpo-36115: Fix some reference leaks in typeobject.c. (GH-12045)
https://github.com/python/cpython/commit/d5a551c2694e32835bcdafc01d611f3227ca36b3


--
nosy: +miss-islington
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



[issue36106] resolve sinpi() name clash with libm

2019-02-25 Thread miss-islington


miss-islington  added the comment:


New changeset 4e6646fef5d2cc53422e4eca0b18201ed5a5c4b6 by Miss Islington (bot) 
in branch '3.7':
bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
https://github.com/python/cpython/commit/4e6646fef5d2cc53422e4eca0b18201ed5a5c4b6


--
nosy: +miss-islington

___
Python tracker 

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



[issue36115] test_ctypes leaks references and memory blocks

2019-02-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue36115] test_ctypes leaks references and memory blocks

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR12045 fixes this

--

___
Python tracker 

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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg336620

___
Python tracker 

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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR12045 fixes this

--

___
Python tracker 

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



[issue36115] test_ctypes leaks references and memory blocks

2019-02-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/1/builds/515

OK (skipped=89)
.
test_ctypes leaked [72, 72, 72] references, sum=216
test_ctypes leaked [26, 26, 26] memory blocks, sum=78
2 tests failed again:
test_ctypes test_inspect
== Tests result: FAILURE then FAILURE ==

--
components: Tests, ctypes
messages: 336619
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_ctypes leaks references and memory blocks
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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +koobs -pablogsal

___
Python tracker 

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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36106] resolve sinpi() name clash with libm

2019-02-25 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +12071

___
Python tracker 

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



[issue36106] resolve sinpi() name clash with libm

2019-02-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f57cd8288dbe6aba99c057f37ad6d58f8db75350 by Serhiy Storchaka 
(Dima Pasechnik) in branch 'master':
bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
https://github.com/python/cpython/commit/f57cd8288dbe6aba99c057f37ad6d58f8db75350


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36111] Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR implementation of `seek` in python3 when in text mode, breaking py 2.x behavior/POSIX

2019-02-25 Thread Inada Naoki


Inada Naoki  added the comment:

If you want byte IO, you can use "rb" mode.  You can seek on it.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue36111] Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR implementation of `seek` in python3 when in text mode, breaking py 2.x behavior/POSIX

2019-02-25 Thread Inada Naoki


Change by Inada Naoki :


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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Another failure:

https://buildbot.python.org/all/#/builders/168/builds/633

--

___
Python tracker 

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



[issue36114] test_multiprocessing_spawn changes the execution environment

2019-02-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

OK (skipped=32)
Warning -- files was modified by test_multiprocessing_spawn
  Before: []
  After:  ['python.core']

https://buildbot.python.org/all/#/builders/168/builds/632/steps/4/logs/stdio

--
components: Tests
messages: 336615
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn changes the execution environment
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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

A lot of buildbots were failing for this test so a lot of them will become 
green after ff3d39faa8aa28308cc5eae6843eaac514da8fd8.

--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ff3d39faa8aa28308cc5eae6843eaac514da8fd8 by Pablo Galindo (Serhiy 
Storchaka) in branch 'master':
bpo-36109: Fix random test_descr failure. (GH-12044)
https://github.com/python/cpython/commit/ff3d39faa8aa28308cc5eae6843eaac514da8fd8


--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ok, actually this turns to be much easier: Sometimes __eq__ was also called 
twice but now as we use PyDict_GetItemWithError instead of PyDict_GetItem, if 
the extra __eq__ happens as a consequence of a dict lookup the error is ignored 
so that was the reason the test was not failing before.

--

___
Python tracker 

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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread miss-islington


miss-islington  added the comment:


New changeset 2055ebb940a737b1375435209c37eae535f062f9 by Miss Islington (bot) 
in branch '3.7':
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
https://github.com/python/cpython/commit/2055ebb940a737b1375435209c37eae535f062f9


--

___
Python tracker 

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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread miss-islington


miss-islington  added the comment:


New changeset a0f656d310bdd086f1e186bc7a4174e4068f by Miss Islington (bot) 
in branch '2.7':
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
https://github.com/python/cpython/commit/a0f656d310bdd086f1e186bc7a4174e4068f


--
nosy: +miss-islington

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Although 12044 fixes the problem, something a bit more fundamental may have 
changed. I have spent time investigating why this is happening and the problem 
is that in the line:


self.assertEqual(c.attr, 1)

Evil.__eq__ is invoked twice where before it was only invoked once. This does 
not happen all the time, and it seems to only happen under some combination of 
hashes in the class dictionary, being the extra __eq__ invocation a check for 
equality when looking up attr in the c object. When the test succeeds, the 
extra check is not done (and therefore the attribute is not deleted). I think 
this happens because some identity is used to check when doing the lookup 
(comparing the pointers) but I would like to understand exactly how the hash is 
influencing the different code paths to be sure that nothing important has 
changed recently.

--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Although PR12004 fixes the problem, something a bit more fundamental may have 
changed. I have spent time investigating why this is happening and the problem 
is that in the line:


self.assertEqual(c.attr, 1)

Evil.__eq__ is invoked twice where before it was only invoked once. This does 
not happen all the time, and it seems to only happen under some combination of 
hashes in the class dictionary, being the extra __eq__ invocation a check for 
equality when looking up attr in the c object. When the test succeeds, the 
extra check is not done (and therefore the attribute is not deleted). I think 
this happens because some identity is used to check when doing the lookup 
(comparing the pointers) but I would like to understand exactly how the hash is 
influencing the different code paths to be sure that nothing important has 
changed recently.

--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg336608

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12069

___
Python tracker 

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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 90c6facebd5666fec85f125ee2795b48b30319a4 by Benjamin Peterson 
(ngie-eign) in branch 'master':
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
https://github.com/python/cpython/commit/90c6facebd5666fec85f125ee2795b48b30319a4


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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12068

___
Python tracker 

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



[issue36111] Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR implementation of `seek` in python3 when in text mode, breaking py 2.x behavior/POSIX

2019-02-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This does not have relation to POSIX, since POSIX says nothing about Unicode 
files. "Text mode" in POSIX means binary files with converted newlines. This 
mode is not supported in Python 3.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36113] Problem With SciPy Computation of sigma

2019-02-25 Thread Berker Peksag


Berker Peksag  added the comment:

This tracker is for issues with the Python programming language and its 
standard library. SciPy is not part of the standard library. Please use SciPy 
project's support channels to get help for your problem. Thank you!

--
nosy: +berker.peksag
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



[issue36113] Problem With SciPy Computation of sigma

2019-02-25 Thread N. Srinivasan


New submission from N. Srinivasan :

"""
Construct  normal probability plot

"""
import math
import scipy.stats as ss
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

import prettytable
from random import seed
seed(100)

mu = 0.0
sigma = 1.0
x = np.linspace(mu - 5*sigma, mu + 5*sigma, 10)
norm_pdf_x= ss.norm.pdf(x,mu,sigma)
plt.plot(x,norm_pdf_x)
print("The Std. Dev. of normally Dist. x =", np.std(norm_pdf_x))
print()
###
Produces a wrong Result for sigma:
The Std. Dev. of normally Dist. x = 0.13142071847657633
Should be 1.0

--
components: Library (Lib)
files: test_normal.py
messages: 336604
nosy: nisthesecond
priority: normal
severity: normal
status: open
title: Problem With SciPy Computation of sigma
versions: Python 3.7
Added file: https://bugs.python.org/file48170/test_normal.py

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-25 Thread Eric Snow


Eric Snow  added the comment:

...so it doesn't appear that my PR introduces a performance regression.

--

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-25 Thread Eric Snow


Eric Snow  added the comment:

Here's what I did (more or less):

$ python3 -m pip install --user perf
$ python3 -m perf system tune
$ git clone g...@github.com:python/performance.git
$ git clone g...@github.com:python/cpython.git
$ cd cpython
$ git checkout ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465
$ ./configure
$ make -j8
$ ./python ../performance/pyperformance run --fast --output speed.after
$ git checkout HEAD^
$ make -j8
$ ./python ../performance/pyperformance run --fast --output speed.before
$ ./python ../performance/pyperformance compare speed.before speed.after -O 
table

Here are my results:

speed.before


Performance version: 0.7.0
Report on Linux-4.15.0-45-generic-x86_64-with-glibc2.26
Number of logical CPUs: 4
Start date: 2019-02-25 20:39:44.151699
End date: 2019-02-25 20:48:04.817516

speed.after
===

Performance version: 0.7.0
Report on Linux-4.15.0-45-generic-x86_64-with-glibc2.26
Number of logical CPUs: 4
Start date: 2019-02-25 20:29:56.610702
End date: 2019-02-25 20:38:11.667461

+-+--+-+--+---+
| Benchmark   | speed.before | speed.after | Change   | 
Significance  |
+=+==+=+==+===+
| 2to3| 447 ms   | 440 ms  | 1.02x faster | Not 
significant   |
+-+--+-+--+---+
| chaos   | 155 ms   | 156 ms  | 1.01x slower | Not 
significant   |
+-+--+-+--+---+
| crypto_pyaes| 154 ms   | 152 ms  | 1.01x faster | Not 
significant   |
+-+--+-+--+---+
| deltablue   | 10.7 ms  | 10.5 ms | 1.01x faster | Not 
significant   |
+-+--+-+--+---+
| django_template | 177 ms   | 172 ms  | 1.03x faster | 
Significant (t=3.66)  |
+-+--+-+--+---+
| dulwich_log | 105 ms   | 106 ms  | 1.01x slower | Not 
significant   |
+-+--+-+--+---+
| fannkuch| 572 ms   | 573 ms  | 1.00x slower | Not 
significant   |
+-+--+-+--+---+
| float   | 149 ms   | 146 ms  | 1.02x faster | Not 
significant   |
+-+--+-+--+---+
| go  | 351 ms   | 349 ms  | 1.00x faster | Not 
significant   |
+-+--+-+--+---+
| hexiom  | 14.6 ms  | 14.4 ms | 1.01x faster | Not 
significant   |
+-+--+-+--+---+
| html5lib| 126 ms   | 122 ms  | 1.03x faster | 
Significant (t=3.46)  |
+-+--+-+--+---+
| json_dumps  | 17.6 ms  | 17.2 ms | 1.02x faster | 
Significant (t=2.65)  |
+-+--+-+--+---+
| json_loads  | 36.4 us  | 36.1 us | 1.01x faster | Not 
significant   |
+-+--+-+--+---+
| logging_format  | 15.2 us  | 14.9 us | 1.02x faster | Not 
significant   |
+-+--+-+--+---+
| logging_silent  | 292 ns   | 296 ns  | 1.01x slower | Not 
significant   |
+-+--+-+--+---+
| logging_simple  | 13.7 us  | 13.4 us | 1.02x faster | Not 
significant   |
+-+--+-+--+---+
| mako| 22.9 ms  | 22.5 ms | 1.02x faster | Not 
significant   |
+-+--+-+--+---+
| meteor_contest  | 134 ms   | 134 ms  | 1.00x faster | Not 
significant   |
+-+--+-+--+---+
| nbody   | 157 ms   | 161 ms  | 1.03x slower | 
Significant (t=-3.85) |
+-+--+-+--+---+
| 

[issue36111] Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR implementation of `seek` in python3 when in text mode, breaking py 2.x behavior/POSIX

2019-02-25 Thread Enji Cooper


Change by Enji Cooper :


--
title: Non-zero `offset`s are no longer acceptable with implementation of 
`seek` in some cases with python3 when in text mode; should be per POSIX -> 
Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR 
implementation of `seek` in  python3 when in text mode, breaking py 2.x 
behavior/POSIX

___
Python tracker 

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



[issue36111] Non-zero `offset`s are no longer acceptable with implementation of `seek` in some cases with python3 when in text mode; should be per POSIX

2019-02-25 Thread Enji Cooper


Change by Enji Cooper :


--
title: Negative `offset` values are no longer acceptable with implementation of 
`seek` with python3 when in text mode; should be per POSIX -> Non-zero 
`offset`s are no longer acceptable with implementation of `seek` in some cases 
with python3 when in text mode; should be per POSIX

___
Python tracker 

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



[issue26228] pty.spawn hangs on FreeBSD 9.3, 10.x

2019-02-25 Thread Jarry Shaw


Jarry Shaw  added the comment:

Chris' patch works on macOS 10.14 (Mojave); but after it terminates, tty 
attributes are not restored (new-lines are missing). btw, I've implemented a 
workaround library with solution through either `ps` command or `psutil` 
package, see `ptyng` on PyPI.

--
nosy: +jarryshaw

___
Python tracker 

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



[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing this as resolved. @jaraco this just made it to 3.8.0 alpha 2, feel free 
to reopen this if needed. Thanks Mario and Chris for review and merge :)

--

___
Python tracker 

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



[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue36075] python 2to3 conversion tool is generating file with extra line for every input line

2019-02-25 Thread Saba Kauser


Saba Kauser  added the comment:

Did anyone get a chance to look at my case?

Thanks,
Saba.

--

___
Python tracker 

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



[issue34785] pty.spawn -- auto-termination after child process is dead (a zombie)

2019-02-25 Thread Jarry Shaw


Jarry Shaw  added the comment:

This issue is duplicated with issue26228, sorry.

--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue36112] os.path.realpath on windows and substed drives

2019-02-25 Thread Eryk Sun


Eryk Sun  added the comment:

In Windows, realpath is currently an alias for abspath. Issue 14094 has a 
pending PR that implements realpath, but it's waiting on improved tests and 
final approval. I'm afraid it won't make it into 3.8.

I suggest using the resolve() method of a pathlib.Path. For example:

>>> os.system('subst W: C:\\Windows')
0
>>> pathlib.Path('W:\\').resolve()
WindowsPath('C:/Windows')

--
nosy: +eryksun
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> ntpath.realpath() should use GetFinalPathNameByHandle()

___
Python tracker 

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



[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-25 Thread Eric Snow


Eric Snow  added the comment:

At least, it *might* be a performance regression.  Here are the two commits I 
tried:

after:  ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465 (PR #11617, from this issue)
before:  463572c8beb59fd9d6850440af48a5c5f4c0c0c9 (the one right before)

After building each (a normal build, not debug), I ran the micro-benchmark 
Raymond referred to ("./python Tools/scripts/var_access_benchmark.py") multiple 
times.  There was enough variability between runs from the same commit that I'm 
uncertain at this point if there really is any performance regression.  For the 
most part the results between the two commits are really close.  Also, the 
results from the "after" commit fall within the variability I've seen between 
runs of the "before" commit.

I'm going to try with the "performance" suite 
(https://github.com/python/performance) to see if it shows any regression.

--

___
Python tracker 

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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Eryk Sun


Eryk Sun  added the comment:

> Given that this requirement is not universal and because a leading 
> slash controls other behaviors on platforms like Windows

Forward slash has no special meaning anywhere in the names of NT objects, such 
as memory Section objects (aka file-mapping objects) and registry Key objects. 
Only the file API translates forward slash to backslash, and that's only 
implemented for the sake of DOS compatibility in a few core functions that 
normalize and translate DOS paths.

Maybe you're thinking of the "Global\\" and "Session\\" prefixes for named 
kernel objects, which require a backslash since the name is really a 
handle-relative NT path. The session's object directory contains object 
symbolic links named "Global" and "Session". A name such as "Global\spam" 
resolves to "spam" in the global object directory, but "Global/spam", with 
forward slash, is just a regular name in the local directory.

--
nosy: +eryksun

___
Python tracker 

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



[issue13497] Fix for broken nice test on non-broken platforms with pedantic compilers

2019-02-25 Thread Enji Cooper


Change by Enji Cooper :


--
pull_requests: +12067

___
Python tracker 

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



[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

>  If others agree that it is sufficiently easy, we can assign 
> the task to Cheryl.

It's only easy if we clearly specify what we want to occur.  Deciding what the 
right behavior should be is not a beginner skill.

Proposed spec:
'''
Modify the API statistics.mode to handle multimodal cases so that the first 
mode encountered is the one returned.  If the input is empty, raise a 
StatisticsError.

TestCases:
mode([])   --> StatisticsError
mode('aabbbcc') --> 'c'
mode(iter('aabbbcc')) --> 'c'
mode('eeffgg') --> 'a'

Implementation:
* Discard the internal _counts function.
* Instead use Counter(data).most_common(1)[0][0]
  because that makes only a single pass over the data

Documentation:
* Update statistics.rst and include a versionchanged directive

* In the Whatsnew compatibility section, note this is a behavior change.
  Code that used to raise StatisticsError will now return a useful value.
  Note that the rationale for the change is that the current mode()
  behavior would unexpectedly fail when given multimodal data.

When: 
* We want this for 3.8 so it can't wait very long
'''

--

___
Python tracker 

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



[issue8747] Autoconf tests in python not portably correct

2019-02-25 Thread Enji Cooper


Enji Cooper  added the comment:

This issue has been superseded by other work.

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



[issue34791] xml package does not obey sys.flags.ignore_environment

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 7cd08cf62086a8a2d84fd825dfcd8bfe33bf1986 by larryhastings (Victor 
Stinner) in branch '3.5':
bpo-34791: xml package obeys ignore env flags (GH-9544) (#11871)
https://github.com/python/cpython/commit/7cd08cf62086a8a2d84fd825dfcd8bfe33bf1986


--

___
Python tracker 

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



[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-25 Thread Eric Snow


Eric Snow  added the comment:

On Mon, Feb 25, 2019 at 3:02 AM STINNER Victor  wrote:
> But that's where I suggested to test "popular C extensions" with a C API 
> change before merging it. It's ok if issues are discovered later, but the 
> author of backward incompatible C API changes should collaborate with popular 
> C extension maintainers to help to deal with these issues.

Yeah, that was my bad.  I jumped the gun a bit.

--

___
Python tracker 

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



[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-25 Thread Eric Snow


Eric Snow  added the comment:

@Armin, thanks for fixing things on your end so quickly. :)

Adding PyInterpreterState.dict and a public getter function (a la 
PyThreadState) is probably fine.  I'm just not sure how that relates to the 
problem with cffi's use of the "builtins" field.  If it would be useful in 
general then feel free to open a separate issue.  I doubt there'd be much 
opposition if you presented a decent use case, since the cost would be low.

In the case of PyInterpreterState.builtins specifically, if you need it we 
could add a simple PyInterpreterState_GetBuiltins().  However, couldn't you 
already use existing public API, e.g. `PyEval_GetBuiltins()` or 
`PyImport_GetModule("builtins")`?  Regardless, we certainly don't want to put 
anyone in a position that they must define Py_BUILD_CORE just for access to 
PyInterpreterState fields.

--

___
Python tracker 

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



[issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset ef33dd6036aafbd3f06c1d56e2b1a81dae3da63c by larryhastings (Victor 
Stinner) in branch '3.5':
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) 
(#11869)
https://github.com/python/cpython/commit/ef33dd6036aafbd3f06c1d56e2b1a81dae3da63c


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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3 when in text mode; should be per POSIX

2019-02-25 Thread Enji Cooper


Change by Enji Cooper :


--
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3 when in text mode; should be per POSIX

2019-02-25 Thread Enji Cooper


Enji Cooper  added the comment:

Opening and seeking using SEEK_END worked in text mode with python 2.7. I'm not 
terribly sure why 3.x should depart from this behavior:

>>> fp = open("configure", "rt"); fp.seek(-100, os.SEEK_END)
>>> fp.tell()
501076

--

___
Python tracker 

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



[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset efec7631edf3b9480dc3988c97ffef94df8800da by larryhastings (Victor 
Stinner) in branch '3.5':
bpo-35746: Fix segfault in ssl's cert parser (GH-11569) (#11867)
https://github.com/python/cpython/commit/efec7631edf3b9480dc3988c97ffef94df8800da


--

___
Python tracker 

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



[issue24643] VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h

2019-02-25 Thread miss-islington


miss-islington  added the comment:


New changeset 0b3019a02e60171e9b7edb261e1234109001819c by Miss Islington (bot) 
in branch '3.7':
bpo-24643: Fix "GH-define timezone _timezone" clashes on Windows (GH-12019)
https://github.com/python/cpython/commit/0b3019a02e60171e9b7edb261e1234109001819c


--
nosy: +miss-islington

___
Python tracker 

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



[issue35033] Column or row spanning cells are not implemented.

2019-02-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Apologies, I didn't realize it would be in the major version; I checked since 
there had been minor release versions since this ticket.  I'll check again once 
the major release is out.

Thanks!

--

___
Python tracker 

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



[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-02-25 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

A BB failed. Looks like it's unrelated with this change:
https://buildbot.python.org/all/#/builders/99/builds/2198

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue24643] VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h

2019-02-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12066

___
Python tracker 

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



[issue35033] Column or row spanning cells are not implemented.

2019-02-25 Thread Julien Palard


Julien Palard  added the comment:

IIRC this will be released in the next major sphinx version, planned for around 
march.

--

___
Python tracker 

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



[issue24643] VS 2015 pyconfig.h #define timezone _timezone conflicts with timeb.h

2019-02-25 Thread Steve Dower


Steve Dower  added the comment:


New changeset 6673decfa0fb078f60587f5cb5e98460eea137c2 by Steve Dower (Zackery 
Spytz) in branch 'master':
bpo-24643: Fix "#define timezone _timezone" clashes on Windows (GH-12019)
https://github.com/python/cpython/commit/6673decfa0fb078f60587f5cb5e98460eea137c2


--

___
Python tracker 

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



[issue35033] Column or row spanning cells are not implemented.

2019-02-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

> https://github.com/sphinx-doc/sphinx/pull/5559 has been merged, let's wait 
> for a release of Sphinx and we'll be able to build Python 3.8 documentation 
> as text again.

I tried running the sphinx-build command using Sphinx 1.8.4 and I got the same 
exception.

Running Sphinx v1.8.4
building [mo]: all of 0 po files
building [text]: all source files
updating environment: 475 added, 0 changed, 0 removed
reading sources... [100%] whatsnew/index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 12%] c-api/typeobj
Exception occurred:
  File "n:\projects\cpython-venv\lib\site-packages\sphinx\writers\text.py", 
line 623, in visit_entry
raise NotImplementedError('Column or row spanning cells are '
NotImplementedError: Column or row spanning cells are not implemented.
The full traceback has been saved in 
C:\Users\cheka\AppData\Local\Temp\sphinx-err-222wk1in.log, if you want to 
report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
A bug report can be filed in the tracker at 
. Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue25337] weakref.finalize documentation refers to old interpreter shutdown behavior

2019-02-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Adding @pitrou to the nosylist as he implemented PEP442 in issue 18112.  If he 
agrees with the proposed change, then I believe this can be marked as 'easy'.

--
nosy: +cheryl.sabella, pitrou
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-02-25 Thread Patrick McLean


Patrick McLean  added the comment:

Alexey, here are my responses to your points:

1) This is intentional, this is for dropping privileges before running some 
(possibly untrusted) command, we do not want to leave a path for the subprocess 
to gain root back. If there is a subprocess that needs root for some 
operations, it would presumably have the ability to drop privileges itself, and 
would not need the python script to do it before running it.

2) While POSIX leaves it unspecified what changes are permitted for an 
unprivileged process, these are permitted for a privileged process, which is 
the main use case for this functionality. In the case the OS does not support 
it for an unpriviliged process, the syscall would fail with EPERM, which can be 
handled from the calling python code.

I am fine removing the workaround, and allowing it to fail with EPERM. Perhaps 
we could find another way around this for running the tests in an unprivileged 
environment, or just leave the test only running the EPERM case...

I could change the API to have have group= and supp_groups=  if you prefer.

--

___
Python tracker 

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



[issue24235] ABCs don't fail metaclass instantiation

2019-02-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Closing as a duplicate as Luiz suggested.

--
nosy: +cheryl.sabella
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> abstract class instantiable when subclassing built-in types

___
Python tracker 

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



[issue34791] xml package does not obey sys.flags.ignore_environment

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 765d333512e9b58da4a4431595a0e81517ef0443 by larryhastings (Victor 
Stinner) in branch '3.4':
bpo-34791: xml package obeys ignore env flags (GH-9544) (#11872)
https://github.com/python/cpython/commit/765d333512e9b58da4a4431595a0e81517ef0443


--
nosy: +larry

___
Python tracker 

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



[issue36110] test_descr: test_vicious_descriptor_nonsense() fails randomly

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I was faster this time ;)

--

___
Python tracker 

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



[issue36110] test_descr: test_vicious_descriptor_nonsense() fails randomly

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Duplicate of https://bugs.python.org/issue36109

--
nosy: +pablogsal

___
Python tracker 

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



[issue36110] test_descr: test_vicious_descriptor_nonsense() fails randomly

2019-02-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36112] os.path.realpath on windows and substed drives

2019-02-25 Thread Totte Karlsson


New submission from Totte Karlsson :

Python's os.path.realpath, when used with a substed drive on the Windows 
platform, don't resolve the substed path to the *real* path. 

For example creating a substed drive like this:

subst z: C:\Users\Public\Desktop

and checking for the real path in python like this:

import os
myPath = "S:\\"
print("Real path of: " + myPath + " is: " + os.path.realpath(myPath) )

prints

Real path of: S:\ is: S:\

In the docs for the [subst][1] command, a substed drive is referred to as a 
*virtual* drive. Virtual, suggesting something being "not real", indicates that 
the Python *realpath* command is not working properly on Windows. 


  [1]: 
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/subst

--
components: Windows
messages: 336574
nosy: Totte Karlsson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.path.realpath on windows and substed drives
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



[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

What do people think about leaving this as an "Easy First Issue" for the 
sprint? If others agree that it is sufficiently easy, we can assign the task to 
Cheryl.

It should be fairly easy: mode calls an internal function _counts which is not 
public and not used anywhere else, so it can be changed completely or even 
discarded if needed.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting.

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 8bcbc7896d1fe1c289bae339d408fdf1472a00fa by larryhastings (Victor 
Stinner) in branch '3.5':
bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907) (#11874)
https://github.com/python/cpython/commit/8bcbc7896d1fe1c289bae339d408fdf1472a00fa


--
nosy: +larry, lukasz.langa

___
Python tracker 

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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread STINNER Victor


STINNER Victor  added the comment:

FYI the test also failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x:
https://buildbot.python.org/all/#/builders/167/builds/600

I will keep on eye on this buildbot worker as well ;-)

--

___
Python tracker 

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



[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Executive summary:

- let's change the behaviour of mode to return a single mode rather than raise 
an exception if there are multimodes;
- and let's do it without a depreciation period.


Further comments in no particular order:

I agree that in practice the current implementation of mode has turned out to 
be quite awkward.

Unfortunately I feel that just chosing one mode and returning it as "the" mode 
is statistically dubious (despite it being commonplace!). I've checked with 
some statisticians, or at least people who claim to be statisticians on the 
Internet, and they agree.

(The usual advice from statisticians is to always plot your data before talking 
about the mode or modes, as even local maxima can be meaningful.)

Nevertheless, Raymond's use-case of the nearest neighbor algorithm is 
persuasive. We should change the mode function to return one of the modes.

Which one? Again, people I've spoken to suggest that there's no statistical 
basis to picking any specific one (first found, last found, smallest, largest). 
I'm unhappy about documenting which mode is returned, as I expect it will be an 
implementation detail that could change in the future.

Raymond, are you happy to leave the specific detail of which mode is returned 
unspecified? Or do you have an argument for why we should specify it, and can 
do so without limiting future implementations?

I too strongly prefer a separate multimode function over a flag to the mode 
function.

As for backwards-compatibility, I've asked around trying to find anyone who 
claims that changing the behaviour would break their code. I haven't found 
anyone. I guess that means that unless any of the other core devs object, I'm 
happy to go with Raymond's recommendation to just change the behaviour without 
a depreciation period.

--

___
Python tracker 

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



[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-02-25 Thread Anthony Sottile


Change by Anthony Sottile :


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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Davin Potts


Davin Potts  added the comment:

Closing.

Thank you Giampaolo for jumping in so quickly to review!

Thank you Victor for catching this on the buildbot.  Though what is this talk 
of "_if_ the color changes"? ;)

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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3 when in text mode; should be per POSIX

2019-02-25 Thread Enji Cooper


Change by Enji Cooper :


--
title: Negative `offset` values are no longer acceptable with implementation of 
`seek` with python3; should be per POSIX -> Negative `offset` values are no 
longer acceptable with implementation of `seek` with python3 when in text mode; 
should be per POSIX

___
Python tracker 

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



[issue34656] [CVE-2018-20406] memory exhaustion in Modules/_pickle.c:1393

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 4b42d575bf0fb01192b3ec54b7e224b238691527 by larryhastings (Victor 
Stinner) in branch '3.4':
[3.4] bpo-34656: Avoid relying on signed overflow in _pickle memos (GH-9261) 
(#11870)
https://github.com/python/cpython/commit/4b42d575bf0fb01192b3ec54b7e224b238691527


--
nosy: +larry

___
Python tracker 

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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3; should be per POSIX

2019-02-25 Thread Enji Cooper


Enji Cooper  added the comment:

?!

Being blunt: why should opening a file in binary vs text mode matter? POSIX 
doesn't make this distinction.

Per the pydoc (https://docs.python.org/2/library/functions.html#open):

> The default is to use text mode, which may convert '\n' characters to a 
> platform-specific representation on writing and back on reading.

If this is one of the only differentiators between binary and text mode, why 
should certain types of seeking be made impossible?

Having to stat the file, then set the cursor to the size of the file, minus the 
offset breaks the 'seek(..)' interface, and having to use 'rb', then convert 
from bytes to unicode overly complicates things :(.

--

___
Python tracker 

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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Davin Potts


Davin Potts  added the comment:


New changeset aadef2b41600cb6a4f845cdc4cea001c916d8745 by Davin Potts in branch 
'master':
bpo-36102: Prepend slash to all POSIX shared memory block names (#12036)
https://github.com/python/cpython/commit/aadef2b41600cb6a4f845cdc4cea001c916d8745


--

___
Python tracker 

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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Rohit travels and tours


Change by Rohit travels and tours :


--
type:  -> resource usage

___
Python tracker 

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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3; should be per POSIX

2019-02-25 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I believe you will find that this is because you opened the file in text mode, 
which means Unicode, not bytes. If you open it in binary mode, the POSIX spec 
applies:

py> fp = open("sample", "rb"); fp.seek(-100, os.SEEK_END)
350

Supported values for seeking in text (Unicode) files are documented here:

https://docs.python.org/3/library/io.html#io.TextIOBase.seek

I don't believe this is a bug, or possible to be changed. Do you still think 
otherwise? If not, we should close this ticket.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36111] Negative `offset` values are no longer acceptable with implementation of `seek` with python3; should be per POSIX

2019-02-25 Thread Enji Cooper


New submission from Enji Cooper :

I tried using os.SEEK_END in a technical interview, but unfortunately, that 
didn't work with python 3.x:

pinklady:cpython ngie$ python3
Python 3.7.2 (default, Feb 12 2019, 08:15:36) 
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> fp = open("configure"); fp.seek(-100, os.SEEK_END)
Traceback (most recent call last):
  File "", line 1, in 
io.UnsupportedOperation: can't do nonzero end-relative seeks

It does however work with 2.x, which is aligned with the POSIX spec 
implementation, as shown below:

pinklady:cpython ngie$ python
Python 2.7.15 (default, Oct  2 2018, 11:47:18) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> fp = open("configure"); fp.seek(-100, os.SEEK_END)
>>> fp.tell()
501076
>>> os.stat("configure").st_size
501176
>>>

--
components: IO
messages: 336564
nosy: yaneurabeya
priority: normal
severity: normal
status: open
title: Negative `offset` values are no longer acceptable with implementation of 
`seek` with python3; should be per POSIX

___
Python tracker 

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



[issue36030] add internal API function to create tuple without items array initialization

2019-02-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f1b9abe35f75393351b3d954a392122a3f8f6951 by Victor Stinner 
(Sergey Fedoseev) in branch 'master':
bpo-36030: Remove _PyStack_AsTuple() and _PyStack_AsTupleSlice() (GH-12032)
https://github.com/python/cpython/commit/f1b9abe35f75393351b3d954a392122a3f8f6951


--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

It seems that this is a race condition created as a consequence of:

https://github.com/python/cpython/pull/2/files

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2019-02-25 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like the change introduced a regression: bpo-36110.

--

___
Python tracker 

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



[issue36110] test_descr: test_vicious_descriptor_nonsense() fails randomly

2019-02-25 Thread STINNER Victor


New submission from STINNER Victor :

test_vicious_descriptor_nonsense() started to fails randomly:

$ ./python -m test -j0 -F test_descr test_descr test_descr test_descr 
test_descr test_descr
Run tests in parallel using 10 child processes
0:00:03 load avg: 1.24 [1/6] test_descr passed
0:00:03 load avg: 1.70 [2/6/1] test_descr failed
test test_descr failed -- Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_descr.py", line 4341, 
in test_vicious_descriptor_nonsense
self.assertEqual(c.attr, 1)
  File "/home/vstinner/prog/python/master/Lib/test/test_descr.py", line 4328, 
in __eq__
del C.attr
AttributeError: attr
0:00:03 load avg: 1.70 [3/6/1] test_descr passed
0:00:04 load avg: 1.70 [4/6/1] test_descr passed
0:00:04 load avg: 1.70 [5/6/1] test_descr passed
0:00:04 load avg: 1.70 [6/6/1] test_descr passed

== Tests result: FAILURE ==

5 tests OK.

1 test failed:
test_descr

Total duration: 4 sec 213 ms
Tests result: FAILURE

--

It seems like it's a regression introduced by this change:

a24107b04c1277e3c1105f98aff5bfa3a98b33a0 is the first bad commit
commit a24107b04c1277e3c1105f98aff5bfa3a98b33a0
Author: Serhiy Storchaka 
Date:   Mon Feb 25 17:59:46 2019 +0200

bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). 
(GH-2)

:04 04 da22597a443c84fb29588a3557f5dd04e292a1cc 
fb73df9fbfdc1893e9f0bde9fbc6ab6febabbe8f M  Include
:04 04 4b26a84a0e3a813470e34ddef29596da41d3d28f 
ca6192ea98e014434a32e2a114e42b297408ce00 M  Modules
:04 04 b2dd7d4e832c64ba44781a34093c5d69ea127932 
26bfeced0b5776634051ed57d701361252c6de68 M  Objects
:04 04 6b5a0bf3a25434ee3de5c9dae3e880217773c0fb 
56265d6d2cd8cb92ba47541909af2edec46196e6 M  Python

--
components: Tests
messages: 336562
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: test_descr: test_vicious_descriptor_nonsense() fails randomly
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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread STINNER Victor


STINNER Victor  added the comment:

Apply the patch, we will see if the buildbot color changes :-)

--

___
Python tracker 

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



[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 6c655ce34ae54adb8eef22b73108e22cc381cb8d by larryhastings (Victor 
Stinner) in branch '3.4':
bpo-35746: Fix segfault in ssl's cert parser (GH-11569) (#11868)
https://github.com/python/cpython/commit/6c655ce34ae54adb8eef22b73108e22cc381cb8d


--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

I can reproduce this locally. How has this not being spotted by the CI:

❯ ./python.exe -m test test_descr
Run tests sequentially
0:00:00 load avg: 3.82 [1/1] test_descr
test test_descr failed -- Traceback (most recent call last):
  File "/Users/pgalindo3/github/cpython/Lib/test/test_descr.py", line 4341, in 
test_vicious_descriptor_nonsense
self.assertEqual(c.attr, 1)
  File "/Users/pgalindo3/github/cpython/Lib/test/test_descr.py", line 4328, in 
__eq__
del C.attr
AttributeError: attr

test_descr failed

== Tests result: FAILURE ==

1 test failed:
test_descr

Total duration: 2 sec 437 ms
Tests result: FAILURE

--

___
Python tracker 

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



[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2019-02-25 Thread Nikolaus Rath


Nikolaus Rath  added the comment:

Sorry, no. I have long lost context and interest in this.

--

___
Python tracker 

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



[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-02-25 Thread Chris Withers


Chris Withers  added the comment:


New changeset ea199b90bb61866cd3c2f154341d1eb0d5c4a710 by Chris Withers (Miss 
Islington (bot)) in branch '3.7':
bpo-35512: Resolve string target to patch.dict decorator during function call 
GHGH-12000 (#12021)
https://github.com/python/cpython/commit/ea199b90bb61866cd3c2f154341d1eb0d5c4a710


--

___
Python tracker 

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



[issue36109] test_descr fails on AMD64 Windows8 3.x buildbots

2019-02-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/32/builds/2198

==
ERROR: test_vicious_descriptor_nonsense 
(test.test_descr.ClassPropertiesAndMethods)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_descr.py", line 
4341, in test_vicious_descriptor_nonsense
self.assertEqual(c.attr, 1)
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_descr.py", line 
4328, in __eq__
del C.attr
AttributeError: attr
--
Ran 140 tests in 7.836s

--
components: Tests, Windows
messages: 336554
nosy: pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_descr fails on AMD64 Windows8 3.x buildbots
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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Davin Potts


Change by Davin Potts :


--
stage:  -> patch review

___
Python tracker 

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



[issue36102] TestSharedMemory fails on AMD64 FreeBSD CURRENT Shared 3.x

2019-02-25 Thread Davin Potts


Davin Potts  added the comment:

I have locally tested GH-12036 on all 5 of the aforementioned OSes and all are 
made happy by the patch.

Victor:  If we want to go ahead and apply this patch right away to hopefully 
make the FreeBSD buildbot go green, the nature of this change is sufficiently 
small that it will still be easy to change during the alpha period.

--
stage: patch review -> 

___
Python tracker 

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



[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 41b48e71ac8a71f56694b548f118bd20ce203410 by larryhastings 
(stratakis) in branch '3.5':
[3.5] bpo-34623: Use XML_SetHashSalt in _elementtree (#9933)
https://github.com/python/cpython/commit/41b48e71ac8a71f56694b548f118bd20ce203410


--

___
Python tracker 

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



[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2019-02-25 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset d16eaf36795da48b930b80b20d3805bc27820712 by larryhastings 
(stratakis) in branch '3.4':
[3.4] bpo-34623: Use XML_SetHashSalt in _elementtree (#9953)
https://github.com/python/cpython/commit/d16eaf36795da48b930b80b20d3805bc27820712


--

___
Python tracker 

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



  1   2   >