[issue34049] abs() method accept argument that implement __abs__()

2018-07-04 Thread Windson Yang


New submission from Windson Yang :

Just like callable() method in 
https://docs.python.org/3/library/functions.html#callable

> ...instances are callable if their class has a __call__() method.

I think we should also mention this in abs(),

abs(x)
Return the absolute value of a number. If x defines __abs__, abs(x) returns 
x.__abs__(). The argument may be an integer or a floating point number. If the 
argument is a complex number, its magnitude is returned.

--
components: Library (Lib)
messages: 321080
nosy: Windson Yang
priority: normal
severity: normal
status: open
title: abs() method accept argument that implement __abs__()
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



[issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto

2018-07-04 Thread Tal Einat


Tal Einat  added the comment:

Confirmed with Python 3.6.3 on Windows 10 64-bit: It hangs showing an empty 
window.

Debugging a bit, the hang happens in Lib/tkinter/commondialog.py, line 43:

s = w.tk.call(self.command, *w._options(self.options)) 

The value of self.command is 'tk_chooseDirectory', and w._options(self.options) 
just gives an empty tuple, so the actual call is:

s = w.tk.call('tk_chooseDirectory', ())

This means that the hang is within w.tk.call().

I'd follow this up with the pywinauto devs. To me this doesn't seem like 
something wrong with the tkinter module.

--
nosy: +taleinat

___
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-07-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

benchmark result:

22.63911402298 secs  master (+0%)
22.806662271 secs PR 8046 (-0.74%)

def fib(n):
if n == 0:
return 0
if n == 1:
return 1
return fib(n-2) + fib(n-1)

if __name__ == '__main__':
import timeit
print(timeit.timeit("fib(10)", setup="from __main__ import fib"))

--

___
Python tracker 

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



[issue34019] webbrowser: wrong arguments for Opera browser.

2018-07-04 Thread Tal Einat


Tal Einat  added the comment:

Shouldn't this be backported to 2.7 as well?

--
nosy: +taleinat
versions:  -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



[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2018-07-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

@ronaldoussoren

I updated the PR

Please take a look.

--

___
Python tracker 

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



[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-04 Thread Matej Cepl


Matej Cepl  added the comment:

It seems to be even more weird. Even with installed libnsl-devel 
(libnsl-devel-1.2.0-2.5.x86_64 on openSUSE/Tumbleweed) I get this in config.log:

checking for t_open in -lnsl... no

and truly, when grepping for t_open in /usr/include/rpc* I get nothing. When 
searching for t_open, it seems to be something from Solaris world.

--

___
Python tracker 

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



[issue32007] nis module fails to build against glibc-2.26

2018-07-04 Thread Matej Cepl


Matej Cepl  added the comment:

It seems to be even more weird. Even with installed libnsl-devel 
(libnsl-devel-1.2.0-2.5.x86_64 on openSUSE/Tumbleweed) I get this in config.log:

checking for t_open in -lnsl... no

and truly, when grepping for t_open in /usr/include/rpc* I get nothing.

--
nosy: +mcepl

___
Python tracker 

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



[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-04 Thread Matej Cepl


Matej Cepl  added the comment:

So, if this is a duplicate of #32007, shouldn't it be closed?

--
nosy: +mcepl

___
Python tracker 

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



[issue16968] Fix test discovery for test_concurrent_futures.py

2018-07-04 Thread Zachary Ware


Zachary Ware  added the comment:

Looking at this again after 5 years, things have changed a bit and I also 
better understand what's actually going on in the tests.  IIUC, the `test_main` 
function's only real purpose was to cause any dangling threads or processes to 
be reaped, which should actually be done by the shutdown methods of the tested 
executors.  Doing that cleanup in test_main (if successful), would actually 
prevent us from getting useful warnings from regrtest if shutdown did not clean 
up properly, so the attached PR simply removes test_main.

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



[issue16968] Fix test discovery for test_concurrent_futures.py

2018-07-04 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +7696

___
Python tracker 

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



[issue20602] sys.flags and sys.float_info disappear at shutdown

2018-07-04 Thread Zackery Spytz


Zackery Spytz  added the comment:

This behaviour is present in 2.7.

--
nosy: +ZackerySpytz
versions: +Python 2.7, Python 3.6, 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



[issue1327594] Static Windows Build fails to locate existing installation

2018-07-04 Thread Zachary Ware


Zachary Ware  added the comment:

The patch is many years out of date by this point.  Does anyone know what it 
takes to create a static binary on Windows these days?

--
versions: +Python 3.8 -Python 2.7, 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



[issue30400] Race condition in shutil.copyfile()

2018-07-04 Thread Zachary Ware


Zachary Ware  added the comment:

This can only be accepted into 3.8 at this point due to the new exception type.

The patch looks fairly straightforward; would it be possible to add a test that 
hits the new raise condition?

--
nosy: +zach.ware
stage:  -> patch review
versions: +Python 3.8 -Python 2.7, Python 3.7

___
Python tracker 

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



[issue34033] distutils is not reproducible

2018-07-04 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl

___
Python tracker 

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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-04 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-07-04 Thread Matej Cepl


Matej Cepl  added the comment:

>From https://mail.python.org/pipermail/python-dev/2018-July/154273.html
(by Nick Coghlan):

In particular, if a build system sets SOURCE_DATE_EPOCH without
specifying a pyc format for py_compile or compileall, Python 3.7 will
give you checked hashes by default:
https://docs.python.org/3/library/py_compile.html?highlight=source_date_epoch#py_compile.compile

--

___
Python tracker 

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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:


New changeset a8bb18bbb9c286cfac5a0b8c8679c440e5c49305 by Alexander Belopolsky 
(Miss Islington (bot)) in branch '3.7':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348) 
(GH-8093)
https://github.com/python/cpython/commit/a8bb18bbb9c286cfac5a0b8c8679c440e5c49305


--

___
Python tracker 

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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:


New changeset 55f39bdabc91b387c18451c78ee077e6d05d6cfe by Alexander Belopolsky 
(Miss Islington (bot)) in branch '3.6':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348) 
(GH-8092)
https://github.com/python/cpython/commit/55f39bdabc91b387c18451c78ee077e6d05d6cfe


--

___
Python tracker 

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



[issue20602] sys.flags and sys.float_info disappear at shutdown

2018-07-04 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue33998] random.randrange completely ignores the step argument when stop is None

2018-07-04 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thank you for the contribution, but I'm going to decline.  The parallel 
function range() doesn't even accept keyword arguments.  I don't see any reason 
to support an oddity such as "randrange(10, step=2)" in part because the 
meaning isn't clear and in part because there is no known use case.

--
assignee: tim.peters -> rhettinger
resolution:  -> rejected
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



[issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file

2018-07-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

There are 3 ways to scroll by key in each direction: Arrow Down/Up, Page 
Down/Up, and Cntl End/Home.  There are 4 ways to scroll by mouse, in each 
direction: Mousewheel down/up, Scrollbar arrow bottom/top (== Arrow keys), 
Scrollbar trough below/above slider (= Page keys), and Scrollbar slider.

On Windows, if I Load Module idlelib.editor and go to the bottom, with the text 
cursor on the last line, all up methods work.  Bruce, which of the four mouse 
up methods don't work for you?  Just grabbing the slider, as Ned found?  What 
happens is you move the slider down, and try to move up without releasing the 
button?

Cheryl or Tal, can one of you check on Linux?

In the text area, the mouse pointer, for me, is a vertical bar and the slider 
is a light gray.  When I move the mouse over the scrollbar slider, the slider 
become active and ready to click on.  The indication is that the mouse pointer 
becomes an arrow pointing up left and the slider turns dark gray.  When the 
mouse is over the scrollbar trough or arrows, the slider only darkens to medium 
gray.  When over an arrow, the arrow darkens. Bruce, do you see the 
'activation' change when the slider is at the bottom and you mouse over it, but 
cannot grab it?


In May, we changed the 3.6+ editor text/mousewheel/scrollbar interaction a bit 
so that the text scrolled by lines, rather than by pixel. #33664, PR 7351. 
There is always a complete line at the top -- unless one changes the window 
height to a non-integral number of lines and moves the cursor to the last line. 
 (Then the complete lines are at the bottom until one moves the cursor to the 
top line  -- Cheryl, we should try to fix this.)

The patch changed the command function that the scrollbar calls when it is 
clicked or the slider is moved to editor.EditorWindow.handle_yview. The new 
function has an extraneous "return 'break'" that can and should be removed.  
But I doubt that is the problem.  It also has new code that is only executed 
for slider movements.

If only the slider has a problem and this slider code were to raise when at the 
bottom, we might have an explanation.  I am dubious, as the only possible 
platform-specific calls are the tkinter calls text.index('end') and 
text.index('@0.0').  To check this anyway, please start IDLE in the Mac 
terminal with 'python3 -m idlelib'  (correct on Mac?) and repeat the failing 
action and see if a traceback appears.

It might also help to know if 2.7 or 3.5- have the same problem.

--
nosy: +cheryl.sabella, taleinat

___
Python tracker 

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



[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec

Jan Švec  added the comment:

Not a bug, it assigns the value of re.IGNORECASE into the count parameter. Sorry

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



[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec

New submission from Jan Švec :

re.sub() is behaving incorrectly, if re.IGNORECASE is used. Tested on 2.7, 3.4 
and 3.6. The code follows:

import re

def subst(text):
   text = re.sub(r"\bnine\b", "niner", text, re.IGNORECASE)
   return text

print(subst("nine nine nine nine"))

It prints "niner niner nine nine". Without the re.IGNORECASE, the output is 
correct: "niner niner niner niner"

--
components: Regular Expressions
messages: 321062
nosy: Jan Švec, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Bad behavior of re.IGNORECASE
type: behavior
versions: Python 2.7, Python 3.4, Python 3.6

___
Python tracker 

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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7694

___
Python tracker 

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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7693

___
Python tracker 

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



[issue30516] Documentation for datetime substract operation incorrect?

2018-07-04 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:


New changeset 5b6e49a1393b3e2313471696e3568e26296137b4 by Alexander Belopolsky 
(Farhaan Bukhsh) in branch 'master':
bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
https://github.com/python/cpython/commit/5b6e49a1393b3e2313471696e3568e26296137b4


--

___
Python tracker 

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



[issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet

2018-07-04 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file

2018-07-04 Thread Ned Deily


Ned Deily  added the comment:

I think I am able to reproduce that behavior (I'm using IDLE from a python.org 
10.9+ installer).  What I'm seeing is that if you scroll to the bottom of a 
file that exceeds the length of the open text window and then click on and try 
to move the position indicator in the scroll bar, the position indicator does 
not move nor does the file scroll.  But if I then click elsewhere in the scroll 
bar and then try to grab and move the indicator, it works OK.  So perhaps IDLE 
is overriding a text widget event or some such.  FWIW a quick test in the 
wish8.6 text demo seems to work OK.

--
nosy: +ned.deily

___
Python tracker 

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



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

2018-07-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Unfortunately PR 8071 doesn't fix the crash on PGO builds. :-(  Initially I 
tested it only on the debug build, and now have tested on the PGO build.

--

___
Python tracker 

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



[issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file

2018-07-04 Thread Bruce Elgort


Change by Bruce Elgort :


--
title: Scrolling in IDLE for OS X is not working -> Scrolling in IDLE for OS X 
is not working correctly when reaching end of file

___
Python tracker 

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



[issue34047] Scrolling in IDLE for OS X is not working

2018-07-04 Thread Bruce Elgort


New submission from Bruce Elgort :

When using IDLE on OS X and scrolling to the bottom of a file you are not able 
to scroll using a mouse back up. You need to use the arrow keys.

--
assignee: terry.reedy
components: IDLE
messages: 321058
nosy: belgort, terry.reedy
priority: normal
severity: normal
status: open
title: Scrolling in IDLE for OS X is not working
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



[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2018-07-04 Thread Nir Barel


New submission from Nir Barel :

parent_parser = argparse.ArgumentParser(add_help=False)
main_parser = argparse.ArgumentParser(prog='app_cli')

service_subparsers = main_parser.add_subparsers(title="service",
dest="service_command", )

service_parser = service_subparsers.add_parser("-dr", help="sample help", 
parents=[parent_parser])

service_parser.add_argument("-old_host",help="my old host", dest="oldHost", 
required=False)

args = main_parser.parse_args()


when I try to run the app_cli -dr I am getting an error "error:unrecognized 
arguments: -dr"

when I try to run the app_cli with -dr -h I am getting the help of the main 
application and not the help of the service subparser

only if I change '-dr' to 'dr' it works as expected, but I need to support the 
hyphen for all arguments

--
components: Library (Lib)
messages: 321057
nosy: nir_ba...@bmc.com
priority: normal
severity: normal
status: open
title: subparsers -> add_parser doesn't support hyphen char '-'
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



[issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet

2018-07-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

Hum. I'm not sure about "unix_home" scheme in distutils. It seems like Fedora 
still writes files into $HOME/.../lib/... and not $HOME/.../lib64/ Example 
on Fedora 28:

vstinner@apu$ python3 -m pip install --user greenlet
Collecting greenlet
  Using cached 
https://files.pythonhosted.org/packages/dd/ce/7b3a19a3eb8c79e6237ba1fb7a8729b39034dd2de8753b8d27e5abc59fd5/greenlet-0.4.13-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: greenlet
Successfully installed greenlet-0.4.13
vstinner@apu$ python3 -m pip uninstall greenlet
Uninstalling greenlet-0.4.13:
  Would remove:
/home/vstinner/.local/include/python3.6m/greenlet/greenlet.h

/home/vstinner/.local/lib/python3.6/site-packages/greenlet-0.4.13.dist-info/*

/home/vstinner/.local/lib/python3.6/site-packages/greenlet.cpython-36m-x86_64-linux-gnu.so
Proceed (y/n)?

--

___
Python tracker 

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



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

2018-07-04 Thread Steve Dower


Steve Dower  added the comment:

I added the backport to 3.7 label to your PR, as I want to restore the marshal 
stack depth limit in 3.7.1.

--

___
Python tracker 

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



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

2018-07-04 Thread Steve Dower


Steve Dower  added the comment:

Thanks for writing that second PR, Serhiy! I'd already spotted that as the 
likely fix on our side, though I do want to complete the investigation into why 
MSVC generated unnecessarily sparse frames. But that is basically an internal 
discussion for me to follow up on at work.

--

___
Python tracker 

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



[issue34045] DoS due to null pointer dereference in marshal.dumps()

2018-07-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Eric.

--
nosy: +serhiy.storchaka
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



[issue34032] Add platlibdir to allow distinction between /usr/lib and /usr/lib64 for Linux

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

Fedora python3 patch: 
https://src.fedoraproject.org/rpms/python3/blob/master/f/00102-lib64.patch

--

___
Python tracker 

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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-04 Thread STINNER Victor


Change by STINNER Victor :


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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-04 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34045] DoS due to null pointer dereference in marshal.dumps()

2018-07-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I do not believe this is a problem. The marshal documentation includes this:

Warning The marshal module is not intended to be secure against erroneous or 
maliciously constructed data. Never unmarshal data received from an untrusted 
or unauthenticated source.

--
nosy: +eric.smith

___
Python tracker 

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



[issue34045] DoS due to null pointer dereference in marshal.dumps()

2018-07-04 Thread Krishna Ram Prakash R


New submission from Krishna Ram Prakash R :

By passing a malformed string as input to marshal.loads() an attacker can 
trigger a null pointer dereference resulting in DoS. 

This happens because when a Python object is unmarshalled by reference, it is 
assumed that the target object is fully constructed. We can construct a marshal 
string such that it can reference partially constructed Python objects. 

Example
---

tuple(FrozenSet(REF(0)))

Tuple -> FrozenSet -> REF(0)

When unmarshalling of the tuple object starts, a new PyTuple_New() object is 
created and its address is added to p->refs array before starting to parse and 
load all its children elements in a loop. A FrozenSet can be added as 0th 
element of this tuple. And then add the 0th element of this FrozenSet as 
p->refs[0]. After an element is added to FrozenSet, it tries to hash it 
believing that it is a completely constructed Python object. 

While it tries to hash the original tuple, it does not have any valid addresses 
in ob_item array. This results in a null pointer dereference throwing a SIGSEGV 
and crashing of interpreter. 

Running the below script results in a segmentation fault.

```
#!/usr/bin/env python3

import marshal
marshal.loads(b"\xa9\x01\xbe\x01\x00\x00\x00r\x00\x00\x00\x00")
```

--
components: Interpreter Core, Library (Lib)
messages: 321050
nosy: benjamin.peterson, rkrp
priority: normal
severity: normal
status: open
title: DoS due to null pointer dereference in marshal.dumps()
type: security
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



[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2018-07-04 Thread Armin Rigo


Armin Rigo  added the comment:

cffi supports complex numbers since release 1.11---for direct calls using the 
API mode.  That means that neither CFFI's ABI mode, nor ctypes, can possibly 
work yet.  The problem is still libffi's own support, which is still not 
implemented (apart on a very uncommon CPU architecture, the s390).

--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2018-07-04 Thread Sebastian Bank


Sebastian Bank  added the comment:

Thanks Eryk. Done: https://bugs.python.org/issue34044

--

___
Python tracker 

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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-04 Thread Sebastian Bank


New submission from Sebastian Bank :

AFAIU, the change for https://bugs.python.org/issue19764 broke the following 
usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to 
hide the command window):

import os, subprocess

STARTUPINFO = subprocess.STARTUPINFO()
STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW
STARTUPINFO.wShowWindow = subprocess.SW_HIDE

# raises OSError: [WinError 87]
# in the second loop iteration starting with Python 3.7
for i in range(2):
print(i)
with open(os.devnull, 'w') as stderr:
subprocess.check_call(['attrib'], stderr=stderr,
  startupinfo=STARTUPINFO)

AFAICT, this works on Python 2.7, 3.4, 3.5, and 3.6

I think the documentation in

https://docs.python.org/3/library/subprocess.html#windows-popen-helpers

does not mention that every Popen call should be done with a fresh instance, so 
either the documentation needs to be changed, or the implementation (e.g. by 
deep-copying the instance).

See also https://bugs.python.org/issue19764#msg320784

--
components: Library (Lib)
messages: 321047
nosy: eryksun, vstinner, xflr6
priority: normal
severity: normal
status: open
title: subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)
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



[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2018-07-04 Thread Reid


Reid  added the comment:

I concur with rutsky.  Complex numbers are essential in the physical sciences, 
and the complex type is part of the c99 standard.  Trying to shoehorn complex 
support by a user-defined type makes use of the builtin methods for the 
standard complex type clunky.

--
nosy: +rkmountainguy
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue34031] [EASY] Incorrect usage of unittest.TestCase in test_urllib2_localnet

2018-07-04 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This might be slightly unrelated but I grepped for similar cases and came 
across self.fail, "Broken file" in Lib/test/test_file.py at 
https://github.com/python/cpython/blob/a390cb6b6fb6638e91d699513167e8f35b47f846/Lib/test/test_file.py#L245.
 I think this is not triggered for broken file which I tried in the test by 
removing the if condition. Kindly correct me if I am wrong on the syntax or 
this should be raised as a separate issue.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue33374] generate-posix-vars failed when building Python 2.7.14 on Linux

2018-07-04 Thread Peter Senna Tschudin


Peter Senna Tschudin  added the comment:

I got here when trying to build Yocto Sumo on Fedora 28. python_native build 
was failing with a segfault. Here is how I fixed it with no elegance intended:

$ git clone https://github.com/python/cpython.git
$ cd cpython/
$ git show 0b91f8a668201fc58fa732b8acc496caedfdbae0 > /tmp/gcc8-fix.patch

$ cd $HOME/poky-sumo/meta/recipes-devtools/python
$ cp /tmp/gcc8-fix.patch python-native/

$ git diff python-native_2.7.14.bb
diff --git a/meta/recipes-devtools/python/python-native_2.7.14.bb 
b/meta/recipes-devtools/python/python-native_2.7.14.bb
index 7c491fa3e0..e9a8c14e9c 100644
--- a/meta/recipes-devtools/python/python-native_2.7.14.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.14.bb
@@ -16,6 +16,7 @@ SRC_URI += "\
 file://builddir.patch \
 file://parallel-makeinst-create-bindir.patch \
 file://revert_use_of_sysconfigdata.patch \
+file://gcc8-fix.patch \
"
 
 S = "${WORKDIR}/Python-${PV}"

--
nosy: +Peter Senna Tschudin

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The simplest reproducer:

import gc, sys
for i in range(100):
class A:
pass
del A
c = gc.collect()
del c
print(sys.gettotalrefcount())

--
nosy: +pitrou, vstinner

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Interpreter Core
nosy: +serhiy.storchaka
type:  -> resource usage

___
Python tracker 

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



[issue34043] Optimize tarfile uncompression performance

2018-07-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +lars.gustaebel, serhiy.storchaka

___
Python tracker 

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



[issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class

2018-07-04 Thread Evgeny Prilepin

Evgeny Prilepin  added the comment:

Hi Rémi, it would be great if you posted a PR.

--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

> @Victor I think removing unused code is better than adding test for it and 
> maintain it.

Sure. I reviewed your PR 8089.

--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread INADA Naoki


INADA Naoki  added the comment:

@Victor I think removing unused code is better than adding test for it and 
maintain it.

So I removed that unused code block in GH-8089.

--

___
Python tracker 

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



[issue34043] Optimize tarfile uncompression performance

2018-07-04 Thread INADA Naoki


New submission from INADA Naoki :

tarfile._Stream has two buffer for compressed and uncompressed data.
Those buffers are not aligned so unnecessary bytes slicing happens
for every reading chunks.

This commit bypass compressed buffering.

In this benchmark [1], user time become 250ms from 300ms.

[1]: https://bugs.python.org/msg320763

--

___
Python tracker 

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



[issue34043] Optimize tarfile uncompression performance

2018-07-04 Thread INADA Naoki


Change by INADA Naoki :


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

___
Python tracker 

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



[issue34043] Optimize tarfile uncompression performance

2018-07-04 Thread INADA Naoki


Change by INADA Naoki :


--
components: Library (Lib)
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Optimize tarfile uncompression performance
type: performance
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



[issue34035] zipfile: AttributeError in "seek" method of "_SharedFile" class

2018-07-04 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Evegeny, I was able to reproduce the issue, if it's all right for you I 
would like to post a PR to solve the issue and extend the test suite od this 
module.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-04 Thread Kay Hayen


New submission from Kay Hayen :

I have a test in Nuitka, designed to detect reference counting problems with 
Python code. It basically takes a snapshot of the refcount, runs a function 
until it stabilizes, then says PASS, or else reports the last diff. Obviously 
for CPython it's supposed to pass. 

Testing with self compiled 3.7.0 and 3.7.0-1 as in Debian testing (buster) 
currently, this happens for me:

This is a cutout, there are more than 100 functions, I am listing the ones that 
report:

simpleFunction16: FAILED 118414 118412 leaked -2
simpleFunction17: FAILED 118395 118393 leaked -2
simpleFunction18: FAILED 118375 118373 leaked -2
...

simpleFunction21: FAILED 118337 118333 leaked -4
...
simpleFunction25: FAILED 118315 118313 leaked -2
simpleFunction26: FAILED 118295 118293 leaked -2
...
simpleFunction38: FAILED 118257 118253 leaked -4
simpleFunction39: FAILED 118235 118233 leaked -2
...
simpleFunction43: FAILED 118215 118213 leaked -2
simpleFunction48: FAILED 118195 118193 leaked -2
...
simpleFunction76: FAILED 118422 118418 leaked -4
...
simpleFunction88: FAILED 118400 118398 leaked -2

This is really bad, because normally values are positive, merely preventing a 
release. A negative value indicates that references have been lost. This will 
normally result in corruption of the memory allocator for Python, although I 
have not yet seen that. I have a few remaining cases, where compiled code 
causes negative leaks too, there is happens. But I didn't force the issue yet.

Notice that this is of course with the debug Python version and let me express, 
pure CPython is used to run the test code.

When compiling with Nuitka and 3.7, my private code gives the same ref counts 
for there, but it also pretty much does
the same things, these are some of the functions:

def simpleFunction16():
class EmptyClass:
pass

return EmptyClass

def simpleFunction39():
class Parent(object):
pass

All the other cases also use locally defined classes and only test cases using 
local classes are failing for me here.

To reproduce is easy:

git clone --branch develop http://git.nuitka.net/Nuitka.git
python3.7-dbg Nuitka/tests/basics/Referencing.py

Thanks,
Kay Hayen

--
messages: 321037
nosy: kayhayen
priority: normal
severity: normal
status: open
title: Reference loss for local classes
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



[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-04 Thread Nick Coghlan


Nick Coghlan  added the comment:

Aye, and I think from Miro's comments on your PR, making it apply some of the 
same configuration settings that 3.6 and earlier applied is going to be 
required to get fontforge working again for 3.7.

At the very least, the call to set sys.argv is needed.

--

___
Python tracker 

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



[issue34009] Document Travis CI / Ubuntu 14.04 OpenSSL compatibility issues

2018-07-04 Thread Nick Coghlan


Nick Coghlan  added the comment:

Given the update in 
https://github.com/deadsnakes/travis-ci-python3.7-example#update-2018-07-03, 
I've simplified the PR to remove any references to Travis CI, and instead just 
mention the code names for the relevant Debian and Ubuntu releases.

I've also kept the pointer to our CI config for building your own Python 
against OpenSSL 1.1.0, regardless of the host OS state.

--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thank you Lorenz Mende for your fix, and Terry for your review! I tested 
manually the fix, and I confirm that it works (Terry also tested and confirmed 
that the fix works as expected).

I applied your fix to master, and backport it to 3.6 and 3.7. Python 2.7 has no 
test on script_helper, so it's not affected by this bug.

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset aea19a0530726c7ba6a9461b0024506529dc35e8 by Miss Islington (bot) 
in branch '3.6':
bpo-32942: Fix environment dependent test_script_helper (GH-8034)
https://github.com/python/cpython/commit/aea19a0530726c7ba6a9461b0024506529dc35e8


--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset 6b3ff35670869fb915d43ac434c473c1fc11598e by Miss Islington (bot) 
in branch '3.7':
bpo-32942: Fix environment dependent test_script_helper (GH-8034)
https://github.com/python/cpython/commit/6b3ff35670869fb915d43ac434c473c1fc11598e


--
nosy: +miss-islington

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

I doubled the sleep: it should be better. If not, we can easily increase even 
more the sleep ;-)

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset ae23d8de8d7d810a8dbe1b09ea37590aff3e1aa0 by Miss Islington (bot) 
in branch '3.6':
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
https://github.com/python/cpython/commit/ae23d8de8d7d810a8dbe1b09ea37590aff3e1aa0


--

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7689

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7688

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset eb700f8c94602feb8c10ad8fc600f55e17e3b092 by Miss Islington (bot) 
in branch '3.7':
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
https://github.com/python/cpython/commit/eb700f8c94602feb8c10ad8fc600f55e17e3b092


--
nosy: +miss-islington

___
Python tracker 

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



[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a390cb6b6fb6638e91d699513167e8f35b47f846 by Victor Stinner 
(Lorenz Mende) in branch 'master':
bpo-32942: Fix environment dependent test_script_helper (GH-8034)
https://github.com/python/cpython/commit/a390cb6b6fb6638e91d699513167e8f35b47f846


--

___
Python tracker 

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



[issue34041] add *deterministic* parameter to sqlite3.Connection.create_function()

2018-07-04 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue34041] add *deterministic* parameter to sqlite3.Connection.create_function()

2018-07-04 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

SQLiter 3.8.3 and higher allows to mark created functions as deterministic to 
allow additional optimizations. There isn't currently a way to it from Python.

https://sqlite.org/c3ref/create_function.html

--
components: Extension Modules
messages: 321027
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: add *deterministic* parameter to sqlite3.Connection.create_function()
type: enhancement

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-07-04 Thread Nick Coghlan


Nick Coghlan  added the comment:

To avoid confusing the discussions, two PEPs is likely a better option:

1. Designing and implementing a dedicated preload mechanism
2. Adjusting the way pth file handling works, including deprecating and 
removing the "pth arbitrary file execution" trick (depends on the first one as 
the forward compatible migration path for legitimate code preloading use cases)

--

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is not affected: it has no forkserver.

--

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7686

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7685

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 07888e1cce89e9bb7dc501e287b4cb126e01c378 by Victor Stinner in 
branch 'master':
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
https://github.com/python/cpython/commit/07888e1cce89e9bb7dc501e287b4cb126e01c378


--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset d7a0ad7dd7bd7dfbdbf6be2c89fde5a71813628a by Miss Islington (bot) 
in branch '3.6':
bpo-34010: Fix tarfile read performance regression (GH-8020)
https://github.com/python/cpython/commit/d7a0ad7dd7bd7dfbdbf6be2c89fde5a71813628a


--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread miss-islington


miss-islington  added the comment:


New changeset c1b75b5fb92fda0ac5b931d7b18c1418557cb7c4 by Miss Islington (bot) 
in branch '3.7':
bpo-34010: Fix tarfile read performance regression (GH-8020)
https://github.com/python/cpython/commit/c1b75b5fb92fda0ac5b931d7b18c1418557cb7c4


--
nosy: +miss-islington

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/python/cpython/pull/8020/files/77a54a39aace1a38794884218abe801b85b54e62#diff-ef64d8b610dda67977a63a9837f46349

-buf = "".join(t)
+buf = b"".join(t)


@hajoscher: "It never caused a problem, since this line is never called; size 
is never None in the function call. But still, should be fixed, I guess."

Would it be possible to have an unit test for this modified line? Untested code 
is broken, as you showed :-)

--
nosy: +vstinner

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread INADA Naoki


INADA Naoki  added the comment:

thanks

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7684

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7683

___
Python tracker 

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



[issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

> After increasing the number of CPUs in the virtual machine the failure no 
> longer reproduced. It is reproducible only with a single CPU.

The test just failed on AMD64 Debian root 3.x and according to test.pythoninfo, 
this machine has a single CPU:

os.cpu_count: 1

http://buildbot.python.org/all/#/builders/27/builds/1247

...
== CPU count: 1
== encodings: locale=UTF-8, FS=utf-8
Using random seed 6423496
Run tests in parallel using 2 child processes
0:00:00 load avg: 0.71 [  1/417] test_genericclass passed
0:00:00 load avg: 0.71 [  2/417] test_copyreg passed
0:00:03 load avg: 0.71 [  3/417] test_os passed
stty: standard input: Inappropriate ioctl for device
running: test_tokenize (32 sec 627 ms), test_signal (30 sec 11 ms)
0:00:51 load avg: 1.32 [  4/417] test_tokenize passed (50 sec 821 ms) -- 
running: test_signal (48 sec 506 ms)
0:00:54 load avg: 1.32 [  5/417/1] test_signal failed
...
test_stress_delivery_dependent (test.test_signal.StressTest) ... detected 
median itimer() resolution: 0.44 s.
FAIL
test_stress_delivery_simultaneous (test.test_signal.StressTest) ... detected 
median itimer() resolution: 0.32 s.
ok
...
==
FAIL: test_stress_delivery_dependent (test.test_signal.StressTest)
--
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_signal.py", line 
1156, in test_stress_delivery_dependent
self.assertEqual(len(sigs), N, "Some signals were lost")
AssertionError: 3617 != 1 : Some signals were lost

--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 12a08c47601cadea8e7d3808502cdbcca87b2ce2 by INADA Naoki 
(hajoscher) in branch 'master':
bpo-34010: Fix tarfile read performance regression (GH-8020)
https://github.com/python/cpython/commit/12a08c47601cadea8e7d3808502cdbcca87b2ce2


--

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

> FAIL: test_forkserver_sigkill 
> (test.test_multiprocessing_forkserver.WithProcessesTestProcess)

This failure is unrelated to the semaphore tracker, so I created bpo-34040: 
"test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly".

--

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


STINNER Victor  added the comment:

Another example of failure:
https://bugs.python.org/issue31687#msg307355

x86 Tiger 3.x:

http://buildbot.python.org/all/#/builders/30/builds/260

==
FAIL: test_semaphore_tracker 
(test.test_multiprocessing_forkserver.TestSemaphoreTracker)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 4380, in test_semaphore_tracker
_multiprocessing.sem_unlink(name2)
AssertionError: OSError not raised

==
FAIL: test_forkserver_sigkill 
(test.test_multiprocessing_forkserver.WithProcessesTestProcess)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 653, in test_forkserver_sigkill
self.check_forkserver_death(signal.SIGKILL)
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 643, in check_forkserver_death
self.assertTrue(evt.is_set())
AssertionError: False is not true

--

___
Python tracker 

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



[issue34010] tarfile stream read performance regression

2018-07-04 Thread INADA Naoki


Change by INADA Naoki :


--
keywords: +3.2regression
title: tarfile stream read performance -> tarfile stream read performance 
regression

___
Python tracker 

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



[issue34040] test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly

2018-07-04 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 FreeBSD 10.x Shared 3.x:
http://buildbot.python.org/all/#/builders/87/builds/1137

==
FAIL: test_forkserver_sigkill 
(test.test_multiprocessing_forkserver.WithProcessesTestProcess)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/_test_multiprocessing.py",
 line 680, in test_forkserver_sigkill
self.check_forkserver_death(signal.SIGKILL)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/_test_multiprocessing.py",
 line 670, in check_forkserver_death
self.assertTrue(evt.is_set())
AssertionError: False is not true

Re-running test 'test_multiprocessing_forkserver' in verbose mode
Ran 310 tests in 100.124s
OK (skipped=27)

--
components: Tests
messages: 321015
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_forkserver: test_forkserver_sigkill() fails randomly
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



[issue34039] Loop limited to 1000

2018-07-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Sorry, this is for reporting bugs in the Python interpreter and standard 
library, not your own code. If you have a bug in your pyinator project, you 
should report it to yourself, not us :-)

If you think my analysis of the problem below is wrong, and that you have truly 
found a bug in the interpreter, please read this:

http://www.sscce.org/

and give us the smallest example of this bug you can, don't just link to your 
library and expect us to find the problem ourselves.

My analysis, based on a *brief* look at your project, it that every time you 
call GetPriceCheck, you increase the recursion limit by an extra 1000, and then 
keep making more and more recursive calls until you run out of memory and 
segfault. That's pretty much unavoidable.

To prevent that, you can:

- add more memory; 

- make fewer recursive calls;

- fix your code to use a better technique for scraping websites.

(It is rude to keep hitting a website over and over and over again, without any 
limit. Websites have limited bandwidth, which they pay for, and every time you 
hit the website, that makes it harder for somebody else. At the very least, you 
should back off exponentially, waiting longer between each attempt: 1 second, 2 
seconds, 4 seconds, 8 seconds, 16 seconds...)

The recursion limit is designed to prevent segfaults by giving you a nice 
Python-level exception instead of a hard, OS-level segmentation fault. But if 
you set the recursion limit too high, you by-pass that protection and you are 
responsible for not crashing the stack.

--
nosy: +steven.daprano
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



[issue34039] Loop limited to 1000

2018-07-04 Thread Benjamin Gear


New submission from Benjamin Gear :

I think this is a bug or maybe I'm seeing it wrong so I have a while loop witch 
collects data from a website json outs it into a list then does the same thing 
into a 2nd list then it calls the my comparing function and outputs the changes 
at 1st with only a while loop no call to function and would run no problem for 
days now I have changed it to collect all the data and now I'm getting limited 
to 1000 recursions I then attempted to alter the 100 limit witch works until 
seg fault now 

https://github.com/blkph0x/pyinator

--
messages: 321013
nosy: Blkph0x
priority: normal
severity: normal
status: open
title: Loop limited to 1000
type: behavior
versions: Python 3.6

___
Python tracker 

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