[issue27619] getopt should strip whitespace from long arguments

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this should just be closed. -- status: open -> pending ___ Python tracker ___ ___ Python-b

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

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I'll write that as "'i == n and n > 0" which reads better and runs faster in > the common case (look at the disassembly of each). issue27236 -- ___ Python tracker ___

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

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28205] Add optional suffix to str.join

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Why can't this go into 3.6? Because it is a new feature and we're already past beta 1; because nothing is actually broken; and because it is a very minor issue (x isn't 100% consistent with y); because this would depend on new code and tests that we haven

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In lxml Element is a factory function, not a class. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28205] Add optional suffix to str.join

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looking again at the comments for the other respondents, I think this should just be closed. It doesn't make sense to disturb a long standing API or the break the join/split symmetry. -- resolution: -> rejected status: open -> closed

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I don't suggest to change lru_cach() implementation just now For now, I would like to have this closed. It doesn't make sense at the current juncture (with the compact being new, being in flux, and not having guaranteed ordering semantics). Also, we sho

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread py.user
py.user added the comment: > I left some comments on the code review. Left an answer on a comment. (ISTM, email notification doesn't work there, I didn't get email.) -- ___ Python tracker _

[issue28244] Incorrect Example in itertools.product description

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The comments in the docs are necessarily terse and communicate the pattern of pairings. It would not be an improvement to actually list out all the tuples. Sorry if this caused you any confusion, but I prefer to leave the comments as they are now. -

[issue21878] wsgi.simple_server's wsgi.input read/readline waits forever in certain circumstances

2016-09-21 Thread Bert JW Regeer
Bert JW Regeer added the comment: This is still very much an issue, and makes it more difficult to write generic python request/response libraries because we can't assume that a read() will return, and relying on the Content-Length being set is not always possible unfortunately. -- no

[issue28245] Embeddable Python does not use PYTHONPATH.

2016-09-21 Thread Jarno Rajala
New submission from Jarno Rajala: The Windows 64-bit embeddable Python 3.5.2 (also 3.5.1), downloadable from https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip, does not set sys.path according to PYTHONPATH. To reproduce this bug, run these commands from the directory with the

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: George's initial patch that naively checks for signals on every iteration could be used to get an upper bound on the likely benchmark impact. I do think this is a case where we'll want a dedicated microbenchmark to complement the macrobenchmark suite, though - R

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2016-09-21 Thread Zachary Ware
Zachary Ware added the comment: This appears to be finished, please reopen if I'm mistaken. -- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue28244] Incorrect Example in itertools.product description

2016-09-21 Thread Matthew Ekstrand-Abueg
New submission from Matthew Ekstrand-Abueg: Documentation states: # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 But: >>> list(itertools.product('ABCD','xy')) [('A', 'x'), ('A', 'y'), ('B', 'x'), ('B', 'y'), ('C', 'x')

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Martin Panter
Martin Panter added the comment: Mostly looks good to me. I left some comments on the code review. -- nosy: +martin.panter versions: +Python 2.7, Python 3.5, Python 3.7 ___ Python tracker __

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I'd suggest to display all values and base the findings on > all available values, rather than just one: > min, max, avg, median, stddev. If we're going to go down that path, I suggest using something like: https://en.wikipedia.org/wiki/Five-number_summary

[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The request is to check 'occasionally'. To me this means perhaps once a second, which is to say, ^c should generally interrupt within a second, and on average with half a second. The following takes just under a second: "sum(i for i in range(1000))" wher

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-09-21 Thread Jim Jewett
Jim Jewett added the comment: Having to (re-)fill the cache once per interpreter seems like a reasonable price to pay. Why is 3.5 not included? Did this not cause problems before the import change, or is it just that this bug is small enough that maybe it isn't worth backporting? --

[issue28228] imghdr does not support pathlib

2016-09-21 Thread Brett Cannon
Brett Cannon added the comment: "Removing the provisional status" of what? Pathlib? If so, have you asked Ned if adding support during the beta period is acceptable? This open question is probably why Serhiy changed the type as without Ned's sign-off it means changing something in the stdlib f

[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-21 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> christian.heimes components: +Extension Modules stage: needs patch -> patch review ___ Python tracker ___ _

[issue28228] imghdr does not support pathlib

2016-09-21 Thread Ethan Furman
New submission from Ethan Furman: Supporting pathlib was one of the requirements of removing the provisional status. Why have you changed the type to enhancement? -- ___ Python tracker ___

[issue26072] pdb fails to access variables closed over

2016-09-21 Thread Jesús Gómez
Jesús Gómez added the comment: Confirming. Another use case is the use any lambda, or function definition inside the scope of a function, for checking conditions in the REPL. Suppose two inner functions named condition1 and condition2, and a parameter X as a Collection: (Pdb) any(condition1(

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, functools.partial.__call__() doesn't use fastcall yet. So compared to Python 3.5, fastcall shouldn't explain a major performance difference. FYI I'm working on an extension of fastcall to also support fastcall calling convention for obj.__call__() ;-) But

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Vedran Čačić
Vedran Čačić added the comment: Why can't this go into 3.6? To me this situation seems like a bug. -- ___ Python tracker ___ ___ Pytho

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: The perf regression can be related to the new fastcall calling convention or the work in ceval.c (new 16-bit regular bytecode, new CALL_FUNCTION bytecodes). -- ___ Python tracker _

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: We had a similar discussion a while back for pybench. Consensus then was to use the minimum as basis for benchmarking: https://mail.python.org/pipermail/python-dev/2006-June/065525.html I had used the average before this discussion in pybench 1.0: https://

[issue28243] Performance regression in functools.partial()

2016-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: There is 10% performance regression in calling functools.partial() in 3.6. $ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' -- 'g(2)' Python 3.5: Median +- std dev: 452 ns +- 25 ns Python 3.6: Median

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Ned Deily
Ned Deily added the comment: The difference is that os.environ is a reference to a mapping object, essentially a dict, that has all of the process environment variables. By using the get('x') method on that object, you ask the object to find and return the value corresponding to key 'x' or to

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-21 Thread Berker Peksag
Berker Peksag added the comment: Instead of duplicating XML() documentation, I'd suggest changing fromstring() documentation to say something like "this is an alias for ElementTree.XML()." -- nosy: +berker.peksag versions: +Python 3.5, Python 3.7 ___

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2016-09-21 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Thanks Christian, much appreciated. Just responded to your review. -- ___ Python tracker ___ ___

[issue28241] Nested fuctions Unexpected behaviour when stored in a list and called after.

2016-09-21 Thread artxyz
artxyz added the comment: I got it now. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Dennis Jensen
Changes by Dennis Jensen : -- status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue25651] Confusing output for TestCase.subTest(0)

2016-09-21 Thread Berker Peksag
Berker Peksag added the comment: Fixed. I lost some time because of this today :) -- nosy: +berker.peksag resolution: -> fixed stage: test needed -> resolved status: open -> closed versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +eli.bendersky, scoder stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I consider this issue as lying on the way to using the orderable of dict in OrderedDict implementation (the latter is very desirable because current OrderedDict implementation can be easily broken by using plain dict API). The main difficulty of implementing

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue25651] Confusing output for TestCase.subTest(0)

2016-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba743894e793 by Berker Peksag in branch '3.5': Issue #25651: Allow falsy values to be used for msg parameter of subTest() https://hg.python.org/cpython/rev/ba743894e793 New changeset ddbf92168a44 by Berker Peksag in branch '3.6': Issue #25651: Merge

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Dennis Jensen
Dennis Jensen added the comment: Okay well thanks for that information but after investigating this then I have to ask what is the difference between: os.environ.get() and os.getenv() As these 2 functions now appear to do exactly the same thing? If this is the case then should there not be

[issue28241] Nested fuctions Unexpected behaviour when stored in a list and called after.

2016-09-21 Thread R. David Murray
R. David Murray added the comment: Note also that your first example worked only because your loop variable was named i. If you used, say, 'j', you'd get the same result as in your second example. This is because the closure is over the named variable, and both in your definition loop and yo

[issue26513] platform.win32_ver() broken in 2.7.11

2016-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 03f2c8fc24ea by Steve Dower in branch '2.7': Issue #26513: Use winver.product_type instead of .product https://hg.python.org/cpython/rev/03f2c8fc24ea -- ___ Python tracker

[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-21 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Ned Deily
Ned Deily added the comment: os.environ is documented as being a "mapping" object. The "get" method is a standard method for all mapping objects; it's not unique to os.environ. Thus, there is no need to specially call out "get" or any of the other "mapping" methods and operations available w

[issue28100] Refactor error messages in symtable.c

2016-09-21 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Here is the patch for 3.6 with requested changes. While playing with this a bit more, I discovered that the error message in this case (if no value is actually assigned): def f(): x: int global x could be misleading. Therefore I changed the order of

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > 2) Add the support of stop and start arguments to range() in 3.7. Yes, the whole point of adding these bogus methods in the first place was to harmonize the range object with other sequence types. -- ___ Pytho

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for poor words. I was not going to blame anybody. But changing interface always is dangerous. It makes third-party classes that implemented the interface no longer valid substitutions. I think two things are worth to be done: 1) Explicitly document (i

[issue28240] Enhance the timeit module

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: >> * Change the default repeat from 3 to 5 to have a better distribution of >> timings. It makes the timeit CLI 66% slower (ex: 1 second instead of 600 >> ms). That's the price of stable benchmarks :-) > > For now default tim

[issue28241] Nested fuctions Unexpected behaviour when stored in a list and called after.

2016-09-21 Thread Zachary Ware
Zachary Ware added the comment: See https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result Note that `lambda: x**2` is equivalent to `def FUN(): return x**2`. -- nosy: +zach.ware resolution: -> not a bug stage:

[issue28242] os.environ.get documentation missing

2016-09-21 Thread Dennis Jensen
New submission from Dennis Jensen: I was encountering what seemed to be odd behavior from os.environ.get() from what I could find out about it and so I tried to locate the actual documentation on how it is supposed to be used now. However, all I can find is a minor reference to os.environ. T

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: @property can be used to define a broken __set_name__ attribute: >>> class BadIdea: ... @property ... def __set_name__(self): ... pass ... >>> class NotGoingToWork: ... attr = BadIdea() ... Traceback (most recent call last): File "", line 1

[issue28240] Enhance the timeit module

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > * Display the average, rather than the minimum, of the timings *and* display > the standard deviation. It should help a little bit to get more reproductible > results. This makes hard to compare results with older Python versions. > * Change the default r

[issue28241] Nested fuctions Unexpected behaviour when stored in a list and called after.

2016-09-21 Thread artxyz
New submission from artxyz: Python 2.7.11 GCC 4.8.4 Getting weird results when define a nested function in a loop and store them in a list x = list() for i in xrange(5): def FUN(): print i x.append(FUN) Calling functions from list using index works fine:

[issue28197] range.index mismatch with documentation

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I'd argue that range can implement the 3-arg .index much better > than generic Sequence. Yes, the range index() method should implement all three arguments. That shouldn't be difficult. -- assignee: docs@python -> type: behavior -> enhancement

[issue28210] argparse with subcommands difference in python 2.7 / 3.5

2016-09-21 Thread Tim Graham
Tim Graham added the comment: Based on the usage output, it looks like the subcommand is required, but I'm not sure if there are cases where a subcommand could be optional. David, can you advise? usage: test_argparse.py [-h] command ... -- nosy: +r.david.murray __

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: To be entirely clear about what's going on, the reference cycle seen in the example arises for *any* module level function, even if it's completely empty: >>> def f(): ... pass ... >>> f.__globals__["f"] is f True The existence of that cycle will then keep

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The problem is that cache hits now create "holes" in the compact dict and trigger periodic compaction. In contrast, the existing code leaves dicts unchanged when there is a cache hit. I prefer the current code. Though it took a little more effort to impl

[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-21 Thread Nick Coghlan
Nick Coghlan added the comment: The most likely relevant difference here is that Python 3.4+ no longer forcibly break cycles through the module globals when the module is deallocated: https://docs.python.org/dev/whatsnew/3.4.html#whatsnew-pep-442 Due to the implicit cycles created between func

[issue28100] Refactor error messages in symtable.c

2016-09-21 Thread Christian Heimes
Christian Heimes added the comment: Please rewrite the patch to use if / else if / else, e.g. if (cur & (DEF_LOCAL | USE | DEF_ANNOT)) { ... if (cur & USE) { msg = GLOBAL_AFTER_USE; } else if (cur & DEF_LOCAL) { msg = GLOBAL_AFTER_ASSIGN; } else { /* DEF_ANNOT *

[issue28240] Enhance the timeit module

2016-09-21 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue28240] Enhance the timeit module

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: > Another point: timeit is often used to compare performance between Python > versions. By changing the behaviour of timeit in a given Python version, > you'll make it more difficult to compare results. Hum, that's a good argument against my change :-) So to

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue28240] Enhance the timeit module

2016-09-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: > * Display the average, rather than the minimum, of the timings *and* > display the standard deviation. It should help a little bit to get > more reproductible results. I'm still not convinced that the average is the right statistic to use here. I cannot co

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Maciej Fijalkowski also sent me the following article a few months ago, it also explains indirectly why using the minimum for benchmarks is not reliable: "Virtual Machine Warmup Blows Hot and Cold" http://arxiv.org/pdf/1602.00602.pdf Even if the article is mor

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another point: timeit is often used to compare performance between Python versions. By changing the behaviour of timeit in a given Python version, you'll make it more difficult to compare results. -- ___ Python trac

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue28205] Add optional suffix to str.join

2016-09-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger components: +Documentation priority: normal -> low ___ Python tracker ___ _

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Display the average, rather than the minimum, of the timings *and* display > the standard deviation. It should help a little bit to get more reproductible > results That entirely depends on which benchmark you are running. > Disabling the GC is not fair: re

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: > * Display the average, rather than the minimum, of the timings *and* display > the standard deviation. It should help a little bit to get more reproductible > results. Rationale: * http://blog.kevmod.com/2016/06/benchmarking-minimum-vs-average/ * https://ha

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: The perf module displays the median rather than the mean (arithmeric average). The difference between median and mean is probably too subtle for most users :-/ The term "median" is also probably unknown by most users... I chose to use average: well known, easy

[issue28240] Enhance the timeit module: display average +- std dev instead of minimum

2016-09-21 Thread STINNER Victor
Changes by STINNER Victor : -- title: Enhance the timeit module: diplay average +- std dev instead of minimum -> Enhance the timeit module: display average +- std dev instead of minimum ___ Python tracker

[issue28240] Enhance the timeit module: diplay average +- std dev instead of minimum

2016-09-21 Thread STINNER Victor
Changes by STINNER Victor : -- title: Enhance the timeit module -> Enhance the timeit module: diplay average +- std dev instead of minimum ___ Python tracker ___ ___

[issue28240] Enhance the timeit module

2016-09-21 Thread STINNER Victor
New submission from STINNER Victor: Attached patch makes different changes to the timeit module: * Display the average, rather than the minimum, of the timings *and* display the standard deviation. It should help a little bit to get more reproductible results. * Change the default repeat from

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file44779/lru_cache-move_to_end.patch ___ Python tracker ___ ___ Python-bugs-

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file44778/lru_cache-pop-set.patch ___ Python tracker ___ ___ Python-bugs-list

[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since dict became ordered, this feature can be used in functools.lru_cache() implementation instead of linked list. This significantly simplifies the code. The first implementation just uses _PyDict_GetItem_KnownHash() + _PyDict_DelItem_KnownHash() + _PyDi

[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-09-21 Thread Fedele Mantuano
Fedele Mantuano added the comment: I developed a library that can get that malformed email part, but to get it I used the not correct type of defect "StartBoundaryNotFoundDefect" (https://github.com/SpamScope/mail-parser/blob/develop/mailparser/__init__.py#L44). With this patch, I could get mal

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now we need other reproducer for an exception. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread Christian Heimes
Christian Heimes added the comment: Perfect :) -- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ _

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread INADA Naoki
INADA Naoki added the comment: OK, I ignored it on Coverity site. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue27010] email library could "recover" from bad mime boundary like (some?) email clients do

2016-09-21 Thread R. David Murray
R. David Murray added the comment: Hmm. Thanks for the links. That[*] implies that "fixing" this would be *introducing* a security vulnerability...unless one was trying to implement a virus/spam scanner in Python. So perhaps this should be controlled by a policy switch. [*] The third of th

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread Christian Heimes
Christian Heimes added the comment: Coverity ignores asserts() because they are not in the final code. If you are sure that 'j' can never be < 0, then I can simply ignore the issue. -- ___ Python tracker _

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread INADA Naoki
INADA Naoki added the comment: Thanks. It seems coverity doesn't understand assert(j >= 0); Can I tell it to coverity from source code? -- ___ Python tracker ___ ___

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a2b8398f045 by Serhiy Storchaka in branch '3.6': Issue #28214: Now __set_name__ is looked up on the class instead of the https://hg.python.org/cpython/rev/1a2b8398f045 New changeset 2a5280db601c by Serhiy Storchaka in branch 'default': Issue #28214

[issue28233] PyUnicode_FromFormatV can leak PyUnicodeWriter

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the report, it should be fixed now. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue27990] Provide a way to enable getrandom on Linux even when build system runs an older kernel

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Ok, I changed the status to WONTFIX. -- resolution: not a bug -> wont fix ___ Python tracker ___ ___

[issue28238] In xml.etree.ElementTree findall() can't search all elements in a namespace

2016-09-21 Thread py.user
New submission from py.user: In the example there are two namespaces in one document, but it is impossible to search all elements only in one namespace: >>> import xml.etree.ElementTree as etree >>> >>> s = 'http://def"; xmlns:x="http://x";>' >>> >>> root = etree.fromstring(s) >>> >>> root.find

[issue28233] PyUnicode_FromFormatV can leak PyUnicodeWriter

2016-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 00f090563f1b by Victor Stinner in branch '3.5': Fix PyUnicode_FromFormatV() error handling https://hg.python.org/cpython/rev/00f090563f1b -- nosy: +python-dev ___ Python tracker

[issue28237] In xml.etree.ElementTree bytes tag or attributes raises on serialization

2016-09-21 Thread py.user
New submission from py.user: https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element "The element name, attribute names, and attribute values can be either bytestrings or Unicode strings." The element name, attribute names, and attribute values can have bytes

[issue28042] Coverity Scan defects in new dict code

2016-09-21 Thread Christian Heimes
Christian Heimes added the comment: The warnings are false positives. Coverity does not understand the relationship between dict size and union members. I have closed all issues related to DK_ENTRIES(). There is still one issue left that seems worth looking into: 15. negative_return_fn: Funct

[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2016-09-21 Thread py.user
New submission from py.user: It is possible to create and serialize an Element instance with empty string tag value: >>> import xml.etree.ElementTree as etree >>> >>> root = etree.Element('') >>> elem = etree.SubElement(root, '') >>> >>> root >>> elem >>> >>> etree.tostring(root) b'<>< />' >>

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-21 Thread py.user
New submission from py.user: https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.fromstring The function has argument parser that works like in XML() function, but in the description there is no info about it (copied from XML() description). Applied a patch to th

[issue27990] Provide a way to enable getrandom on Linux even when build system runs an older kernel

2016-09-21 Thread Petr Viktorin
Petr Viktorin added the comment: (Please ignore that comment – I was on vacation and, when clearing my backlog, got to this issue before the Fedora discussions.) -- ___ Python tracker _

[issue27990] Provide a way to enable getrandom on Linux even when build system runs an older kernel

2016-09-21 Thread Petr Viktorin
Petr Viktorin added the comment: Indeed, I'd close WONTFIX. IMO, applications that: - run at early boot, and - get built with an older kernel than they run on fall squarely into the enterprise distro turf, and CPython code shouldn't include hacks needed to make this work. That's not to say I'm

[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-21 Thread py.user
New submission from py.user: https://docs.python.org/3/library/xml.etree.elementtree.html#reference 1. Comment 2. iselement() 3. ProcessingInstruction 4. SubElement 5. Element.find() 6. ElementTree._setroot() 7. TreeBuilder Applied a patch to the issue that adds Element class links. --

[issue27990] Provide a way to enable getrandom on Linux even when build system runs an older kernel

2016-09-21 Thread STINNER Victor
STINNER Victor added the comment: Oh it's strange that only 3.5.1 has the issue. Happy to read that the problem is already solved! -- ___ Python tracker ___ _

[issue28233] PyUnicode_FromFormatV can leak PyUnicodeWriter

2016-09-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >