[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Vinay Sajip
Vinay Sajip added the comment: Is it OK if I close this? It's not really a bug, nor a case that's been designed for (a stdlib module supporting specific external packages is very unusual - pip support via ensurepip is perhaps the one exception I can think of). Given

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Vinay Sajip
Vinay Sajip added the comment: > I don't understand why things would be different when nesting? Specifically because venv keeps "a pointer" to the Python environment it was created from. Usually that's a system Python. If a venv ("inner") is created from a

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Antony Lee
Antony Lee added the comment: I guess it's reasonable, I'll see whether we can use the workaround you proposed. (Could a fix on virtualenv's side help?) Thanks for the explanations. -- ___ Python tracker

[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4437 stage: -> patch review ___ Python tracker ___

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Antony Lee
Antony Lee added the comment: > venv, on the other hand, doesn't, but keeps a reference to its original > Python environment. That is, I think, the reason for the difference in > behaviour. But for example, using the system Python to create a venv (no nesting),

[issue32110] Make codecs.StreamReader.read() more compatible with read() of other files

2017-11-21 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Usually the read() method of a file-like object takes one optional argument which limits the amount of data (the number of bytes or characters) returned if specified. codecs.StreamReader.read() also has such parameter. But

[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread YCmove
Change by YCmove : -- assignee: docs@python components: Documentation nosy: YCmove, docs@python priority: normal severity: normal status: open title: Separated square brackets will generate a tuple instead of a list. type: enhancement versions: Python 2.7, Python 3.4,

[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread YCmove
Change by YCmove : -- keywords: +patch pull_requests: +4435 stage: -> patch review ___ Python tracker ___

[issue32109] Separated square brackets will generate a tuple instead of a list.

2017-11-21 Thread Berker Peksag
New submission from Berker Peksag : Thank you for your report and for the PR, but I think you misunderstood documentation: Using square brackets, separating items with commas: [a], [a, b, c] The comma is used to show two different lists: a list with one item

[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-21 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4426 ___ Python tracker ___ ___

[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: This change is not needed anymore now that Unified Headers are supported by android-ndk-r14 (see issue 29040) -- resolution: fixed -> not a bug stage: resolved -> patch review status: closed -> open

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4425 ___ Python tracker ___

[issue29040] building Android with android-ndk-r14

2017-11-21 Thread Xavier de Gaye
Change by Xavier de Gaye : -- versions: -Python 3.6 ___ Python tracker ___ ___

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't agree with this. You're comparing "-X dev" with a pydebug build of Python, not with a normal Python. Your example shows the problem. If a program calls func() 1000 times in a row, they will show the same warning 1000 times. What

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 21/11/2017 à 14:46, STINNER Victor a écrit : > > I don't know the rationale of the "always" action rather than "default". Neither do I. But I don't think it matters a lot. pydebug builds are almost only used by Python core developers.

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: I forgot: the snippet above was made with "python -Wdefault::ResourceWarning". -- ___ Python tracker

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: Antoine: > If they have different names, they will be logged separately. Oh wow, nice behaviour, I like it :-) Antoine: >> For ResourceWarning, your rationale only concerns pydebug build, no? > Why? I'm talking about "-X dev", not

[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: I created PR 4489 to fix the memory leak for the "ignore "action". IMHO it's interesting to modify the "ignore" action because Python uses ignore many warnings by default: haypo@selma$ python3 -c 'import pprint, warnings;

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Thomas Eldon Allred
New submission from Thomas Eldon Allred : asyncio.BaseEventLoop.connect_accepted_socket was added in v3.5.3 Please add a note to the documentation. -- assignee: docs@python components: Documentation messages: 306650 nosy: Thomas Eldon Allred, docs@python

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread STINNER Victor
Change by STINNER Victor : -- title: Memory leaks when opening tons of files -> Ignored ResourceWarning warnings leak memory in warnings registries ___ Python tracker

[issue29040] building Android with android-ndk-r14

2017-11-21 Thread Xavier de Gaye
Change by Xavier de Gaye : -- keywords: +patch pull_requests: +4429 stage: needs patch -> patch review ___ Python tracker ___

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset d7ed48c2b8c11bb99da3661e8fe0bf5ae7f6b8d7 by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (GH-4491) (#4493)

[issue28562] test_asyncio fails on Android upon calling getaddrinfo()

2017-11-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: test_create_connection_service_name does not fail on android-24-x86_64. -- ___ Python tracker ___

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: While we're on the topic, I had some thought of also adding a similar recipe to https://docs.python.org/3/library/collections.html#deque-recipes . The alternative recipe is slower is common cases but doesn't degrade when there

[issue32106] Move sysmodule.c to Modules?

2017-11-21 Thread Decorater
New submission from Decorater : After looking in the folder Python sysmodule.c is in there instead of in Modules. I am wondering if it has any reason to be in that folder instead of in Modules/* with the other builtin modules in python. If not I think it is best to move

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : The check_node() function in test_uuid.py uses the wrong bitmask, causing the tests to fail on valid MAC addresses. Also, the description in the comment is incorrect. From my reading of the wikipedia page, the test is trying to ensure

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread Eric Snow
Eric Snow added the comment: I see at least 3 ways to sort this out: 1. partially revert the _PyRuntime change, sort of temporarily ("revert the change on memory allocators, and retry later to fix it, once other initializations issues are fixed", as

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > While I don't see how we can avoid "leaking memory" (growing the registry) > for actions like "once", I think that it's ok to don't touch the registry for > the "ignore" action. So at least, an application ignoring

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We could split patterns on two parts and create both matchers. Then the final matching function could look like: return _match_test_patterns is None or test_id in id_set or regex_match(test_id) or any(map(regex_match,

[issue32100] IDLE: PathBrowser isn't working

2017-11-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Error is printed in console window if IDLE started from one. >>> import idlelib.idle # Select pathbrowser in File menu Exception in Tkinter callback Traceback (most recent call last): File "F:\dev\3x\lib\tkinter\__init__.py", line 1699, in

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: Nick: "Should we deprecate our implied support for calling Py_DecodeLocale() before calling Py_Initialize()?" Please don't do that. Py_DecodeLocale() is the best available function to decode paths and environment variables to

[issue32103] Inconsistent text at TypeError in concatenation

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue29116. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Make str and bytes error messages on concatenation conform with other

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Today I have published a similar recipe on Python-Ideas. It uses popleft/append instead of __getitem__/rotate. def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" nexts = deque(iter(it).__next__

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-32096 as a duplicate of this one. I don't want to discuss the same issue in 3 places (2 bpo and python-dev). -- superseder: C API: Clarify which C functions are safe to be called before Py_Initialize() ->

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread Jonathan Bastien-Filiatrault
Jonathan Bastien-Filiatrault added the comment: > But it will still "leak" when you display ResourceWarning warnings with an > action different than "always". In this case, IMHO the root issue is more the > code which doesn't close the resource, than Python itself. Not

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: > 2. statically initialize the "raw" allocator with defaults, enough > to make PyMem_RawMalloc() and PyMem_RawFree() work pre-init (this > is what my PR does) As I explained, the code to initialize PyMem_Raw allocator is complex

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4430 ___ Python tracker ___

[issue32106] Move sysmodule.c to Modules?

2017-11-21 Thread Decorater
Change by Decorater : -- components: +Interpreter Core, Library (Lib) ___ Python tracker ___

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +4431 stage: -> patch review ___ Python tracker ___

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: "3. use hard-coded defaults in PyMem_RawMalloc() and PyMem_RawFree() if the runtime has not been initialized yet" I dislike this option since it can have a negative impact on performances. The PEP 445 already added a new level of

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Decorater
Change by Decorater : -- keywords: +patch pull_requests: +4428 stage: -> patch review ___ Python tracker ___

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread Eric Snow
Eric Snow added the comment: I thought issue #32086 was about documentation (which is worth having a separate issue for), not about a fix to the regression. -- ___ Python tracker

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: IMHO for the long term, the best would be to have a structure for pre-Py_Initialize configuration, maybe _PyCoreConfig, and pass it to functions that can be called before Py_Initialize(). For example, I'm working on a variant of

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 431665bf1971e66c51f59abf0693f700ff7919e8 by Yury Selivanov (AraHaan) in branch 'master': bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (#4491)

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: I mark this issue as a duplicate of bpo-32096. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_DecodeLocale() fails if used before the runtime is initialized.

[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread Jonathan Bastien-Filiatrault
Jonathan Bastien-Filiatrault added the comment: We just got hit by this. We had one specific case where files with unique names were not being closed and Python was leaking a lot of memory over a few days. -- nosy: +Jonathan Bastien-Filiatrault

[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: The problem is not the function displaying the warning, but warnings registries (__warningregistry__) no? The behaviour depends on the action of the filter matching the ResourceWarning warning: * always: don't touch the registry =>

[issue31672] string.Template should use re.ASCII flag

2017-11-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset e256b408889eba867e1d90e5e1a0904843256255 by Barry Warsaw in branch 'master': bpo-31672 - Add one last minor clarification for idpattern (#4483) https://github.com/python/cpython/commit/e256b408889eba867e1d90e5e1a0904843256255

[issue31672] string.Template should use re.ASCII flag

2017-11-21 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation

2017-11-21 Thread Decorater
Decorater added the comment: Will see whhat I can do. -- nosy: +Decorater ___ Python tracker ___

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: I created a list of all test cases using: ./python -m test --list-cases > all_cases The list contains 29,569 test cases. Sadly, the set().__contains__ matcher of my PR 4421 cannot be taken because test_json produces two test cases

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: > If a program calls func() 1000 times in a row, they will show the same > warning 1000 times. What does it bring to have the exact same warning (and > line number) displayed 1000 times instead of once? Nothing. There is a >

[issue32102] Add "capture_output=True" option to subprocess.run

2017-11-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Yeah, I find it pretty common to set both stdout and stderr to PIPE, but I'm with you in hesitating to add YAO to the subprocess API. If you do move forward with this though, I think capture_output would have to be mutually exclusive to

[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4427 stage: -> patch review ___ Python tracker ___

[issue32104] add method throw() to asyncio.Task

2017-11-21 Thread Oleg K
New submission from Oleg K : currently there is no other way to interrupt task but to call cancel() which will: "This arranges for a CancelledError to be thrown into the wrapped coroutine on the next cycle through the event loop." in order to write advanced Tasks there

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: > The best way to fix this is excluding file name from warning message. As a > result, the message for every file will be the same and warnings registry > will not grow. Your warning comes from the io module which uses the message:

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue27535. -- ___ Python tracker ___

[issue32108] configparser bug: section is emptied if you assign a section to itself

2017-11-21 Thread Simon Lambourn
New submission from Simon Lambourn : If you assign a ConfigParser section back to the parent ConfigParser object (say after updating the section), the section is emptied. (I realise now that you don't need to assign the section back to the parent as it's a proxy for

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But why use less efficient code? Is my code worse? -- ___ Python tracker ___

[issue32100] IDLE: PathBrowser isn't working

2017-11-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The issue is this: 1. PathBrowser subclasses ModuleBrowser. 2. ModuleBrowser.init() has the common code for initializing both. 3. #31460 changed the signature of ModuleBrowser.__init__ *and* .init. 4. I must not have tested pathbrowser after

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Pure chance I believe. It all depends on the MAC address of the machines the test runs on (which is perhaps an unacceptable environmental variability in the test suite, and should be fixed/mocked?). FWIW, I saw the failures on my 2017

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Antony Lee
Antony Lee added the comment: Travis uses virtualenvs as toplevel containers for running CI. Some projects need (or would like to) set up venvs as part of their test suites. On example is https://github.com/airspeed-velocity/asv, which profiles a project's speed

[issue32108] configparser bug: section is emptied if you assign a section to itself

2017-11-21 Thread R. David Murray
Change by R. David Murray : -- nosy: +lukasz.langa ___ Python tracker ___ ___

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Really, I don't give a whit about the micro-benchmarks -- that completely misses the point. The recipes are primarily intended to have educational value on ways to use itertools, deques, and whatnot. For itertools, I'm

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm just wondering why tests were passing successfully before. -- nosy: +serhiy.storchaka ___ Python tracker

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Vinay Sajip
Vinay Sajip added the comment: Can you explain why virtualenv and venv need to be mixed in this way, other than as an academic exercise? If you use -m venv for both inner and outer venvs, then it seems to work as expected. I'm planning to close this as "not a bug"

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-21 Thread Zachary Ware
Zachary Ware added the comment: If you'd like to do that update, there are some instructions at https://github.com/python/cpython-source-deps. You can get AppVeyor to use dependencies from your fork of `cpython-source-deps` by adjusting

[issue32095] AIX: ModuleNotFoundError: No module named '_ctypes' - make install fails

2017-11-21 Thread Zachary Ware
Zachary Ware added the comment: You removed me from the nosy list, so I didn't see your reply until now when I happened to refresh the tab that happened to still be open :) The warning I was talking about in that message was a warning that libffi was found but is

[issue32106] Move sysmodule.c to Modules?

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The builtins and sys modules are special as they are directly initialized at interpreter startup. They are parts of the interpreter core and this is why they are in the Python directory. -- nosy: +serhiy.storchaka

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2017-11-21 Thread Vinay Sajip
Vinay Sajip added the comment: The problem for venv is that it's tied to the running interpreter, which is (in the case you mention) the one from the outer virtualenv. Unlike virtualenv, venv does not provide a mechanism to restart itself with a different Python

[issue32108] configparser bug: section is emptied if you assign a section to itself

2017-11-21 Thread Łukasz Langa
Łukasz Langa added the comment: Confirmed. -- ___ Python tracker ___ ___ Python-bugs-list

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +4432 stage: -> patch review ___ Python tracker ___

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If your fix is correct (and it looks correct to me), we should fix not only the test, but, first of all, the _*_getnode functions. Perhaps they should ignore locally administered MAC addresses and continue searching better

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 21, 2017, at 15:47, Serhiy Storchaka wrote: > If your fix is correct (and it looks correct to me), we should fix not only > the test, but, first of all, the _*_getnode functions. Perhaps they should > ignore

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-21 Thread Jonas H.
Jonas H. added the comment: Interesting, Victor. I've had a look at the code you mentioned, but I'm afraid it doesn't really make sense to re-use any of the code. Here's a new patch, implemented in the loader as suggested by Antoine, and with tests. I'm happy to write

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-21 Thread Eric Snow
Eric Snow added the comment: > IMHO for the long term, the best would be to have a structure for > pre-Py_Initialize configuration, maybe _PyCoreConfig, and pass it > to functions that can be called before Py_Initialize(). +1 As an alternative to that, we could

[issue32107] test_uuid uses the incorrect bitmask

2017-11-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Yikes. It's entirely possible that these tests are tainted by environmental leakage. I was looking into why Travis fails on my PR: https://travis-ci.org/python/cpython/jobs/305433725 and stepping through _ifconfig_getnode() on my Mac.

[issue32100] IDLE: PathBrowser isn't working

2017-11-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: I added a test for PathBrowser, but I didn't change the existing tests, except to move them to their own test class. -- ___ Python tracker

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: I merged my PR 4421 which is based on Serhiy's PR 4420. Thank you Serhiy for your reviews! -- Serhiy Storchaka: "We could split patterns on two parts and create both matchers (...) I don't know whether it is worth to do." My use

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: Attached bench_ignore_warn.py: microbenchmark (using the perf module) to measure the performance of emitting a warning when the warning is ignored. I added two basic optimizations to my PR 4489. With these optimizations, the

[issue32099] Use range in itertools roundrobin recipe

2017-11-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +4434 ___ Python tracker ___

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 803ddd8ce22f0de3ab42fb98a225a704c000ef06 by Victor Stinner in branch 'master': bpo-31324: Optimize support._match_test() (#4421) https://github.com/python/cpython/commit/803ddd8ce22f0de3ab42fb98a225a704c000ef06

[issue32103] Inconsistent text at TypeError in concatenation

2017-11-21 Thread Carl
New submission from Carl : >>> a = b"jan" >>> b = "jan" >>> a+b Traceback (most recent call last): File "", line 1, in TypeError: can't concat str to bytes >>> b+a Traceback (most recent call last): File "", line 1, in TypeError: must be str, not bytes >>> IMHO The

[issue32104] add method throw() to asyncio.Task

2017-11-21 Thread Yury Selivanov
Yury Selivanov added the comment: > in order to write advanced Tasks there should be a way > to throw custom exceptions into active Task. > so it can react accordingly. What is an "advanced" task? Why CancelledError is not enough? What's the actual use case?

[issue27535] Memory leaks when opening tons of files

2017-11-21 Thread Jonathan Bastien-Filiatrault
Jonathan Bastien-Filiatrault added the comment: @vstinner Yes, from what I saw, the leak was from the registry / deduplication logic. -- ___ Python tracker

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-21 Thread Decorater
Decorater added the comment: If it was me I would store the warning registry in an error log or something in the current directory that ran python itself. (maybe something like ``[main script name].log``? This way it generates the warnings like usual and does not eat

[issue31299] Add "ignore_modules" option to TracebackException.format()

2017-11-21 Thread Dmitry Kazakov
Change by Dmitry Kazakov : -- pull_requests: -3274 ___ Python tracker ___ ___