[issue45381] IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze program.

2021-10-05 Thread A A


New submission from A A :

Idle3 with python 3.7.3 on Debian Buster and XFCE.
Attempting to run the line 'print ("Hello World" * 8**8)' from either the Idle 
shell window or Idle editor will cause Idle to hang and one CPU core runs 
100%.(allowed it to run for several minutes) 
ctl+c or menu Shell>interrupt execution simply pauses CPU processing but does 
not terminate the process nor is there an option to continue the process. 
Following this interrupt with use of menu Shell>Restart-shell causes Idle to 
fully freeze and then requires a system terminate signal to close Idle.
The same line of python used in Idle on another student's MS-Windows laptop 
required ctl-alt-del this was a fresh download with v3.9 as I recall.

When used used on the system Bash shell and python 3.7.3, the line operates 
without any trouble and finishes in 20seconds as: $ python3 -c 'print ( "Hello 
World " * 8**8)' 

Suggestion is that the ctl+c or the Interrupt menu option in Idle should 
terminate the running code rather than pause it.

--
assignee: terry.reedy
components: IDLE
messages: 403259
nosy: capsicumw, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE cannot kill process. "interupt" ctl+c and "restart shell" freeze 
program.
type: behavior
versions: Python 3.7

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



[issue9290] IDLE and Command line present different behavior for sys.stdin

2012-03-11 Thread a

a  added the comment:

Other quirks apparently caused by this bug:

msvcrt.getch() does not block and wait for a keypress in IDLE.  Returns 
immediately with b'\xff'.

Some of the suggested usage in the manual for sys.stdin does not work under 
IDLE.  E.g. sys.stdin.detach() doesn't work in IDLE.  On this last point, the 
manual has a caveat in the last line of the sys.stdin description that could 
exonerate it.  Regardless, the behavior is inconsistent and makes for awkward 
UI when using IDLE.

------
nosy: +a
versions: +Python 3.2 -Python 3.1

___
Python tracker 
<http://bugs.python.org/issue9290>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31809] ssl module unnecessarily pins the client curve when using ECDH

2017-10-18 Thread A

New submission from A :

When using elliptic curves in combination with the ssl module to wrap a socket, 
the only curve the client accepts is prime256v1. Expected behavior is to accept 
all curves that are on the default list and supported by the server.

We noticed the issue when connecting to a server that is configured with a non 
standard curve, we get

[SSL: WRONG_CURVE] wrong curve (_ssl.c:661)

unless we explicitly specify to use the correct curve for the context using

context.set_ecdh_curve("secp521r1")

The bug happens both when using a context or ssl.wrap_socket directly.



The bug is that cpython calls OpenSSL (or whatever lib is linked) server 
methods even when the context is purely for client communications. The flow is:

- A ssl.SSLContext gets instantiated that will later be used in 
SSLContext.wrap_socket with server_side either True or False (bug happens when 
this is client side, so server_side=False).

- In the context's constructor, where it's not yet clear if the context is for 
a client or a server socket, there is this code:
https://github.com/python/cpython/blob/b9a860f3bf80b0d4a6c25d0f2f6ef849d9bf3594/Modules/_ssl.c#L2180

That code calls (in many cases, depending on the Python and OpenSSL versions 
involved) server side only methods, SSL_CTX_set_ecdh_auto or 
SSL_CTX_set_tmp_ecdh.

Those methods should in theory not influence the client side of the context, 
there is even a comment in the docs for SSLContext.set_ecdh_curve which does 
similar things that says "This setting doesn’t apply to client sockets". 
However, this being OpenSSL, this is not true. The methods actually set the 
list of acceptable curves that is used for both, server and client side 
connections, to exactly a single curve, prime256v1. This happens for both, 
SSL_CTX_set_tmp_ecdh and SSL_CTX_set_ecdh_auto.


Versions affected:

OpenSSL has changed the API twice here. Before 1.0.2, SSL_CTX_set_tmp_ecdh was 
mandatory, 1.0.2 - <1.1.0 used SSL_CTX_set_ecdh_auto and 1.1.0+ doesn't need 
this setting at all.

Python 2.7.14+ added a check for 1.1.0+ in 
https://github.com/python/cpython/commit/f1a696efd6ca674579e25de29ec4053ff5a5ade1
 so starting from that version the issue only happens when using OpenSSL 
<1.1.0. I suspect this is the case for many machines still, including all Macs 
(haven't confirmed the actual bug there). For LibreSSL the server side methods 
will be called too, I can't confirm if that combination is vulnerable too.

Python 3.5.3 gives me the same error, no reason to believe that higher versions 
are not affected.

--
assignee: christian.heimes
components: SSL
messages: 304577
nosy: christian.heimes, gr
priority: normal
severity: normal
status: open
title: ssl module unnecessarily pins the client curve when using ECDH
type: behavior
versions: Python 2.7, Python 3.5

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



[issue46599] Objects/object.c:767:24: runtime error: member access within null pointer of type 'PyObject' (aka 'struct _object')

2022-02-01 Thread A-Shvedov


New submission from A-Shvedov :

Hello. Got an error with AFLplusplus, with crafted sample:
https://github.com/a-shvedov/res/blob/master/fuzzing/python/crashes/id:00%2Csig:11%2Csrc:009074%2Ctime:446401660%2Cexecs:16120011%2Cop:arith8%2Cpos:16%2Cval:-21

Compiled with: clang (version 6.0.0-3) ;

Configure params: --enable-optimizations --prefix= .

Package version: Python-3.9.9 ;

Builded binary info:
python: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically 
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not 
stripped ;

Stderr with run crafted sample: Segmentation fault ;

AddressSanitizer run:
Objects/object.c:767:24: runtime error: member access within null pointer of 
type 'PyObject' (aka 'struct _object') ;

AddressSanitizer log attached in logfile.

--
components: Interpreter Core
files: issue-file_asanlog.log
messages: 412251
nosy: a-shvedov
priority: normal
severity: normal
status: open
title: Objects/object.c:767:24: runtime error: member access within null 
pointer of type 'PyObject' (aka 'struct _object')
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50599/issue-file_asanlog.log

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



[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2022-03-05 Thread Jameel A.


Change by Jameel A. :


--
versions: +Python 3.10, Python 3.9

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



[issue13587] Correcting the typos error in Doc/howto/urllib2.rst

2011-12-12 Thread Bithin A

New submission from Bithin A :

In the documentation 'HOWTO Fetch Internet Resources Using urllib2' there is a 
correction under the heading 'Basic Authentication'

In the line 'The header looks like : ``Www-authenticate: SCHEME 
realm="REALM"``. ' the word 'Www-authenticate' should be written as 
'WWW-Authenticate' . 

Link : docs.python.org/howto/urllib2.html

--
assignee: docs@python
components: Documentation
messages: 149295
nosy: Bithin.A, docs@python
priority: normal
severity: normal
status: open
title: Correcting the typos error in Doc/howto/urllib2.rst
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 
<http://bugs.python.org/issue13587>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13737] bugs.python.org's Django settings file DEBUG=True

2012-01-07 Thread Bithin A

New submission from Bithin A :

I am getting an Django error when I was trying to review a patch. This error 
has occurred in the site as the DEBUG mode in the Django settings file is set 
to True. It is a security issue and should be set to false. I am attaching the 
screen shot of the error which I have come across.

--
components: None
files: Screenshot at 2012-01-08 13:11:43.png
messages: 150852
nosy: Bithin.A
priority: normal
severity: normal
status: open
title: bugs.python.org's Django settings file DEBUG=True
type: security
Added file: http://bugs.python.org/file24174/Screenshot at 2012-01-08 
13:11:43.png

___
Python tracker 
<http://bugs.python.org/issue13737>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13737] bugs.python.org/review's Django settings file DEBUG=True

2012-01-08 Thread Bithin A

Bithin A  added the comment:

The bugs.python.org/review is a running application and it is very bad to see 
debug error messages.

--

___
Python tracker 
<http://bugs.python.org/issue13737>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2019-08-17 Thread A. Skrobov


A. Skrobov  added the comment:

Joannah, I see that under #25314, the docs were updated to match the 
implementation: 
https://github.com/python/cpython/commit/b4912b8ed367e540ee060fe912f841cc764fd293

On the other hand, the discussion here (from 2015) and on #25314 (from 2016) 
includes suggestions for improvements in the implementation as well.

--

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



[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-04 Thread Anj-A


Anj-A <2017...@gmail.com> added the comment:

Hi all, I'm a newcomer interested in doing a small fix. Wondering if anyone's 
working on this at the moment?

------
nosy: +Anj-A

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



[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-04 Thread Anj-A


Anj-A <2017...@gmail.com> added the comment:

Hey, I'm not exactly clear what the required fix is here and would appreciate 
some guidance, is it in the documentation or in the way the error is handled?

--

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



[issue37838] typing.get_type_hints not working with forward-declaration and decorated functions

2019-11-04 Thread Anj-A


Change by Anj-A <2017...@gmail.com>:


--
keywords: +patch
pull_requests: +16560
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17047

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



[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-11-04 Thread Anj-A


Anj-A <2017...@gmail.com> added the comment:

Hey, I've done the change and opened a pull request for it (I'm working with 
Ben and I've let him know)

--
nosy: +Anj-A

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



[issue38652] Remove/update provisional note for asyncio.BufferedProtocol

2019-11-04 Thread Anj-A


Change by Anj-A <2017...@gmail.com>:


--
keywords: +patch
pull_requests: +16563
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17047

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



[issue44910] Floating point issue

2021-08-13 Thread A wilson


New submission from A wilson :

0.01 + 273.15 should equal 273.16 but in python 3.9.5 or earlier report as 
273.159997.

--
messages: 399550
nosy: afw2alan
priority: normal
severity: normal
status: open
title: Floating point issue
type: behavior
versions: Python 3.9

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



[issue44910] Floating point issue

2021-08-13 Thread A wilson


A wilson  added the comment:

Eric,

I was unaware of this document and its implementation in python.

where
0.01+0.15 = 0.16 but 0.01+273.15=273.159997

the latter which should be 273.16 which is triple point temperature of water in 
Kelvin.

This floating point variance explains some if the conditional test failures I 
have encountered.

regards

Alan

Get Outlook for Android<https://aka.ms/ghei36>


From: report=bugs.python@roundup.psfhosted.org 
 on behalf of Eric V. Smith 

Sent: Friday, 13 August 2021, 21:52
To: afw2a...@outlook.com
Subject: [issue44910] Floating point issue

Eric V. Smith  added the comment:

This a limitation of the floating point type that python uses. See 
https://docs.python.org/3/tutorial/floatingpoint.html

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue44910>
___

--

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



[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-12 Thread Anj-A


Anj-A <2017...@gmail.com> added the comment:

Hey, if there is no bug here, could we get this issue closed?
Alternatively, I'd be interested in doing the required change in 
documentation/error type if that's seen to be the right solution.

Personally, I think returning False instead of raising an error would indeed 
mask bugs as mentioned by Zufu. As for the error type to be raised, the 
argument type itself isn't wrong, it's just greater than the maximum so I feel 
an OverflowError type is right instead of TypeError. So maybe just clearer 
documentation is needed as suggested by Aldwin and no code change? Just my two 
cents though.

--

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



[issue40439] Error in an external reference

2020-04-29 Thread Patrick A.

New submission from Patrick A. :

This URL doesn't exist anymore. If you click on this URL you have a 404 not 
found.

https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html

The website was changed and Dr. Martin v. Löwis is not hosted on the new site.

Regards

--
assignee: docs@python
components: Documentation
messages: 367665
nosy: audpa31, docs@python
priority: normal
severity: normal
status: open
title: Error in an external reference
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue40543] Tamil locale is using outdated encoding

2020-05-07 Thread Muthu A


New submission from Muthu A :

Tamil locale (TA_IN, TA_SL, TA_SG, TA_MY) is using outdated encoding of TSCII. 
Tamil community is widely using UTF-8 encoding.
Further, the 'locale' standard library package in Python3 should be updated 
with these strings.

Should the maintainers desire assistance on this task, as a native speaker of 
the language, I can propose a patch or recommed other native speakers for this 
task.

--
files: Screen Shot 2020-05-06 at 11.04.18 PM.png
messages: 368325
nosy: Muthu A
priority: normal
severity: normal
status: open
title: Tamil locale is using outdated encoding
Added file: https://bugs.python.org/file49137/Screen Shot 2020-05-06 at 
11.04.18 PM.png

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



[issue14064] collections module imported twice in urllib/parse.py

2012-02-20 Thread Bithin A

New submission from Bithin A :

In urllib/parse.py the collections module is imported twice which is against 
the PEP8-- Style Guide for Python Code.

--
components: Library (Lib)
files: multiple_imports.patch
keywords: patch
messages: 153780
nosy: Bithin.A
priority: normal
severity: normal
status: open
title: collections module imported twice in urllib/parse.py
Added file: http://bugs.python.org/file24577/multiple_imports.patch

___
Python tracker 
<http://bugs.python.org/issue14064>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14064] collections module imported twice in urllib/parse.py

2012-02-20 Thread Bithin A

Changes by Bithin A :


--
type:  -> enhancement

___
Python tracker 
<http://bugs.python.org/issue14064>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14064] collections module imported twice in urllib/parse.py

2012-02-20 Thread Bithin A

Changes by Bithin A :


Removed file: http://bugs.python.org/file24577/multiple_imports.patch

___
Python tracker 
<http://bugs.python.org/issue14064>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14524] Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H

2012-04-07 Thread Paul A.

New submission from Paul A. :

Shouldn't configure be able to arrive at that without me adding manually?

Anyway, after the build finishes thing soon come crashing down; my stack trace 
is at the end...

running build_scripts
creating build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/pydoc -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/idle -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/2to3 -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Lib/smtpd.py -> 
build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 644 to 755
changing mode of build/scripts-2.7/idle from 644 to 755
changing mode of build/scripts-2.7/2to3 from 644 to 755
changing mode of build/scripts-2.7/smtpd.py from 644 to 755
sh[3]: 1340 Abort(coredump)

(gdb) bt
#0  0xc04395d0:0 in kill+0x30 () from /usr/lib/hpux64/libc.so.1
#1  0xc02e8180:0 in raise+0x120 () from /usr/lib/hpux64/libc.so.1
#2  0xc03f8c50:0 in abort+0x170 () from /usr/lib/hpux64/libc.so.1
#3  0xc00010f0c7f0:0 in free (mem=0x600053d0)
at /usr/local/src/Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c:4288
#4  0xc0bfcde0:0 in _UNW_free_mpool()+0xc0 ()
   from /usr/lib/hpux64/libunwind.so.1
#5  0xc004cb50:0 in EM_mark_BOS+0x50 () from /usr/lib/hpux64/dld.so

--
components: Build
messages: 157768
nosy: pda
priority: normal
severity: normal
status: open
title: Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on 
ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue14524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14524] Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H

2012-04-07 Thread Paul A.

Changes by Paul A. :


--
type:  -> crash

___
Python tracker 
<http://bugs.python.org/issue14524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED

2012-04-07 Thread Paul A.

New submission from Paul A. :

I can't help thinking that configure should be able to figure out the need for 
this -- Modules/termios.c won't compile without adding -D_TERMIOS_INCLUDED by 
hand. This is far from new, all 2.5+ versions I've tried to compile are like 
that on this platform.

--
components: Build
messages: 157769
nosy: pda
priority: normal
severity: normal
status: open
title: ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without 
-D_TERMIOS_INCLUDED
type: enhancement
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue14525>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-07 Thread Paul A.

New submission from Paul A. :

Perhaps I'm not interpreting something happening earlier, but `make test' here  
only seems to run a short time but doesn't actually finish.  It appears not to 
be using any cpu, or waiting for input, so I'm not sure what's happening.
...
test_grammar
test_opcodes
test_dict
test_builtin
test_exceptions
test_types
test_unittest
test_doctest
test_doctest2
test_py3kwarn
test_py3kwarn skipped -- test.test_py3kwarn must be run with the -3 flag
test_MimeWriter
test_SimpleHTTPServer
test_StringIO
test___all__
test test___all__ failed -- Traceback (most recent call last):
  File "/usr/local/src/Python-2.6.8rc2/Lib/test/test___all__.py", line 103, in 
test_all
self.check_all(modname)
  File "/usr/local/src/Python-2.6.8rc2/Lib/test/test___all__.py", line 39, in 
check_all
modname, e.__class__.__name__, e))

AssertionError: __all__ failure in distutils.command: ImportError: No module 
named _sha256

test___future__
test__locale
test_abc
test_abstract_numbers
test_aepack
test_aepack skipped -- No module named aepack
test_aifc
test_al
test_al skipped -- No module named al
test_anydbm
test_applesingle
test_applesingle skipped -- No module named macostools
test_array
test_ast
test_asynchat
test test_asynchat failed -- multiple errors occurred; run in verbose mode for 
details
test_asyncore
test test_asyncore failed -- multiple errors occurred; run in verbose mode for 
details
test_atexit
test_audioop
test_augassign
test_base64
test_bastion
test_bigaddrspace
test_bigmem
test_binascii
test_binhex
test_binop
test_bisect
test_bool
test_bsddb
test_bsddb skipped -- No module named _bsddb
test_bsddb185
test_bsddb185 skipped -- No module named bsddb185
test_bsddb3
test_bsddb3 skipped -- No module named _bsddb
test_buffer
test_bufio
test_bytes
test_bz2
test_bz2 skipped -- No module named bz2
test_calendar
test_call
test_capi

--
components: Tests
messages: 157771
nosy: pda
priority: normal
severity: normal
status: open
title: Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue14526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14527] How to link with an external libffi?

2012-04-07 Thread Paul A.

New submission from Paul A. :

I trying to build python using an external libffi package I have installed -- 
is there some trick in directing --with-system-ffi to the path where it's 
located.  I don't see clues in config.log or anywhere to help.

--
messages: 157776
nosy: pda
priority: normal
severity: normal
status: open
title: How to link with an external libffi?
type: enhancement
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue14527>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14524] Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H

2012-04-08 Thread Paul A.

Paul A.  added the comment:

On Sun, Apr 08, 2012 at 02:01:05AM +, R. David Murray wrote:
> 
> R. David Murray  added the comment:
> 
> Is this a bug report about configure, or a bug report about a crash during 
> compilation after you've adjusted the configure parameters?  It seems like 
> you are reporting two different things here.

You're right I see that doesn't quite make sense now.  The crash is
obviously much more critical.  I don't suppose there's a way of changing
the bug's title?  I'll open a new one if not.

> For the configure issue, would you care to suggest a patch?  I don't believe 
> we have any core developers with access to hpux.

Sure, I'd like to eventually, but knowing very little about auto-tools
that likely won't be very soon.  Are there docs anyone can recommend?

--

___
Python tracker 
<http://bugs.python.org/issue14524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED

2012-04-08 Thread Paul A.

Paul A.  added the comment:

On Sun, Apr 08, 2012 at 02:06:46AM +, R. David Murray wrote:
> 
> R. David Murray  added the comment:
> 
> Can you suggest a patch?  As I said on the other issue I don't believe any 
> core developers have access to hpux.

Sure, once I figure out what that patch will be.

--

___
Python tracker 
<http://bugs.python.org/issue14525>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-08 Thread Paul A.

Paul A.  added the comment:

On Sun, Apr 08, 2012 at 02:13:39AM +, R. David Murray wrote:
> 
> R. David Murray  added the comment:
> 
> Oh, wait, I see you are testing the security RC.  Is this a new problem, or 
> does it also occur with the previous released version of 2.6?

Yes... I'm not on that box right now, but from what I recall 2.6.7 and
2.7.2 did the same thing.  But seems as though the 2.7.3 rc has regressed.

--

___
Python tracker 
<http://bugs.python.org/issue14526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14527] How to link with an external libffi?

2012-04-08 Thread Paul A.

Paul A.  added the comment:

On Sun, Apr 08, 2012 at 05:58:29AM +, Ross Lagerwall wrote:
> 
> Ross Lagerwall  added the comment:
> 
> If it is in a non-standard location, try setting the environment variables:
> 
> LDFLAGS linker flags, e.g. -L if you have libraries in a 
> nonstandard directory 
> CPPFLAGS(Objective) C/C++ preprocessor flags, e.g. -I if you 
> have headers in a nonstandard directory 

I'm pretty sure I've already been doing that, but I'll verify again soon
when I get the chance.

--

___
Python tracker 
<http://bugs.python.org/issue14527>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-08 Thread Paul A.

Paul A.  added the comment:

On Sun, Apr 08, 2012 at 04:16:39PM +, R. David Murray wrote:
> 
> R. David Murray  added the comment:
> 
> Can you clarify?  In what sense has the 2.7.3 rc regressed?

Shouldn't have left that out -- I was referring to the crash in that
other bug I opened.  I don't think that was happening in 2.7.2, but I
should really confirm before spouting off too loudly.

I'm not on that network today, so let me get back to you tomorrow.

--

___
Python tracker 
<http://bugs.python.org/issue14526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-09 Thread Paul A.

New submission from Paul A. :

The following stack trace happened towards the end of a Python-2.7.3rc2 build, 
but I also get much the same results with 2.7.2; one difference I noticed was I 
didn't think I needed to add -DHAVE_USR_INCLUDE_MALLOC_H there.

running build_scripts
creating build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/pydoc -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/idle -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Tools/scripts/2to3 -> 
build/scripts-2.7
copying and adjusting /usr/local/src/Python-2.7.3rc2/Lib/smtpd.py -> 
build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 644 to 755
changing mode of build/scripts-2.7/idle from 644 to 755
changing mode of build/scripts-2.7/2to3 from 644 to 755
changing mode of build/scripts-2.7/smtpd.py from 644 to 755
sh[3]: 1340 Abort(coredump)

(gdb) bt
#0  0xc04395d0:0 in kill+0x30 () from /usr/lib/hpux64/libc.so.1
#1  0xc02e8180:0 in raise+0x120 () from /usr/lib/hpux64/libc.so.1
#2  0xc03f8c50:0 in abort+0x170 () from /usr/lib/hpux64/libc.so.1
#3  0xc00010f0c7f0:0 in free (mem=0x600053d0)
at /usr/local/src/Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c:4288
#4  0xc0bfcde0:0 in _UNW_free_mpool()+0xc0 ()
   from /usr/lib/hpux64/libunwind.so.1
#5  0xc004cb50:0 in EM_mark_BOS+0x50 () from /usr/lib/hpux64/dld.so

--
components: ctypes
messages: 157928
nosy: pda
priority: normal
severity: normal
status: open
title: Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31
type: crash
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue14540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-09 Thread Paul A.

Paul A.  added the comment:

Apparently my memory was faulty the other day... 2.7.2 does crash the same way 
as Python-2.7.3rc2 on this box.  I opened a new bug report for that, so will 
close this one. I'll also sign up for core-mentorship as you suggest, and see 
what I can do to help.

--
resolution:  -> postponed
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue14526>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14524] Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H

2012-04-09 Thread Paul A.

Paul A.  added the comment:

Will close this -- I'll try to help improve configure as I can get time.

--
resolution:  -> postponed
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue14524>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14527] How to link with an external libffi?

2012-04-09 Thread Paul A.

Paul A.  added the comment:

Yes, I think my libffi setup is okay, but python apparently doesn't (according 
to the deeper-down log files I didn't initially know about).  The following is 
a suspicious-looking snippet from 
build/temp.hp-ux-B.11.31-ia64-2.7/libffi/config.log... I have to question the 
usefulness of that linker error message.  My immediate thought is that maybe 
conftstm.o is a 32-bit object file, but I don't see anything earlier in the log 
to indicate it was even created.

configure:6159: gcc463 -o conftest  -I. -IInclude -I./Include  
-D_TERMIOS_INCLUDED  -I/usr/local/lp64/include -mlp64 
-L/usr/local/src/Python-2.7.2 -L/usr/local/lp64/lib conftest.c conftstm.o >&5
ld: Mismatched Data ABI. Expected EF_IA_64_ABI64 but found None in file 
conftstm.o
Fatal error.

--
components: +ctypes

___
Python tracker 
<http://bugs.python.org/issue14527>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-10 Thread Paul A.

Paul A.  added the comment:

I'd be more than happy to use my own installation of libffi instead, but it 
seems the --with-system-ffi configure flag doesn't work.  I've also opened a 
different bug for that.

--

___
Python tracker 
<http://bugs.python.org/issue14540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14527] How to link with an external libffi?

2012-04-10 Thread Paul A.

Paul A.  added the comment:

While this is no solution by any means, I think it'd be better for the scenario 
to be a fatal configure error.  After all, if I say --with-system-ffi, it means 
I really, really want want to use my own libffi.

--

___
Python tracker 
<http://bugs.python.org/issue14527>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-11 Thread Paul A.

Paul A.  added the comment:

Yes indeed, sorry for not answering that question the first time.
The trace is complete, and is from python... although most of it is really in 
the shared lib rather than the executable.

--

___
Python tracker 
<http://bugs.python.org/issue14540>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26415] Excessive peak memory consumption by the Python parser

2017-07-24 Thread A. Skrobov

A. Skrobov added the comment:

To bump this year-old issue, I have delivered a talk at EuroPython 2017, 
explaining what my patch does, how it does what it does, and why it's a good 
thing to do.

You can watch my talk at https://www.youtube.com/watch?v=dyRDmcsTwhE&t=1h52m38s

--

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



[issue26415] Excessive peak memory consumption by the Python parser

2018-12-06 Thread A. Skrobov


A. Skrobov  added the comment:

@Serhiy: incredibly, this patch from 2.5 years ago required very minor changes 
to apply to the latest master. Shows how ossified the parser is :-)

Now posted as https://github.com/python/cpython/pull/10995

--

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



[issue26415] Excessive peak memory consumption by the Python parser

2018-12-14 Thread A. Skrobov


A. Skrobov  added the comment:

I've run pyperformance (0.7.0) with my updated patch, and posted results at the 
PR page. They look encouraging enough.

--

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



[issue11776] Constructor signatures missing in types module documentation

2019-02-24 Thread Tz a


Change by Tz a :


--
nosy: +Tz a

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



[issue36256] parser module fails on legal input

2019-03-10 Thread A. Skrobov


New submission from A. Skrobov :

Under #26526, I had optimised the validation code in parser module to use the 
actual parser DFAs, but my code considers only the token types in the input, 
and doesn't distinguish between different NAMEs (e.g. different keywords).

The result is this:

Python 3.7.0 (default, Aug 22 2018, 20:50:05) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import parser
>>> parser.sequence2st(parser.suite("if True:\n pass\nelse:\n pass").totuple())
Traceback (most recent call last):
  File "", line 1, in 
parser.ParserError: Expected node type 305, got 11.

The fix for this bug is quite simple, and in fact, it had been languishing for 
2.5 years under #26415

I can easily enough extract the fix into a PR of its own, but the bigger 
question is: parser module had been advised against using since Python 2.5; now 
that it has been broken for 2.5 years, nobody even noticed. (if-else must be 
quite a common code construct, so anybody trying to use the module would have 
noticed!) So, should perhaps the module be discontinued rather than fixed?

--
components: Extension Modules
messages: 337619
nosy: A. Skrobov, benjamin.peterson, berker.peksag, brett.cannon, fdrake, 
giampaolo.rodola, gregory.p.smith, pablogsal, python-dev, serhiy.storchaka, 
xcombelle
priority: normal
severity: normal
status: open
title: parser module fails on legal input
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue36256] parser module fails on legal input

2019-03-11 Thread A. Skrobov


A. Skrobov  added the comment:

> The major problem with the parser module is that is unsynchronized with the 
> actual parser

The parser module is "sort of" synchronised with the actual parser, in that it 
uses the same _PyParser_Grammar; this doesn't mean they always behave the same, 
as this bug shows :-)

(But before #26526, it used to be much worse, with the parser module having a 
completely independent re-implementation of the parser.)

> As a side note, the problem described in this bug was more or less foreseen. 
> This is in the header of Modules/parsemodule.c:

Just to clarify, the bug is not about the cryptic exception message, it's about 
the exception firing when it shouldn't.

--

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


Change by A. Skrobov :


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

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


New submission from A. Skrobov :

Seeing that the implicit resolution at #36256 was to keep the parser module in 
place, may I suggest that the diagnostics it produces be improved, so that 
instead of "Expected node type 305, got 11", it would raise "Expected 
namedexpr_test, got COLON"

--
components: Extension Modules
messages: 338897
nosy: A. Skrobov, benjamin.peterson, berker.peksag, brett.cannon, fdrake, 
gregory.p.smith, pablogsal, python-dev, serhiy.storchaka, xcombelle
priority: normal
severity: normal
status: open
title: more helpful diagnostics for parser module
type: enhancement
versions: Python 3.9

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



[issue36440] more helpful diagnostics for parser module

2019-03-26 Thread A. Skrobov


A. Skrobov  added the comment:

> Nothing was really "decided", just that meanwhile is better not to ship a 
> broken parser module.

Totally true, but the issue is closed and resolved, meaning that no one will 
ever look at it again.

--

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



[issue36256] parser module fails on legal input

2019-04-05 Thread A. Skrobov


A. Skrobov  added the comment:

Is it intentional that the fix is not backported to 3.6 as well?

--

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



[issue18036] "How do I create a .pyc file?" FAQ entry is out of date

2013-07-16 Thread A Kaptur

A Kaptur added the comment:

Here is a suggestion for updated documentation in this section. I've added the 
description of __pycache__, included a very short description of what a .pyc 
file is, and moved the troubleshooting to the end of the section.  I'm not sure 
whether the description ("a byte code cache file") is desirable here, but my 
sense is that people asking how to generate .pyc files are generally confused 
beginners.

--
keywords: +patch
nosy: +akaptur
Added file: http://bugs.python.org/file30943/better_pyc_doc_akaptur.patch

___
Python tracker 
<http://bugs.python.org/issue18036>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-20 Thread A Hettinger

A Hettinger added the comment:

There was a request on the python-dev to check this on windows 8.
I confirm the same behavior.

Windows 8.1 Pro 64bit
Python 3.4.0 32bit (release)

Installed current user:
Does not show up in Add/Remove Programs
Installer correctly sees installation and can remove it
"wmic product" correctly sees installation

--
nosy: +oninoshiko

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



[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger

Changes by A Hettinger :


Added file: http://bugs.python.org/file34623/Client.py

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



[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger

Changes by A Hettinger :


Added file: http://bugs.python.org/file34624/Server.py

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



[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger

Changes by A Hettinger :


Added file: http://bugs.python.org/file34625/cert.pem

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



[issue20469] ssl.getpeercert() should include extensions

2014-03-25 Thread A Hettinger

A Hettinger added the comment:

The specific thing I'm interested in is the custom extension 
"1.3.6.1.4.43167.0.0", but all of the X509 data should be imported.

Client shows both the openssl and python outputs. I would expect anything the 
ssl system doesn't explicitly know what to do with, it makes available to me.

--

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-14 Thread A Kaptur

A Kaptur added the comment:

This patch adds tests demonstrating broken behavior inspect.getsource and 
inspect.getsourcelines of decorators containing lambda functions, and modifies 
inspect.getsourcelines to behave correctly.

We use co_lnotab to extract line numbers on all objects with a code object. 
inspect.getsourcelines can also take a class, which cannot use co_lnotab as 
there is no associated code object.

@ballingt and I paired on this patch.

Some open questions about inspect.getsource not created or addressed by this 
patch:
- Is this a bug that should be patched in previous versions as well?
- the docs for say it can take a traceback. What is the correct behavior here?  
There aren't any tests at the moment. We suggest the line of code that caused 
the traceback, i.e. the line at tb.tb_lineno
-  We added tests of decorated classes. The source of decorated classes does 
not include the decorators, which is different than the usual behavior of 
decorated functions. What is the correct behavior here?
- inspect.getblock and inspect.BlockFinder use the term "block" in a way that 
is inconsistent with its typical use in the interpreter (that is, in ceval.c). 
Should this be renamed? If so, to what? ("chunk"?)

--
keywords: +patch
nosy: +akaptur
stage:  -> patch review
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file34857/issue21217.patch

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-15 Thread A Kaptur

A Kaptur added the comment:

v2 of the patch incorporating the comments at 
http://bugs.python.org/review/21217/

--
Added file: http://bugs.python.org/file34882/issue21217-v2.patch

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-15 Thread A Kaptur

A Kaptur added the comment:

v3 of patch, including misc/news update, docstring for function, and removing 
class decorator tests, since it sounds like those are better handled in 
http://bugs.python.org/issue1764286.

--
Added file: http://bugs.python.org/file34885/issue21217-v3.patch

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



[issue16482] pdb.set_trace() clobbering traceback on error

2012-11-15 Thread A Kaptur

New submission from A Kaptur:

pdb.set_trace() is overwriting the actual traceback when exiting with an error. 
 See minimal recreation here: https://gist.github.com/4079971

--
messages: 175630
nosy: akaptur
priority: normal
severity: normal
status: open
title: pdb.set_trace() clobbering traceback on error
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue16482>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED

2012-11-20 Thread Paul A.

Paul A. added the comment:

On Sun, Nov 18, 2012 at 08:01:39PM +, Terry J. Reedy wrote:
> I should have added 'please try compiling 3.x to make sure it has the same 
> problem' since configure might behave differently.

I'm fairly sure I did, that was quite a few months ago, so my memory
could be faulty.  I did eventually get both of 2.6.7 and 2.7.3 built,
I really must submit my patches.  I suppose it should go against the
current 2.7 in the repo, correct?

--

___
Python tracker 
<http://bugs.python.org/issue14525>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2014-06-22 Thread Paul A.

Paul A. added the comment:

I believe this problem has been gone since around 2.7.5, so can I close this 
myself?

--
resolution:  -> out of date
status: open -> closed

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



[issue22008] Symtable's syntax warning should contain the word "because"

2014-07-18 Thread A Kaptur

New submission from A Kaptur:

The symbol table's syntax error about unqualified exec is missing the word 
"because".

>>> def foo():
... exec "a = 1"
... def bar():
... print a
... 
  File "", line 2
SyntaxError: unqualified exec is not allowed in function 'foo' it contains a 
nested function with free variables

--
assignee: docs@python
components: Documentation
files: issue.patch
keywords: patch
messages: 223447
nosy: akaptur, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Symtable's syntax warning should contain the word "because"
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35992/issue.patch

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



[issue22146] Error message for __build_class__ contains typo

2014-08-05 Thread A Kaptur

New submission from A Kaptur:

One of the error messages for __build_class__ has an extra underscore in the 
middle.

--
files: build_class_typo.patch
keywords: patch
messages: 224874
nosy: akaptur
priority: low
severity: normal
status: open
title: Error message for __build_class__ contains typo
versions: Python 3.4
Added file: http://bugs.python.org/file36272/build_class_typo.patch

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



[issue22272] sqlite3 memory leaks in cursor.execute

2014-08-25 Thread A. Libotean

New submission from A. Libotean:

There are significant memory leaks when multiple insert statements are executed 
with distinct values.

sqlite3 version is 2.6.0

The attached file contains two variants:

* one which uses string interpolation to build the query: this generates severe 
leakeage
* the other one is using parametrized queries and the leakeage is not as bad

I'm assuming that somehow the query string reference is not freed properly.

--
components: Extension Modules
files: leaking.py
messages: 225878
nosy: alibotean, ghaering
priority: normal
severity: normal
status: open
title: sqlite3 memory leaks in cursor.execute
type: resource usage
versions: Python 2.7
Added file: http://bugs.python.org/file36470/leaking.py

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



[issue22272] sqlite3 memory leaks in cursor.execute

2014-08-25 Thread A. Libotean

A. Libotean added the comment:

> I'm not sure that it's a leak because it doesn't depend on the number of 
> queries nor the number of run of the test. It's maybe an internal sqlite 
> cache.

You're right, the "leak" does not increase past ~300 queries executed.

--

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



[issue22272] sqlite3 memory leaks in cursor.execute

2014-08-27 Thread A. Libotean

A. Libotean added the comment:

> Can we close this issue then?

Yes, please. Sorry for the false alarm.

--

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



[issue20136] Logging: StreamHandler does not use OS line separator.

2014-01-06 Thread A. Libotean

New submission from A. Libotean:

The StreamHandler implementation uses hardcoded Unix/Linux line separators. 
This generates inconveniences when running on Windows as the file viewers 
expect DOS line terminators.

I've attached a fix that will use os.linesep as the line terminator thus making 
the log files usable with Windows utilities.

Please revise the fix and consider including it.

--
components: Library (Lib)
files: streamhandler.py
messages: 207416
nosy: alibotean
priority: normal
severity: normal
status: open
title: Logging: StreamHandler does not use OS line separator.
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file33321/streamhandler.py

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



[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.

2014-01-06 Thread A. Libotean

New submission from A. Libotean:

Current implementation of RotatingFileHandler ignores the encoding when 
computing the entry byte length.

I've attached a modified version that will compute the entry lenght in bytes.

--
components: Library (Lib)
files: rotatingfilehandler.py
messages: 207417
nosy: alibotean
priority: normal
severity: normal
status: open
title: Logging: RotatingFileHandler computes string length instead of byte 
representation length.
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file33322/rotatingfilehandler.py

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



[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.

2014-01-13 Thread A. Libotean

A. Libotean added the comment:

Sure, will come back shortly with a patch.

--

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



[issue20136] Logging: StreamHandler does not use OS line separator.

2014-01-13 Thread A. Libotean

A. Libotean added the comment:

Let me write also a test for this and come back with a reply.

--

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



[issue20469] ssl.getpeercert() should include extensions

2014-01-31 Thread A Hettinger

New submission from A Hettinger:

I have crafted an ssl cert which contains a custom extension, when I check the 
cert using OpenSSL on the commandline, I clearly see the extension, but when I 
have the server try to pprint.pprint(s.getpeercert()), I do not see these 
fields.

Overall, I think it would be helpful to include extensions in 
ssl.getpeercert()'s returned list, but if there is a workaround for this 
(probably rare) issue, I would appreciate it.

(I have only tested 3.4, not head)

--
components: Extension Modules
messages: 209850
nosy: oninoshiko
priority: normal
severity: normal
status: open
title: ssl.getpeercert() should include extensions
versions: Python 3.4

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



[issue20469] ssl.getpeercert() should include extensions

2014-01-31 Thread A Hettinger

Changes by A Hettinger :


--
type:  -> enhancement

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



[issue20136] Logging: StreamHandler does not use OS line separator.

2014-02-05 Thread A. Libotean

A. Libotean added the comment:

You can go ahead and close this.

I ran some tests and concluded that indeed the IO system will take care of the 
line separators.

Sorry to have wasted your time.

--

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



[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.

2014-02-05 Thread A. Libotean

A. Libotean added the comment:

> Which encoding are you using, such that the difference in length between 
> encoded and decoded messages is significant?

I agree right off the bat that the error in size is not significant. Only the 
length of the last appended line is computed erroneously.

I'm uploading the patch in case you decide to apply it.

Thanks.

--

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



[issue7135] AttributeError: 'module' object has no attribute 'HTTPSConnection'

2009-10-14 Thread A Welch

Changes by A Welch :


--
type:  -> behavior

___
Python tracker 
<http://bugs.python.org/issue7135>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7135] AttributeError: 'module' object has no attribute 'HTTPSConnection'

2009-10-14 Thread A Welch

A Welch  added the comment:

Thank you for your response and my apologies for posting this in the 
incorrect support forum.  I thought that this forum was for all the 
various versions of Python.

--

___
Python tracker 
<http://bugs.python.org/issue7135>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA

2017-01-25 Thread A. Skrobov

A. Skrobov added the comment:

Oh btw, the comment in the beginning of Grammar/Grammar

> # Note:  Changing the grammar specified in this file will most likely
> #require corresponding changes in the parser module
> #(../Modules/parsermodule.c).

is no longer true: after this patch went in, changing the grammar no longer 
requires translating the changes into Modules/parsermodule.c

Can somebody please remove the obsolete comment from there?

--

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



[issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA

2016-05-31 Thread A. Skrobov

A. Skrobov added the comment:

Thank you Fred for your review!

I don't have commit access myself; can anybody please commit it for me?

--

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



[issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA

2016-05-31 Thread A. Skrobov

Changes by A. Skrobov :


--
keywords: +patch
Added file: http://bugs.python.org/file43069/issue26526_16704_63395.diff

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-06-06 Thread A. Skrobov

A. Skrobov added the comment:

Now that #26526 landed (thanks to everybody involved!), I'm requesting a review 
on an updated version of my patch, which addresses the excessive memory 
consumption by the parser.

The description of my original patch still applies:

> The attached patch for the parser reduces "Maximum resident set size 
> (kbytes)" threefold, for the degenerate example of 'import ast; 
> ast.parse("0,"*100, mode="eval")', by eliminating many CST nodes that 
> have a single child.
>
> According to the comment in Parser/node.c -- "89% of PyObject_REALLOC calls 
> in PyNode_AddChild passed 1 for the size" -- the memory saving should be 
> generally applicable, and not limited just to this degenerate case.

> I've now tried it with "perf.py -r -m", and the memory savings are as follows:
> ...
> on these benchmarks, the saving is not threefold, of course; but still quite 
> substantial (up to 30%).

My new patch updates Modules/parsermodule.c to accept such "compressed" nodes, 
so that everything still builds cleanly and passes the tests.

--
nosy: +benjamin.peterson, berker.peksag, brett.cannon, fdrake, giampaolo.rodola
Added file: http://bugs.python.org/file43261/patch

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-06-07 Thread A. Skrobov

A. Skrobov added the comment:

An arena might help reclaim the memory once the parsing is complete, but it 
wouldn't reduce the peak memory consumption by the parser, and so it wouldn't 
prevent a MemoryError when parsing a 35MB source on a PC with 2GB of RAM.

--

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-06-07 Thread A. Skrobov

A. Skrobov added the comment:

My current patch avoids the memory peak *and* doesn't add any memory 
fragmentation on top of whatever is already there.

In other words, it makes the parser better in this one aspect, and it doesn't 
make it worse in any aspect.

--

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



[issue26415] Excessive peak memory consumption by the Python parser

2016-06-07 Thread A. Skrobov

A. Skrobov added the comment:

(Updating the issue title, to avoid confusion between two orthogonal concerns)

--
title: Fragmentation of the heap memory in the Python parser -> Excessive peak 
memory consumption by the Python parser

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



[issue26415] Excessive peak memory consumption by the Python parser

2016-07-08 Thread A. Skrobov

A. Skrobov added the comment:

Fixing whitespace in the patch, and including an update for the docs

--
Added file: http://bugs.python.org/file43664/patch

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



[issue26415] Excessive peak memory consumption by the Python parser

2016-07-08 Thread A. Skrobov

Changes by A. Skrobov :


Added file: http://bugs.python.org/file43665/devguide_patch

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



[issue25571] Improve the lltrace feature with the Py_Debug mode

2016-08-03 Thread A Kaptur

Changes by A Kaptur :


--
nosy: +akaptur

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



[issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA

2016-08-15 Thread A. Skrobov

A. Skrobov added the comment:

Thanks Xavier! Yes, this is the same DFA that's used by the main Python parser. 
For some reason, parsermodule didn't previously reuse it, but instead did its 
own thing.

Any volunteers to review the other patch for Python parser, at 
http://bugs.python.org/issue26415 ?

--

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



[issue26415] Excessive peak memory consumption by the Python parser

2016-08-15 Thread A. Skrobov

A. Skrobov added the comment:

Xavier, the big picture description of my patch is in 
http://bugs.python.org/file43665/devguide_patch

The heap fragmentation was observed by Victor, not by myself.

Victor, could you please create a new ticket for your python_memleak.py 
reproducer?

--

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-03 Thread A Kaptur

A Kaptur added the comment:

It looks like there's a related bug in call_args around __ne__:

>>> m = Mock()
>>> m(1,2)

>>> m.call_args
call(1, 2)
>>> m.call_args == call(1,2)
True
>>> m.call_args != call(1,2)
True

Any reason not to define __ne__ as not __eq__? Otherwise it looks like you fall 
back to tuple.__ne__, which does the wrong thing here.

--
nosy: +akaptur

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-03 Thread A Kaptur

A Kaptur added the comment:

Here's a simple patch + test for the original bug. I'll file the __ne__ 
question separately.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file40348/issue24857.patch

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



[issue24997] mock.call_args compares as equal and not equal

2015-09-03 Thread A Kaptur

New submission from A Kaptur:

mock.call_args can be both equal to and not equal to another object:

>>> m = Mock()
>>> m(1,2)

>>> m.call_args
call(1, 2)
>>> m.call_args == call(1,2)
True
>>> m.call_args != call(1,2)
True

This appears to be a recent regression - it repros on trunk, but not on 3.3 or 
2.7 with mock 1.3.0.

--
components: Library (Lib)
messages: 249715
nosy: akaptur
priority: normal
severity: normal
stage: needs patch
status: open
title: mock.call_args compares as equal and not equal
type: behavior
versions: Python 3.5, Python 3.6

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread A. Skrobov

New submission from A. Skrobov:

Python 2.7.3 (default, Dec 18 2014, 19:10:20) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from argparse import ArgumentParser
>>> parser = ArgumentParser()
>>> parser.add_argument("--foo", help="foo", action='store_const')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/argparse.py", line 1281, in add_argument
action = action_class(**kwargs)
TypeError: __init__() takes at least 4 arguments (4 given)
>>> 



First, the exception message is entirely unhelpful (you wanted at least 4, you 
got 4, what's your problem?)

Second, adding "const=None" to the invocation makes it succeed; but,  according 
to https://docs.python.org/2/library/argparse.html#const this argument defaults 
to "None", so it shouldn't be necessary to specify it explicitly. Thus, either 
the documentation or the implementation is wrong.

--
assignee: docs@python
components: Documentation, Extension Modules
messages: 252106
nosy: A. Skrobov, docs@python
priority: normal
severity: normal
status: open
title: TypeError: __init__() takes at least 4 arguments (4 given)
type: behavior
versions: Python 2.7

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread A. Skrobov

A. Skrobov added the comment:

Thank you for confirming that the mismatch between the documentation and the 
behaviour is preserved in Python 3!

Adding it to the list of affected versions.

--
versions: +Python 3.5

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-22 Thread A. Skrobov

New submission from A. Skrobov:

I have a one-line module that assigns a tuple->int dictionary:

holo_table = {(0, 0, 0, 0, 0, 0, 1, 41, 61, 66, 89): 9, (0, 0, 0, 70, 88, 98, 
103, 131, 147, 119, 93): 4, [35MB skipped], (932, 643, 499, 286, 326, 338, 279, 
200, 280, 262, 115): 5}

When I try to import this module, Python grinds 100% of my CPU for like half an 
hour, then ultimately crashes with a MemoryError.

How much memory does it need to parse 35MB of data, of a rather simple 
structure?

Attaching the module, zipped to 10MB.

--
components: Interpreter Core
files: crash.zip
messages: 260704
nosy: A. Skrobov
priority: normal
severity: normal
status: open
title: Out of memory, trying to parse a 35MB dict
type: resource usage
versions: Python 2.7
Added file: http://bugs.python.org/file42011/crash.zip

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-24 Thread A. Skrobov

A. Skrobov added the comment:

A practical note: if, instead of importing crash.py, I do a json.loads, with a 
few extra transformations:

with open("crash.py") as f: holo_table={tuple(int(z) for z in k.split(', ')):v 
for k,v in 
json.loads(f.readlines()[0][13:].replace('(','"').replace(')','"')).iteritems()}

--the whole data structure loads in a jiffy.

Makes me wonder why this roundabout approach is so much more efficient than the 
native parsing.

--

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-25 Thread A. Skrobov

A. Skrobov added the comment:

Mine is on Windows. I've now installed both 2.7.10 and 3.4.3 to reconfirm, and 
it's still the same, on both of them, except that on 3.4.3 it crashes with a 
MemoryError much faster (within a couple minutes).

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.4

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-25 Thread A. Skrobov

A. Skrobov added the comment:

My Python is 64-bit, but my computer only has 2GB physical RAM.

--

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-02-25 Thread A. Skrobov

A. Skrobov added the comment:

Yes, I understand that this is a matter of memory consumption, which is why I 
submitted this ticket as "resource usage".
What I don't understand is, what could possibly require gigabytes of memory for 
this task?

--

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



[issue26415] Out of memory, trying to parse a 35MB dict

2016-03-08 Thread A. Skrobov

A. Skrobov added the comment:

OK, I've now looked into it with a fresh build of 3.6 trunk on Linux x64.

Peak memory usage is about 3KB per node:

$ /usr/bin/time -v ./python -c 'import ast; ast.parse("0,"*100, 
mode="eval")'
Command being timed: "./python -c import ast; ast.parse("0,"*100, 
mode="eval")"
...
Maximum resident set size (kbytes): 3015552
...


Out of the 2945 MB total peak memory usage, only 330 MB are attributable to the 
heap use:

$ valgrind ./python -c 'import ast; ast.parse("0,"*100, mode="eval")'
==21232== ...
==21232== HEAP SUMMARY:
==21232== in use at exit: 3,480,447 bytes in 266 blocks
==21232==   total heap usage: 1,010,171 allocs, 1,009,905 frees, 348,600,304 
bytes allocated
==21232== ...


So, apparently, it's not the nodes themselves taking up a disproportionate 
amount of memory -- it's the heap getting so badly fragmented that 89% of its 
memory allocation is wasted.

gprof confirms that there are lots of mallocs/reallocs going on, up to 21 per 
node:

$ gprof python
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self  self total   
 time   seconds   secondscalls   s/call   s/call  name
 17.82  0.31 0.31  220 0.00 0.00  PyParser_AddToken
 13.79  0.55 0.242 0.12 0.16  freechildren
 12.64  0.77 0.22 21039125 0.00 0.00  _PyMem_RawMalloc
  6.32  0.88 0.11 17000101 0.00 0.00  PyNode_AddChild
  5.75  0.98 0.10 28379846 0.00 0.00  visit_decref
  5.75  1.08 0.10  104 0.00 0.00  ast_for_expr
  4.60  1.16 0.08 2867 0.00 0.00  collect
  4.02  1.23 0.07 20023405 0.00 0.00  _PyObject_Free
  2.30  1.27 0.04  3031305 0.00 0.00  _PyType_Lookup
  2.30  1.31 0.04  3002234 0.00 0.00  
_PyObject_GenericSetAttrWithDict
  2.30  1.35 0.041 0.04 0.05  ast2obj_expr
  1.72  1.38 0.03 28366858 0.00 0.00  visit_reachable
  1.72  1.41 0.03 12000510 0.00 0.00  subtype_traverse
  1.72  1.44 0.03 3644 0.00 0.00  list_traverse
  1.44  1.47 0.03  3002161 0.00 0.00  _PyObjectDict_SetItem
  1.15  1.49 0.02 20022785 0.00 0.00  PyObject_Free
  1.15  1.51 0.02 15000763 0.00 0.00  _PyObject_Realloc


So, I suppose what needs to be done is to try reducing the number of reallocs 
involved in handling an AST node; the representation of the nodes themselves 
doesn't need to change.

--

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-03-08 Thread A. Skrobov

A. Skrobov added the comment:

@Serhiy: if your build is 32-bit, then every node is half the size, as it 
mostly consists of pointers.

The amount of heap fragmentation can also depend on gcc/glibc version.

--

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



  1   2   3   4   5   6   7   8   9   10   >