[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- superseder: -> deeply nested filter segfaults ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue25414] Bypass unnecessary size limit test from deques on builds with 64-bit numbers

2015-10-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually this issue an exact duplicate of issue22911 that is a duplicate of issue14010. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25410] Clean up and fix OrderedDict

2015-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Eric. As for using Py_TYPE(self) instead of the __class__ attribute in #3, this is consistent with the rest of Python core and stdlib. All C implementations use Py_TYPE(self) for repr and pickling, even if Python implementations can

[issue25414] Bypass unnecessary size limit test from deques on builds with 64-bit numbers

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1733b3bd46db by Raymond Hettinger in branch 'default': Issue #25414: Remove unnecessary tests that can never succeed. https://hg.python.org/cpython/rev/1733b3bd46db -- nosy: +python-dev ___ Python tracker

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is a duplicate of Issue #14010. This issue runs deep and isn't itertools specific. Running infinite chains of iterators pushes a number of CPython internals past their limits. The best solutions are hard (monitoring the C-stack or fixing every possi

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Also crashes in 3.5.0 (on Windows 7, with 64 bit build). -- nosy: +josh.r ___ Python tracker ___ ___

[issue25405] User install of 3.5 removes py.exe from C:\Windows

2015-10-16 Thread eryksun
eryksun added the comment: Setting a new default for py.exe doesn't require admin privileges. You can use the PY_PYTHON environment variable: C:\>py --version Python 2.7.10 C:\>set PY_PYTHON=3 C:\>py --version Python 3.5.0 which you can easily persist in the registry usin

[issue25415] I can create instances of io.IOBase

2015-10-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Martin, I agree with changing the doc. Gerrit misunderstood because 'no public constructors' is either meaningless or wrong. We do not usually talk about public versus private constructors. This sounds more like C++ than Python. For Python namespaces, names

[issue25421] Make __sizeof__ for builtin types more subclass friendly

2015-10-16 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25405] User install of 3.5 removes py.exe from C:\Windows

2015-10-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: In my view, py.exe is a mess. Steve, I know this is something you just inherited. I have multiple all-user installs. The first problem I have with py.exe is its defaulting to 2.7 instead of latest 3.5, and the impossibility of changing this. The second, gi

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Zachary Ware
Changes by Zachary Ware : -- assignee: -> rhettinger components: +Extension Modules nosy: +rhettinger versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker __

[issue25419] Readline completion of module names in import statements

2015-10-16 Thread Martin Panter
Martin Panter added the comment: Josh: Thanks for pointing out I Python. I haven’t used it much myself, but it does seem to do a similar thing to my proposal. Looks like the relevant code may be around module_completion() at

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-10-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: According to https://docs.python.org/3/reference/lexical_analysis.html#lexical-analysis, the encoding of a sourcefile (in Python 3) defaults to utf-8* and a decoding error is (should be) reported as a SyntaxError. Since b"\x7f\x00\x00\n''s\x01\xfd\n'S" is not

[issue25428] Have `datetime` understand integer arguments for timezones

2015-10-16 Thread R. David Murray
R. David Murray added the comment: timezone is relatively new. Work is in progress to add better timezone support to datetime, but it is a complicated subject and may or may not make it into 3.6. In any case I think it is too soon to talk about this kind of API change, before the other work

[issue25429] Can segfault Python with itertools.chain.from_iterable

2015-10-16 Thread Evan Hubinger
New submission from Evan Hubinger: The code import itertools it = itertools.chain.from_iterable((f() for f in [lambda: it])) list(it) definitely segfaults on Python 2.6, 2.7, 3.3, and 3.4, and probably segfaults on other versions as well. The code is clearly incorrect in that the lambda refer

[issue25428] Have `datetime` understand integer arguments for timezones

2015-10-16 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +belopolsky, lemburg versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue25428] Have `datetime` understand integer arguments for timezones

2015-10-16 Thread leewz
New submission from leewz: Current: If I want to create a datetime object with a particular timezone offset, I have to do this: import datetime mytime = datetime.datetime(2015, 10, 16, 9, 13, 0, tzinfo=datetime.timezone(datetime.timedelta(hours=-7))) Or with imports: from dat

[issue25381] Doc: Use of old description of raise in Python3

2015-10-16 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue25410] Clean up and fix OrderedDict

2015-10-16 Thread Eric Snow
Eric Snow added the comment: Thanks for working on this, Serhiy. I've left a review. As to the points you outlined, I have concerns with the impact of #3 and #5 on subclasses. Notably od.__class__ is not necessarily the same as type(od). Also #7 may introduce an unhandled re-entrancy, causi

[issue25311] Add f-string support to tokenize.py

2015-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Multi-line string tests were added in changeset 91c44dc35dfd. That will make changes for this issue safer. Updated patch to come. -- ___ Python tracker

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 91c44dc35dfd by Eric V. Smith in branch 'default': Issue 25422: Add tests for multi-line string tokenization. Also remove truncated tokens. https://hg.python.org/cpython/rev/91c44dc35dfd -- nosy: +python-dev ___

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Removed the truncation of tokens. There's really no point to it, and it could be hiding bugs. Also removed the truncation of token names, although none were ever truncated. -- Added file: http://bugs.python.org/file40800/issue-25422-2.diff

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Avoid truncating the expected results when the tokens are long. -- Added file: http://bugs.python.org/file40799/issue-25422-1.diff ___ Python tracker ___

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-16 Thread Martin Panter
Martin Panter added the comment: One idea might be to synchronously poll the screen size each time before Readline is invoked. Would doing this be such a burden? The polling could be limited to once every 0.1 s or so if it was a big burden. These ways would avoid interfering with signal handle

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file40798/issue-25422.diff ___ Python tracker ___ ___

[issue25419] Readline completion of module names in import statements

2015-10-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: Is there a reason ipython's import completer couldn't be borrowed in its entirety? At work, I use a lightly adapted version of the code from ipython to do completion when I'm using the plain interactive interpreter (for whatever reason), and it works just fine

[issue25427] Remove the pyvenv script in Python 3.8

2015-10-16 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Drop the pyvenv script ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue25154] Drop the pyvenv script

2015-10-16 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue25427] Remove the pyvenv script in Python 3.8

2015-10-16 Thread Brett Cannon
New submission from Brett Cannon: Title explains it all. -- assignee: brett.cannon components: Demos and Tools messages: 253103 nosy: brett.cannon priority: normal severity: normal status: open title: Remove the pyvenv script in Python 3.8 ___ Python

[issue25154] Drop the pyvenv script

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ab285820db2 by Brett Cannon in branch 'default': Issue #25154: Deprecate the pyvenv script. https://hg.python.org/cpython/rev/6ab285820db2 -- nosy: +python-dev ___ Python tracker

[issue25426] Deprecate the regex_compile benchmark

2015-10-16 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: I can't get your testing program to compile, Victor, so if I run into it again I will add a skip to the test (harder to detect that it's the same test since test_eintr runs another test suite as if it's a single test). -- ___

[issue25426] Deprecate the regex_compile benchmark

2015-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The public API for cache clearing is re.purge(). > It's a pity there isn't an official way to compile without caching. See issue17441. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-10-16 Thread STINNER Victor
STINNER Victor added the comment: Hi Brett, if you are motivated, you can try the C program that I wrote to reproduce the bug on FreeBSD. It's attached to #25122. If the C program hangs too, it would mean that Darwin has also a bug (same bug??) in its code to handle signals in the code handlin

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Changes by Sergey Shashkov : -- hgrepos: +321 keywords: +patch Added file: http://bugs.python.org/file40797/fractions_truediv_fix.patch ___ Python tracker ___ ___

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-10-16 Thread Nan Wu
Nan Wu added the comment: Added a small patched for this change. -- keywords: +patch nosy: +Nan Wu Added file: http://bugs.python.org/file40796/htmllib_deprecation_warning.patch ___ Python tracker _

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio

2015-10-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: This has come along pretty well. The project is managed here: https://gitlab.com/python-smtpd-hackers/aiosmtpd and documentation here: http://aiosmtpd.readthedocs.org/en/latest/ -- ___ Python tracker

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Changes by Sergey Shashkov : -- hgrepos: -320 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Changes by Sergey Shashkov : -- hgrepos: +320 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Sergey Shashkov added the comment: ... def forward(a, b): if isinstance(b, (int, Fraction)): return monomorphic_operator(a, b) elif isinstance(b, float): return fallback_operator(float(a), b) elif isinstance(b, complex):

[issue25419] Readline completion of module names in import statements

2015-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm reviewing the patch, but it will take a time. Wouldn't be simpler to use regular expressions instead of tokenizer? For now Completer doesn't depends on the readline module, nor other global state. It can be used for completing in other environment, for e

[issue25426] Deprecate the regex_compile benchmark

2015-10-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: That sounds reasonable to me. It's a pity there isn't an official way to compile without caching. -- ___ Python tracker ___ ___

[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Arfrever. Although next time you don't need to unset every field of the issue since the issue was still fixed, just in a suboptimal fashion that didn't impact performance. -- resolution: -> fixed stage: -> resolved status: open ->

[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc42700abb8e by Brett Cannon in branch '2.7': Issue #25188: Clean up code to pass the --pgo flag to subprocesses https://hg.python.org/cpython/rev/cc42700abb8e -- ___ Python tracker

[issue25426] Deprecate the regex_compile benchmark

2015-10-16 Thread Brett Cannon
New submission from Brett Cannon: Turns out it relies on internal APIs that either don't exist on other interpreters (e.g., IronPython), or they change which leads to breakage of the benchmark (e.g., already changed for Python 3.2 and 3.3). Probably best to retire it rather than continuing to

[issue25407] Update PEP 4 to keep modules in Python 3

2015-10-16 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue25407] Update PEP 4 to keep modules in Python 3

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset bcee1364e2dc by Brett Cannon in branch '3.5': Issue #25407: Drop the mention of the formatter module being removed https://hg.python.org/cpython/rev/bcee1364e2dc New changeset 9a0d367b8dd3 by Brett Cannon in branch 'default': Merge for issue #25407

[issue25424] Deprecate older versions of benchmarks

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the input, Antoine! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25424] Deprecate older versions of benchmarks

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2dfb8e568d93 by Brett Cannon in branch 'default': Issue #25424: Deprecate benchmarks with newer versions https://hg.python.org/benchmarks/rev/2dfb8e568d93 -- nosy: +python-dev ___ Python tracker

[issue25425] white-spaces encountered in 3.4

2015-10-16 Thread R. David Murray
R. David Murray added the comment: You are going to have to explain more about what your issue is, there isn't enough information here to even start to guess. -- nosy: +r.david.murray ___ Python tracker __

[issue25424] Deprecate older versions of benchmarks

2015-10-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: As you prefer. The modern equivalents should be good replacements anyway, so there's not much need in keeping the old ones. -- ___ Python tracker _

[issue25424] Deprecate older versions of benchmarks

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: Another option is to make it so that we add an "old" group of tests and make negation by group work, e.g., `-b 2n3,-old`. -- ___ Python tracker _

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: This is still an intermittent problem for me. Maybe it's related to issue #25122 ? -- nosy: +haypo resolution: not a bug -> status: closed -> open ___ Python tracker __

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Sergey Shashkov added the comment: Bad idea, just def __floordiv__(a, b): """a // b""" if isinstance(b, numbers.Complex): return math.floor(a / b) else: return NotImplemented If b is inherited from number, real, complex, Fraction and etc, then a

[issue25425] white-spaces encountered in 3.4

2015-10-16 Thread pavan kumar Dharmavarapu
New submission from pavan kumar Dharmavarapu: need to resolved some white spaces that are encountered in this problem where it need to be resolved by writing patch -- components: Windows messages: 253082 nosy: paul.moore, pavan kumar Dharmavarapu, steve.dower, tim.golden, zach.ware prior

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Sergey Shashkov
Sergey Shashkov added the comment: OK, then we should not change numbers.py. And in fractions.py: def __floordiv__(a, b): """a // b""" if isinstance(b, numbers.Complex) or hasattr(b, '__rtruediv__'): fr = a / b if fr != NotImplemented: re

[issue25423] Deprecate benchmarks that execute too quickly

2015-10-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I haven't seen that: $ ./perf.py -f -b silent_logging `which python2.7` `which python3.4` INFO:root:Automatically selected timer: time Running silent_logging... INFO:root:Running `/home/antoine/.local/bin/python3.4 ./performance/bm_logging.py -n 5 --timer time

[issue25424] Deprecate older versions of benchmarks

2015-10-16 Thread Brett Cannon
New submission from Brett Cannon: The django, json_dump, and mako benchmarks all have v2 versions and have had such versions for quite some time. Perhaps it's time to retire them? -- components: Benchmarks messages: 253079 nosy: brett.cannon, pitrou priority: normal severity: normal sta

[issue25423] Deprecate benchmarks that execute too quickly

2015-10-16 Thread Brett Cannon
New submission from Brett Cannon: I have seen both silent_logging and unpack_sequence reliably complete so quickly in fast mode as to be measured at 0 time. That indicates to me that the benchmarks are no longer measuring something of consequence. -- components: Benchmarks messages: 25

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-16 Thread John Morrissey
Changes by John Morrissey : -- nosy: +johnmorr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25412] __floordiv__ in module fraction fails with TypeError instead of returning NotImplemented

2015-10-16 Thread Oscar Benjamin
Oscar Benjamin added the comment: You should test the change with number types that don't use the number tower e.g. Decimal, sympy, gmpy2, mpf, numpy arrays etc. Few non stdlib types use the number ABCs so testing against numbers.Complex may cause a change in behaviour. -- nosy: +oscar

[issue25408] Consider dropping html5lib and spambayes from the default benchmark set

2015-10-16 Thread Brett Cannon
Brett Cannon added the comment: Fixed in changeset 22a5da25fa4e . -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue25422] tokenize: add test for multi-line strings

2015-10-16 Thread Eric V. Smith
New submission from Eric V. Smith: As part of fixing issue 25311, I'm going to change how the string pattern recognition works. I want to make sure I don't break anything that currently works, but there are no tests for multi-line strings. I'll add those first, under this issue. I'm not posit

[issue25422] tokenize: add tests for multi-line strings

2015-10-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- title: tokenize: add test for multi-line strings -> tokenize: add tests for multi-line strings ___ Python tracker ___ _

[issue25421] Make __sizeof__ for builtin types more subclass friendly

2015-10-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Default __sizeof__() implementation uses tp_basicsize. This makes it to work correctly with most builtin types and types with __slots__ (using __slots__ increases tp_basicsize). But special implementations of __sizeof__() use static object size ('sizeof(XX

[issue25420] "import random" blocks on entropy collection

2015-10-16 Thread jan matejek
New submission from jan matejek: When imported, the random module creates and seeds an implicit instance, even when it is never used. The RNG is seeded from os.urandom, which as of python 3.5 uses the potentially blocking getrandom() call. This causes problems e.g. on our build VMs that don't

[issue25419] Readline completion of module names in import statements

2015-10-16 Thread Martin Panter
New submission from Martin Panter: As mentioned in Issue 25209, here is a patch to complete module and attribute names in import statements. This is a rewrite of some personal code I have had kicking around for a few years, but I have added extra features (parsing “import x as alias”, supporti

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-16 Thread Christian Tanzer
Christian Tanzer added the comment: Alexander Belopolsky wrote at Thu, 15 Oct 2015 17:56:42 +: > I don't think your solution will work for date/time/datetime pickles. > There are many values for which pickle payload consists of bytes > within 0-127 range. H. > IIUC, you propose to deco

[issue25418] Minor markup issue in reference/datamodel docs

2015-10-16 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue25418] Minor markup issue in reference/datamodel docs

2015-10-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 389c78c2c031 by Berker Peksag in branch '3.4': Issue #25418: Fix markup in object.__hash__ documentation https://hg.python.org/cpython/rev/389c78c2c031 New changeset f56006107a4b by Berker Peksag in branch '3.5': Issue #25418: Fix markup in object._