[issue17239] XML vulnerabilities in Python

2015-05-24 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17239 ___ ___

[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2015-05-24 Thread Jackmoo
Jackmoo added the comment: Hi there, recently I also encounter this in windows(7), and my python program occasionally crash and the windows pops 'appcrash' message with tcl8.5.dll error c05 (access violation). And this end up related to thread safe problem described as above. Since in my

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Changes by Tal Einat talei...@gmail.com: -- nosy: +mark.dickinson, rhettinger, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24270 ___

[issue14373] C implementation of functools.lru_cache

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is in property descriptor getter. It uses cached tuple for args and can unexpectedly modify it. Opened issue24276 for fixing this bug. Another way is to remove fast path in lru_cache_make_key() and always copy args tuple. -- Added file:

[issue24277] Take the new email package features out of provisional status

2015-05-24 Thread R. David Murray
New submission from R. David Murray: I plan to remove the provisional status of the new email features in 3.5. This is a documentation only change, but the documentation change is extensive (pretty much a complete rewrite of the package docs). -- assignee: r.david.murray components:

[issue18459] readline: libedit support on non-apple platforms

2015-05-24 Thread Martin Panter
Martin Panter added the comment: There was already a potential patch in Issue 13501. -- nosy: +vadmium resolution: - duplicate superseder: - Make libedit support more generic; port readline / libedit to FreeBSD ___ Python tracker

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2015-05-24 Thread Martin Panter
Martin Panter added the comment: Garrett Cooper: If you are still around, you might want to review the following three changes in this new patch. I suspect they were mistakes in your version, but I cannot be 100 percent sure. * Restoring length - 1 subtraction in call_readline() at line 1239

[issue18459] readline: libedit support on non-apple platforms

2015-05-24 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18459 ___

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Affect on performance: $ ./python -m timeit -r 11 -s from collections import namedtuple as n;a = n('n', 'a b c')(1, 2, 3) Unpatched: 1000 loops, best of 11: 0.0567 usec per loop Patched : 1000 loops, best of 11: 0.0567 usec per loop --

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Stefan Behnel
Stefan Behnel added the comment: Eventually, I think a corresponding function should be added to cmath. math.isclose() shouldn't deal with complex values by itself (other than rejecting them as non-floatish input). -- ___ Python tracker

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: Attached is a patch based on Chris Barker's implementation on github[1]. This includes only the C implementation, as well as tests, documentation and entries in NEWS and whatsnew. I had to keep the (PyCFunction) cast in the module method list in

[issue23965] test_ssl failure on Fedora 22

2015-05-24 Thread Mark Daoust
Mark Daoust added the comment: I think I might have found a related/real world example. I'm on a mac with OSX-10.10.3 and test_ssl passes, but when I try to install jupyter_notebook it attempts to download some css, and gives what looks like an identical error to the first one, in the initial

[issue23910] property_descr_get reuse argument tuple

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This patch caused crash with C implementation of lru_cache (issue14373). Opened issue24276 for fixing this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23910

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Property descriptor getter uses cached tuple for args (issue23910). This can cause problems when called function use args after reading other property or save args. For now I know only one example - clru_cache_3.patch in issue14373. Proposed patch use

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Stefan Behnel
Stefan Behnel added the comment: The cast is correct and required (the actual signature is determined by the METH_* flags). Patch LGTM, FWIW. -- components: +Library (Lib) nosy: +scoder type: - enhancement ___ Python tracker rep...@bugs.python.org

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: I have a question regarding complex values. The code (from Chris Barker) doesn't support complex values (only things that can be converted into doubles). However, the PEP states the following under Non-float types: complex : for complex, the absolute value of the

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: I'm now working this into a patch against current default. -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24270 ___

[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2015-05-24 Thread Martin Panter
Martin Panter added the comment: I suspect this is actually a bug with Gnu Readline. The same issue exists in GDB. When a signal handler (such as SIGINT) raises an exception to abort the input, Python calls rl_free_line_state(). The documentation for that function,

[issue14373] C implementation of functools.lru_cache

2015-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Correct reuse argument tuple in property descriptor ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___

[issue11029] Crash, 2.7.1, Tkinter and threads and line drawing

2015-05-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks for the report. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11029 ___ ___ Python-bugs-list mailing

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: LGTM, go ahead and apply. -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24276 ___

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, it was incorrect microbenchmark. Correct is: $ ./python -m timeit -r 11 -s from collections import namedtuple as n;a = n('n', 'a b c')(1, 2, 3) -- a.a 3.4 : 100 loops, best of 11: 0.601 usec per loop 3.5 unpatched: 100 loops, best of

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-24 Thread Andrew Svetlov
Andrew Svetlov added the comment: Would you propose a patch for docs? -- nosy: +asvetlov stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24278 ___

[issue24272] PEP 484 docs

2015-05-24 Thread Daniel Andrade Groppe
Daniel Andrade Groppe added the comment: A first iteration of the documentation based on the PEP and the module source. This still needs a lot of work. -- keywords: +patch nosy: +Daniel.Andrade.Groppe Added file: http://bugs.python.org/file39484/typing_doc.patch

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-24 Thread Martin Blais
Martin Blais added the comment: I don't think I'm the right person to propose a patch for this; I'm just guessing how it works so far, I haven't had time to look into the source code in detail, I'm sure there's a lot more context to it. -- ___

[issue24260] TabError behavior doesn't match documentation

2015-05-24 Thread R. David Murray
R. David Murray added the comment: We should probably just introduce a new error mode (-ttt?) that makes it an error to use tabs at all for semantic indentation. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5dbf3d932a59 by Serhiy Storchaka in branch 'default': Issue #24276: Fixed optimization of property descriptor getter. https://hg.python.org/cpython/rev/5dbf3d932a59 -- ___ Python tracker

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-24 Thread Martin Blais
New submission from Martin Blais: Functions that parse arguments like PyArg_ParseTupleAndKeywords() have several formatters that fill in C strings, e.g. s. In the C API doc: https://docs.python.org/3.5/c-api/arg.html#c.PyArg_ParseTupleAndKeywords There should be an explicit mention of

[issue24260] TabError behavior doesn't match documentation

2015-05-24 Thread Evgeny Kapun
Evgeny Kapun added the comment: Prohibiting tabs after spaces is not enough. For example, Python rejects this code: if 1: spaceif 1: tabpass because its indentation is invalid if tab width is 1. However, it accepts this code: if 1: tabif 1: 10 spacespass despite its

[issue23903] Generate PC/python3.def by scraping headers

2015-05-24 Thread Zachary Ware
Zachary Ware added the comment: What about including this in Tools/scripts/patchcheck.py? I think that might strike a good enough balance between making changes noticeable and not automatically changing the def file. As far as all the differences this has uncovered, I'll try to make a patch

[issue23903] Generate PC/python3.def by scraping headers

2015-05-24 Thread Steve Dower
Steve Dower added the comment: Could the latter break people already using the stable ABI on other platforms? Does it even work for others? I don't know what the equivalent of python3.dll would be. If it doesn't exist outside of Windows, then assuming that everything not in python3.def isn't

[issue14373] C implementation of functools.lru_cache

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Backed out the backout in cb30db9cc029. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14373 ___ ___

[issue24279] Update test_base64 to use test.support.script_helper

2015-05-24 Thread Christie
New submission from Christie: As described in Issue9517, many test modules do not make use of the helpers in script_helpers.py to invoke the python interpreter in a subprocess. Issue9517 will be broken down into several smaller issues so we can address smaller change sets. This issue is to

[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-24 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Hi, Since the last few patches related to this, I seem to have an issue with `Python/importdl.c:get_encoded_name` (I guess) sometime returning the name with a leading dot. This lead to `PyInit_.modulename` being searched which fails. My C-foo is

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24276 ___

[issue23965] test_ssl failure on Fedora 22

2015-05-24 Thread Ned Deily
Ned Deily added the comment: (@suki, I assume this is the issue reported here: https://github.com/jupyter/notebook/issues/111 ?) -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23965

[issue16991] Add OrderedDict written in C

2015-05-24 Thread Matthew Barnett
Matthew Barnett added the comment: First some background: when you put a new entry into a dict, it looks for an empty slot, the key's hash determining the initial choice, but if that slot's occupied, it picks another, etc, so the key might not be in the slot of first choice. In

[issue9517] Make test.script_helper more comprehensive, and use it in the test suite

2015-05-24 Thread Christie
Christie added the comment: Created Issue24279 for updating test_base64. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9517 ___ ___

[issue24279] Update test_base64 to use test.support.script_helper

2015-05-24 Thread Christie
Christie added the comment: Updated TestMain in test_base64 to use test.support.script_helpers. Split `test_encode_file` into two tests. -- keywords: +patch Added file: http://bugs.python.org/file39485/issue24279_base64.patch ___ Python tracker

[issue24280] Unable to install Python

2015-05-24 Thread Jeff Ding
New submission from Jeff Ding: After uninstalling old versions of Python: Python is unable to install unless I disable pip. Once python installs, python immediately crashes due to Py_Initialize -- components: Windows files: python_crash.png messages: 244003 nosy: Jeff77789,

[issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings

2015-05-24 Thread Martin Panter
Martin Panter added the comment: At the top of the list https://docs.python.org/3.5/c-api/arg.html#strings-and-buffers, it says which cases have to be freed or not, and also mentions releasing buffers. Are you proposing to add this information to each entry in the list as well? Or just

[issue24260] TabError behavior doesn't match documentation

2015-05-24 Thread Martin Panter
Martin Panter added the comment: I would be in favour of making the existing indentation behaviour more strict by default, or at least outputting some sort of warning for Evgeny’s examples. I.e. no reason to supply a special -ttt option. But prohibiting tabs entirely might not go down well. I

[issue24260] TabError behavior doesn't match documentation

2015-05-24 Thread Mark Lawrence
Mark Lawrence added the comment: So when does Python 3 generate this TabError: inconsistent use of tabs and spaces in indentation and when doesn't it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24260

[issue24281] String formatting: incorrect number of decimal places

2015-05-24 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24281 ___ ___ Python-bugs-list

[issue24281] String formatting: incorrect number of decimal places

2015-05-24 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24281 ___

[issue24272] PEP 484 docs

2015-05-24 Thread Daniel Andrade Groppe
Daniel Andrade Groppe added the comment: Addressing comments from the review. Here is an updated patch. -- Added file: http://bugs.python.org/file39487/typing_doc_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24272

[issue5315] signal handler never gets called

2015-05-24 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Agree with Charles-François's second explanation. This makes it very hard to reliably handle signals -- basically everyone has to remember to use set_wakeup_fd, and most people don't. For example, gunicorn is likely vulnerable to this because it doesn't use

[issue24281] String formatting: incorrect number of decimal places

2015-05-24 Thread Christopher Welborn
Christopher Welborn added the comment: You forgot the 'f' to specify that you want float formatting: ``` '{:08.3f}'.format(12.34) '0012.340' ``` -- nosy: +cjwelborn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24281

[issue24275] lookdict_* give up too soon

2015-05-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: You could have a non-unicode key that compares equal to a unicode string. -- nosy: +benjamin.peterson resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24281] String formatting: incorrect number of decimal places

2015-05-24 Thread James Luscher
New submission from James Luscher: Doc for 3.4: at 6.1.3.1. Format Specification Mini-Language indicates that: The precision is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value Yet I find that I get this behavior: Python 3.4.3

[issue24021] Add docstring to urllib.urlretrieve

2015-05-24 Thread Daniel Andrade Groppe
Daniel Andrade Groppe added the comment: Adding docstrings for urllib.urlretrieve() and urlib.cleanup() for Python 2.7. -- keywords: +patch nosy: +Daniel.Andrade.Groppe Added file: http://bugs.python.org/file39488/urllib_2.7.patch ___ Python tracker

[issue24275] lookdict_* give up too soon

2015-05-24 Thread Dmitry Kazakov
Changes by Dmitry Kazakov jsb...@gmail.com: -- nosy: +vlth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24275 ___ ___ Python-bugs-list mailing

[issue14373] C implementation of functools.lru_cache

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are the recent version of the patch and minimal crash reproducer. -- Added file: http://bugs.python.org/file39478/clru_cache_3.patch Added file: http://bugs.python.org/file39479/clru_cache_crasher.py ___

[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-24 Thread Jacob
Jacob added the comment: Thanks! That does work. I'm concerned there may be unintended or undesired consequences of this. Hope the bug gets fixed, but will use the workaround for now. -- ___ Python tracker rep...@bugs.python.org

[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-24 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - exception error in _scproxy.so ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24273