[issue28594] List define and Change result

2016-11-03 Thread saeed
New submission from saeed: Hi, I define multi List in a line such as this: smoke= exercise = cholesterol = angina = stroke = attack = [0] * 2 and This work bad! if I define later line such this, problem has been solve: smoke=[0]*2 exercise = [0]*2 cholesterol = [0]*2 angina

[issue28580] Optimize iterating split table values

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, the resolution could be simple. But how about >>> d = dict.fromkeys(range(100)) >>> for k in range(98): ... del d[k] ... >>> it = iter(d) >>> next(it) 98 >>> d.clear() >>> d[0] = 1 >>> d[1] = 2 >>> next(it) Traceback (most recent call last): File "", li

[issue28594] List define and Change result

2016-11-03 Thread Martin Panter
Martin Panter added the comment: I haven’t looked at your code, but I think you may have misunderstood how variable assignments work in Python. See . When you assign an object such as [0, 0] to a varia

[issue28580] Optimize iterating split table values

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is appropriate if iterating modifying dict raises RuntimeError, produces less items or even produce some items multiple times. What is not appropriate -- crash, hang and infinite iteration. There was a proposition about making this behavior more consisten

[issue28580] Optimize iterating split table values

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: Currently dict iterator does not allow size changed during iteration. This is more strict than list iterator but still allow modification during iteration. Maybe we could deny all modification by checking dict->ma_version_tag. But that's irrelevant to this issue.

[issue28594] List define and Change result

2016-11-03 Thread saeed
saeed added the comment: Thank for attention,but see this: >>> x=y=[] >>> x=y=[0]*3 >>> x [0, 0, 0] >>> y [0, 0, 0] >>> y=[0, 1, 1] >>> x [0, 0, 0] >>> y [0, 1, 1] >>> y[1]+=1 >>> y [0, 2, 1] >>> x [0, 0, 0] >>> x[0]+=5 >>> x [5, 0, 0] >>> y [0, 2, 1] then must my code work and there is another

[issue28594] List define and Change result

2016-11-03 Thread saeed
Changes by saeed : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue28580] Optimize iterating split table values

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: > I would suggest just remove assert() from your patch and address undefined > behavior in other issue. That's what v2 does. If there is another issue, let's also leave _PyDict_Next to it. -- ___ Python tracker

[issue25251] Unknown MS Compiler version 1900

2016-11-03 Thread Sam Miller
Sam Miller added the comment: Hi disutils. I got this bug when trying to pip install pomegranate to python 3.5. There is now a m2w64-toolchain (https://github.com/ContinuumIO/anaconda-issues/issues/561)that allows installing the notoriously windows-challenged theano, so I thought this error c

[issue28580] Optimize iterating split table values

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In current code there is no UB in _PyDict_Next(). -- ___ Python tracker ___ ___ Python-bugs-list m

[issue28594] List define and Change result

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: In your last example, after x=y=[], you reassign a new list to y, so x and y are different. In your my.py, you are altering the same list. Please read the link Martin gives. -- nosy: +xiang.zhang status: open -> closed ___

[issue28580] Optimize iterating split table values

2016-11-03 Thread Xiang Zhang
Changes by Xiang Zhang : Added file: http://bugs.python.org/file45332/iterate_splittable_v4.patch ___ Python tracker ___ ___ Python-bugs-list

[issue28580] Optimize iterating split table values

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: v4 LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25677] Syntax error caret confused by indentation

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review -> commit review versions: +Python 3.7 ___ Python tracker ___ ___ Pyt

[issue28594] List define and Change result

2016-11-03 Thread saeed
saeed added the comment: OK, I found My problem, Thank so much, There is any way to define them shortly?? -- ___ Python tracker ___

[issue28595] shlex.split should not augment wordchars

2016-11-03 Thread Evan
New submission from Evan: The changes to shlex due to land in 3.6 use a predefined set of characters to "augment" wordchars, however this set is incomplete. For example, 'foo,bar' should be parsed as a single token, but it is split on the comma: $ echo foo,bar foo,bar >>> import shlex >>> lis

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-11-03 Thread Xavier de Gaye
New submission from Xavier de Gaye: Android does not have langinfo.h and this results in _bootlocale importing locale on startup (see issue 26928). IMHO it is not acceptable to fallback to locale.py if CODESET is not available (in answer to Victor question in msg199367), because there are now

[issue26928] _bootlocale imports locale at startup on Android, causing test_site to fail

2016-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch fixes test_startup_imports when the platform does not have langinfo.h. Entered new issue 28596: "on Android _bootlocale on startup relies on too many library modules". -- assignee: -> xdegaye components: +Tests -Cross-Build, Library (Lib)

[issue26865] Meta-issue: support of the android platform

2016-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #28596: on Android _bootlocale on startup relies on too many library modules -- dependencies: +on Android _bootlocale on startup relies on too many library modules ___ Python tracker

[issue26935] android: test_os fails

2016-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: This new patch takes into account Martin comment in msg265099 and fixes a call to getpwall() as Android does not have getpwall(). -- assignee: -> xdegaye stage: patch review -> commit review versions: +Python 3.7 Added file: http://bugs.python.org/file

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If _PyDict_GetItem_KnownHash() returns an error, it is very likely that following insertdict() with same key will return an error. I would prefer to return an error right after _PyDict_GetItem_KnownHash() is failed. This would look more straightforward. ---

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The proposition of making default __format__ equivalent to str() will be addressed in separate issue. Python-Dev thread: https://mail.python.org/pipermail/python-dev/2016-October/146765.html. -- resolution: -> fixed stage: patch review -> resolved s

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: > If _PyDict_GetItem_KnownHash() returns an error, it is very likely that > following insertdict() with same key will return an error. Make sense. -- assignee: haypo -> serhiy.storchaka Added file: http://bugs.python.org/file45336/issue28123_v6.patch ___

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-11-03 Thread Stefan Krah
Stefan Krah added the comment: Okay great. I think it's probably best to produce an initial patch with the verbatim Python docstrings (you can of course address the comments that I already made), then we mark the passages that are clearly not valid for _decimal or outdated for _pydecimal, the

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-11-03 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue27779] Sync-up docstrings in C version of the the decimal module

2016-11-03 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: -easy, patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue23262] webbrowser module broken with Firefox 36+

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand with what you disagree. I can imagine old Python 2.7 with old browser, old Python 2.7 with new browser, new Python 2.7 with new browser, and even new Python 2.7 with old browser on the same computer (but the latter is very unlikely). Old

[issue28498] tk busy command

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch skips tests with the cursor option on OSX/Aqua. -- Added file: http://bugs.python.org/file45337/tk_busy_6.diff ___ Python tracker __

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. I'll commit the patch soon if there are no comments from other core developers. -- stage: patch review -> commit review ___ Python tracker

[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Fabio Zadrozny
New submission from Fabio Zadrozny: The file: /Doc/reference/lexical_analysis.rst says that things as: f"abc {a[\"x\"]} def" # workaround: escape the inner quotes f"newline: {ord('\\n')}" # workaround: double escaping fr"newline: {ord('\n')}" # workaround: raw outer string are accepted in f

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2016-11-03 Thread Martijn Pieters
New submission from Martijn Pieters: The `BINARY_MODULO` operator hardcodes a test for `PyUnicode`: TARGET(BINARY_MODULO) { PyObject *divisor = POP(); PyObject *dividend = TOP(); PyObject *res = PyUnicode_CheckExact(dividend) ? PyUnicod

[issue28387] double free in io.TextIOWrapper

2016-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 91f024fc9b3a by Serhiy Storchaka in branch '2.7': Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when https://hg.python.org/cpython/rev/91f024fc9b3a New changeset 89f7386104e2 by Serhiy Storchaka in branch '3.5': Issue #28387: F

[issue28387] double free in io.TextIOWrapper

2016-11-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python, eric.smith type: -> behavior versions: +Python 3.7 ___ Python tracker ___

[issue28597] f-string behavior is conflicting with its documentation

2016-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: This is a duplicate of issue 28590. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> fstring's '{' from escape sequences does not start an expression ___ Python tracker

[issue28494] is_zipfile false positives

2016-11-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-03 Thread INADA Naoki
INADA Naoki added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2016-11-03 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue28599] AboutDialog set_name is ignored

2016-11-03 Thread rebelxt
New submission from rebelxt: Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609] on linux Mint 18 and Gtk 3. I run a python3 script that includes these statements: import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, GObject aboutdialog = Gtk.AboutDialog() a

[issue28599] AboutDialog set_name is ignored

2016-11-03 Thread Zachary Ware
Zachary Ware added the comment: That appears to be an issue with the third-party PyGObject project, please open an issue on the PyGObject issue tracker: https://bugzilla.gnome.org/page.cgi?id=browse.html&product=pygobject -- nosy: +zach.ware resolution: -> not a bug stage: -> resolve

[issue28599] AboutDialog set_name is ignored

2016-11-03 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: not a bug -> third party ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue25251] Unknown MS Compiler version 1900

2016-11-03 Thread Steve Dower
Steve Dower added the comment: That sounds like a great feature for setuptools. Core distutils is highly focused on what is needed for the core product, and we are very much trying to avoid bloating it, whereas setuptools is free to add extensions wherever necessary and make them available on

[issue25652] collections.UserString.__rmod__() raises NameError

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue28598 may be related. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2016-11-03 Thread Martijn Pieters
Martijn Pieters added the comment: Here's a proposed patch for tip; what versions would it be worth backporting this to? (Note, there's no NEWS update in this patch). -- keywords: +patch Added file: http://bugs.python.org/file45338/issue28598.patch

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
New submission from Yury Selivanov: loop.call_soon is the central function of asyncio. Everything goes through it. Current design of asyncio.loop.call_soon makes the following checks: 1. [debug mode] check that the loop is not closed 2. [debug mode] check that we are calling call_soon from the

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- keywords: +patch Added file: http://bugs.python.org/file45339/call_soon.patch ___ Python tracker ___ __

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Andrew Svetlov
Andrew Svetlov added the comment: The patch looks good. IIRC haypo added the check because people called `.call_later()` with coroutine instead of callback very often. But checking in debug mode looks very reasonable to me if it is so expensive. --

[issue28601] Ambiguous datetime comparisons should use == rather than 'is' for tzinfo comparison

2016-11-03 Thread Paul G
New submission from Paul G: According to PEP495 (https://www.python.org/dev/peps/pep-0495/#aware-datetime-equality-comparison) datetimes are considered not equal if they are an ambiguous time and have different zones. However, currently "interzone comparison" is defined / implemented as the z

[issue28601] Ambiguous datetime comparisons should use == rather than 'is' for tzinfo comparison

2016-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: See Datetime-SIG thread . -- assignee: -> belopolsky nosy: +tim.peters stage: -> needs patch ___ Python tracker

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Yury Selivanov added the comment: > IIRC haypo added the check because people called `.call_later()` with > coroutine instead of callback very often. We'll update asyncio docs in 3.6 with a tutorial to focus on coroutines (not on low-level event loop). This should leave the loop API to advanc

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Paul G
New submission from Paul G: After PEP-495, the default value for non-fold-aware datetimes is that they return the DST side, not the STD side (as was the assumption before PEP-495). This invalidates an assumption made in `tz.fromutc()`. See lines 991-1000 of datetime.py: dtdst = dt.dst()

[issue25264] test_marshal always crashs on "AMD64 Windows10 2.7" buildbot

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Crashes seems was fixed in issue22734 and issue27019. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> marshal needs a lower stack depth for debug builds on Windows ___ Python

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file45340/call_soon2.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think timezones that satisfy the invariant expected by the default fromutc() is common enough that we need to provide special support for them. Note that in most cases it is the UTC to local conversion that is straightforward while Local to UTC

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file45341/call_soon3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10408] Denser dicts and linear probing

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the status of this issue in the light of compact dict implementation? -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Paul G
Paul G added the comment: Of the `tzinfo` implementations provided by `python-dateutil`, `tzrange`, `tzstr` (GNU TZ strings), `tzwin` (Windows style time zones) and `tzlocal` all satisfy this condition. These are basically all implementations of default system time zone information. With curr

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread STINNER Victor
STINNER Victor added the comment: I didn't review the patch, but I agree with the overall approach: expensive checks can be made only in debug mode. If people are concerned by the removal of the check by default, we should repeat everywhere in the doc that async programming is hard and that the

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Paul G at Github: """ To be clear, I'm just saying that fromutc() goes from returning something meaningful (the correct date and time, with no indication of what side of the fold it's on) to something useless (an incorrect date and time) in the case whe

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Paul G
Paul G added the comment: > After all, how much effort would it save for you in dateutil if you could > reuse the base class fromutc? Realistically, this saves me nothing since I have to re-implement it anyway in in all versions <= Python 3.6 (basically just the exact same algorithm with line

[issue28602] `tzinfo.fromutc()` fails when used for a fold-aware tzinfo implementation

2016-11-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I can't think of a single actual downside to this change - all it does is > preserve the original behavior of `fromutc()`. You've got me on the fence here. If what you are saying is correct, it would make sense to make this change and better do it bef

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Guido van Rossum
Guido van Rossum added the comment: Patch 3 LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Ned Deily
Changes by Ned Deily : -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2016-11-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- type: crash -> behavior versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread STINNER Victor
STINNER Victor added the comment: call_soon3.patch: LGTM. It enhances error messages (fix the method name) and should make asyncio faster. -- ___ Python tracker ___

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Марк Коренберг
Марк Коренберг added the comment: > haypo added the check because people called `.call_later()` with coroutine > instead of callback very often maybe make dirty hack and check hasattr(callback, 'send') ? -- nosy: +mmarkk ___ Python tracker

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Yury Selivanov added the comment: > LGTM Will commit this soon. > maybe make dirty hack and check hasattr(callback, 'send') ? If you schedule a coroutine object it will fail anyways, because it's not callable. -- ___ Python tracker

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-11-03 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM, will apply shortly. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset b97b0201c2f4 by Guido van Rossum in branch '3.5': Issue #26980: Improve docs for create_unix_connection(). By Mariatta. https://hg.python.org/cpython/rev/b97b0201c2f4 New changeset ddbba4739ef4 by Guido van Rossum in branch '3.6': Issue #26980: Impr

[issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented

2016-11-03 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ __

[issue28603] traceback module can't format/print unhashable exceptions

2016-11-03 Thread Andreas Stührk
New submission from Andreas Stührk: The traceback module tries to handle loops caused by an exception's __cause__ or __context__ attributes when printing tracebacks. To do so, it adds already seen exceptions to a set. Unfortunately, it doesn't handle unhashable exceptions: >>> class E(Excepti

[issue28604] Exception raised by python3.5 when using en_GB locale

2016-11-03 Thread Guillaume Pasquet (Etenil)
New submission from Guillaume Pasquet (Etenil): This issue was originally reported on Fedora's Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1391280 Description of problem: After switching the monetary locale to en_GB, python then raises an exception when calling locale.localeconv() V

[issue28605] Remove mention of LTO when referencing --with-optimization in What's New

2016-11-03 Thread Brett Cannon
New submission from Brett Cannon: The What's New doc for Python 3.6 mentions that --with-optimizations turns on LTO which is no longer true. -- assignee: brett.cannon components: Documentation messages: 280024 nosy: brett.cannon, gregory.p.smith priority: deferred blocker severity: norm

[issue28606] Suspected bug in python optimizer with decorators

2016-11-03 Thread Brian Smith
New submission from Brian Smith: While using decorators in python 3.5.2, I ran into a surprising bug where the decorator sometimes lost context of the outer scope. The attached file demonstrates this problem. In this file, we have 2 decorators. They are identical, except that the first has

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 128ffe3c3eb9 by Yury Selivanov in branch '3.5': Issue #28600: Optimize loop.call_soon(). https://hg.python.org/cpython/rev/128ffe3c3eb9 New changeset 4f570a612aec by Yury Selivanov in branch '3.6': Merge 3.5 (issue #28600) https://hg.python.org/cpyt

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> performance ___ Python tracker ___

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, Andrew, thanks for reviews! I've fixed some unittests before committing the patch. -- ___ Python tracker ___ ___

[issue28604] Exception raised by python3.5 when using en_GB locale

2016-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suspect this issue is similar to issue25812. en_GB has non-ut8 encoding (likely iso8859-1). Currency symbol £ is encoded with this encoding as b'\xa3'. But Python tries to decode b'\xa3' with an encoding determined by other locale setting (LC_CTYPE).

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2016-11-03 Thread Yury Selivanov
Yury Selivanov added the comment: > Looks like I forgot about this. My final fix still hasn't been applied, so > the code in Py3.4+ is incorrect now. Left a question in code review -- ___ Python tracker _

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Guido van Rossum
Guido van Rossum added the comment: PS. I noticed there are a few lines different between the "upstream" repo and the 3.5 stdlib: +# Wake up the loop if the finalizer was called from +# a different thread. +self._write_to_self() On Thu, Nov 3, 2016 at 3:12 PM

[issue28600] asyncio: Optimize loop.call_soon

2016-11-03 Thread Yury Selivanov
Yury Selivanov added the comment: +# Wake up the loop if the finalizer was called from +# a different thread. +self._write_to_self() Yeah, looks like shutdown_asyncgens somehow ended up in 3.5 branch (there's no harm in it being there). I'll sync the branche

[issue28607] C implementation of parts of copy.deepcopy

2016-11-03 Thread Rasmus Villemoes
New submission from Rasmus Villemoes: This is mostly an RFC patch. It compiles and passes the test suite. A somewhat silly microbenchmark such as ./python -m timeit -s 'import copy; x = dict([(str(x), x) for x in range(1)]);' 'copy.deepcopy(x)' runs about 30x faster. In the (2.7 only) ap

[issue28607] C implementation of parts of copy.deepcopy

2016-11-03 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Extension Modules -Library (Lib) stage: -> test needed ___ Python tracker ___ ___ Python-bu

[issue28605] Remove mention of LTO when referencing --with-optimization in What's New

2016-11-03 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue28605] Remove mention of LTO when referencing --with-optimization in What's New

2016-11-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f750fff788e by Brett Cannon in branch '3.6': Issue #28605: Fix the help and What's New entry for --with-optimizations. https://hg.python.org/cpython/rev/1f750fff788e New changeset 4000de2dcd24 by Brett Cannon in branch 'default': Merge for issue #2

[issue28605] Remove mention of LTO when referencing --with-optimization in What's New

2016-11-03 Thread STINNER Victor
STINNER Victor added the comment: LTO was excluded of --with-optimization by the issue #28032. -- nosy: +haypo ___ Python tracker ___

[issue28606] Suspected bug in python optimizer with decorators

2016-11-03 Thread R. David Murray
R. David Murray added the comment: The statement in question causes the compiler to make 'tags' a local variable in the function, and thus you get the error on the assignment. See https://docs.python.org/3/faq/programming.html#id8. -- nosy: +r.david.murray resolution: -> not a bug st

[issue10408] Denser dicts and linear probing

2016-11-03 Thread INADA Naoki
INADA Naoki added the comment: > - make dicts denser by making the resize factor 2 instead of 4 for small dicts This had been implemented already when I start compact dict. > - improve cache locality on collisions by using linear probing set does this. But dict doesn't do it for now. In case

[issue28563] Arbitrary code execution in gettext.c2py

2016-11-03 Thread Xiang Zhang
Xiang Zhang added the comment: gettext_c2py.patch tries to avoid the problem. It still uses eval but manually parse the expression using tokens extracted from gettext. Tests are passed. But there is still a problem. Both patched and original c2py fail to handle nested ternary operator. They re