[issue14373] C implementation of functools.lru_cache

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that adds __get__ for lru_cache object. -- Added file: http://bugs.python.org/file39646/clru_cache_descr_get.patch ___ Python tracker

[issue24393] Test urllib2_localnet fails depending on host proxy configuration

2015-06-06 Thread Ned Deily
Changes by Ned Deily : -- nosy: +orsenthil stage: -> patch review versions: +Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker ___ __

[issue18576] Document test.support.script_helper

2015-06-06 Thread Nick Coghlan
Nick Coghlan added the comment: As far as using docstrings for the online docs goes, there are some useful Sphinx add-ons that we've never enabled for the main Python docs (like autodoc, blockdiag, seqdiag) that could be good options to have available. For autodoc in particular, we prefer to a

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-06 Thread Ben Darnell
New submission from Ben Darnell: The new collections.abc.Awaitable ABC relies on __instancecheck__, which makes it incompatible with functools.singledispatch (singledispatch works based on args[0].__class__; any instance-level information is discarded). This surprised me because the first thin

[issue24392] pop functioning

2015-06-06 Thread Padmanabhan Tr
Padmanabhan Tr added the comment: Dear StevenThank you.  I am clear now.Padmanabhan On Saturday, June 6, 2015 5:12 PM, Steven D'Aprano wrote: Steven D'Aprano added the comment: The behaviour is correct, this is not a bug. Each time you pop from aa, the following items move down one sp

[issue24397] Test asynchat makes wrong assumptions

2015-06-06 Thread R. David Murray
R. David Murray added the comment: (Calling that variable 'buffer' is a bit misleading...it isn't really a buffer that gets filled, it is an immutable bytes object that gets replaced by a new one with the additional received data appended.) -- ___ P

[issue24397] Test asynchat makes wrong assumptions

2015-06-06 Thread R. David Murray
R. David Murray added the comment: Your emendation doesn't seem to do anything differently (logic wise) than the original code. Unless I am missing something, it is pointless to track the length of the buffer separately from the contents of the buffer. The buffer knows its length. -

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread R. David Murray
R. David Murray added the comment: The pkguitil.get_data function is the *right* way to access package-relative data (because in the general case the data may not be on the file system), and IMO it would not be a good idea to make it easier to do things the "wrong" way. Any deficiencies with

[issue14586] TypeError: truncate() takes no keyword arguments

2015-06-06 Thread Martin Panter
Martin Panter added the comment: See also Issue 23738 and PEP 457 for fixing the documentation instead, possibly something like truncate(size=None, /). Also, Issue 17003 has changed some of the keywords to be more consistent, making parts of this patch incorrect. -- nosy: +vadmium ___

[issue18576] Document test.support.script_helper

2015-06-06 Thread Martin Panter
Martin Panter added the comment: If you diffed your patch from a public revision in the main repository, there should be a nice “Review” link. Anyway, here are some comments on issue18576.patch: +.. function:: assert_python_ok(*args, **env_vars) + + Runs the interpreter with *args* and optio

[issue24252] IDLE removes elements from tracebacks.

2015-06-06 Thread ppperry
ppperry added the comment: Another example of this overzealous removing is when you create a module named rpc, run, RemoteDebugger, or bdb. For example (in this environment, a file in the current directory named rpc.py exists and refers to the undefined name "bar"): >>>import rpc Traceback (mo

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Martin Panter
Martin Panter added the comment: There is also pkgutil.get_data(), but that returns the file contents rather than file path, which has rarely been useful to me. -- ___ Python tracker __

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Martin Panter
Martin Panter added the comment: This feature could be handy for finding test files in test suites. However I don’t think the abspath() step is necessary. We kind of want a urljoin() for OS paths, that automatically removes the current file name. As a new feature I think it would be too late

[issue24252] IDLE removes elements from tracebacks.

2015-06-06 Thread ppperry
ppperry added the comment: Is there any reason why the end of the traceback, rather then just the beginning, needs to be pruned in the first place? Additionally, the "search for pdb in the tb" method will still undesirably prune the traceback if someone invents there own buggy debugger that su

[issue23981] Update test_unicodedata.py to use script_helpers

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> patch review versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list U

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

2015-06-06 Thread Christie
Changes by Christie : -- nosy: +berker.peksag, ezio.melotti, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23981] Update test_unicodedata.py to use script_helpers

2015-06-06 Thread Christie
Changes by Christie : -- nosy: +berker.peksag, ezio.melotti, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue24398] Update test_capi to use test.support.script_helper

2015-06-06 Thread Christie
Christie added the comment: I can't seem to get test_no_FatalError_infinite_loop to fail - I tried reverting the fix that this was verifying, but the test still passed and no infinite loop to be seen. I'm wondering if this is because I can't reproduce it on a mac. --

[issue18576] Document test.support.script_helper

2015-06-06 Thread Christie
Christie added the comment: @ncoghlan I've taken the test.rst changes from the previous diff and reviewed them against the latest script_helper (including updates from issue24033). Nothing had fallen behind, but I've added what was missing. * I've realized that spawn_python and the helper run_

[issue24033] Update _test_multiprocessing.py to use script helpers

2015-06-06 Thread Christie
Christie added the comment: run_python and spawn_python are basically the same, I need to reconcile those. -- ___ Python tracker ___ _

[issue14373] C implementation of functools.lru_cache

2015-06-06 Thread Tim Graham
Tim Graham added the comment: This changed caused a problem in Django's test suite (bisected to 0d0989359bbb0). File "/home/tim/code/django/django/db/models/options.py", line 709, in _populate_directed_relation_graph all_models = self.apps.get_models(include_auto_created=True) TypeError:

[issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7

2015-06-06 Thread Nathan Ringo
Nathan Ringo added the comment: The problem is, existing software (Ansible) relies on linux_distribution() -- ___ Python tracker ___ _

[issue20454] platform.linux_distribution() returns empty value on Archlinux and python 2.7

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +Nathan Ringo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue24399] Backports Arch Linux support for platform.linux_distribution()

2015-06-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 20454. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> platform.linux_distribution() returns empty value on Archlinux and python 2.7 ___

[issue24399] Backports Arch Linux support for platform.linux_distribution()

2015-06-06 Thread Nathan Ringo
New submission from Nathan Ringo: On Arch Linux, running `python2 -c "import platform; print platform.linux_distribution()"' Before patch: ('', '', '') After patch: ('arch', 'Arch', 'Linux') This matches the Python 3 behavior: `python3 -c "import platform; print(platform.linux_distribution())"

[issue24398] Update test_capi to use test.support.script_helper

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

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

2015-06-06 Thread Christie
Christie added the comment: Created issue24398 for updating test_capi. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue24393] Test urllib2_localnet fails depending on host proxy configuration

2015-06-06 Thread Étienne Buira
Étienne Buira added the comment: Patch was for 2.7 Hunks about no_proxy are also relevant for other branches. -- versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___

[issue24397] Test asynchat makes wrong assumptions

2015-06-06 Thread Étienne Buira
New submission from Étienne Buira: Amount of data the server could not send back is not a reliable indication on how much data it received. -- components: Tests files: test_asynchat_check_received_len_if_received_len_matters.diff keywords: patch messages: 244922 nosy: eacb priority: nor

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24396] Provide convenience function for paths relative to the current module

2015-06-06 Thread Madison May
New submission from Madison May: I often find myself trying to access a file relative to the module I'm working on. When this occurs, I'll often use something like the following: ``` os.path.abspath(os.path.join(os.path.dirname(__file__), "data/resource.pkl")) ``` I have good reason to believ

[issue24255] Replace debuglevel-related logic with logging

2015-06-06 Thread Eryn Wells
Eryn Wells added the comment: Hi. This is my first issue, but I'd be willing to have a go at updating this module. Do either of you have specific ideas about what changes you want here? My thought was to import logging, create a logger object, and start by replacing all the self.debuglevel st

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Mark Lawrence
Mark Lawrence added the comment: This strikes me as pointless code churn. -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch. Now the repr always starts with the qualified class name. But there is other question. Should reprs be consistent with reprs of corresponding classes in multiprocessing and asyncio modules? In multiprocessing: In asyncio:

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Eric Snow
Eric Snow added the comment: This has been fixed in issue24368. The fix came just after the beta 2 release. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Some C OrderedDict methods need to support keyword arguments.

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks! A few comments: * New features like this can only go into Python 3.6 (the "default" branch) * The CLI is partially tested (see Lib/test/test_webbrowser.py). You'll need to add additional tests (e.g. add tests for the -t and -h options) * It would be nic

[issue24195] Add `Executor.filter` to concurrent.futures

2015-06-06 Thread Ram Rachum
Ram Rachum added the comment: A problem I just realized with Brian's 2-line implementation of `filter`: It doesn't work for iterables which aren't sequences, since it attempts to exhaust the iterable twice. So if you have a non-sequence you'll have to make it into a sequence first. --

[issue24395] webbrowser.py update to use argparse.py

2015-06-06 Thread Hasan Diwan
New submission from Hasan Diwan: The webbrowser module uses getopt, which needs to be ripped out and replaced with argparse. The attached file does just this. -- components: Library (Lib) files: webbrowser.py messages: 244913 nosy: Hasan Diwan, georg.brandl priority: normal severity: no

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the module name is useful, since there are also multiprocessing events and semaphores. Also, Event is a fairly generic name which may be used in other contexts (e.g. GUI libraries). "set" and "unset" sound good to me. -- _

[issue14586] TypeError: truncate() takes no keyword arguments

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue24391] Better repr for threading objects

2015-06-06 Thread Larry Hastings
Larry Hastings added the comment: FWIW I find "unset" more obvious. I don't think it needs the module name. -- ___ Python tracker ___ ___

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would following reprs good? (what is better: "unset" or "clear"?) Should the repr contain the module name ()? -- ___ Python tracker ___ _

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Library (Lib) nosy: +eric.snow, rhettinger type: -> behavior versions: +Python 3.5, Python 3.6 ___ Python tracker ___ _

[issue18003] lzma module very slow with line-oriented reading.

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: bz2 will gain great benefit from such optimization too. Microbenchmark results: $ ./python -m timeit -s "import gzip" -- "f=gzip.GzipFile('words.gz', 'r')" "for line in f: pass" 2.7: 10 loops, best of 3: 374 msec per loop 3.2:

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Ram Rachum
Ram Rachum added the comment: I'm seeing a similar problem with `move_to_end` and its `last` keyword argument. -- ___ Python tracker ___ _

[issue24391] Better repr for threading objects

2015-06-06 Thread Larry Hastings
Larry Hastings added the comment: I'll allow it. But I agree with Brett, I really would prefer that the type be the first thing in the repr. I'd rather fix the lock objects than compound our error. -- ___ Python tracker

[issue24394] TypeError: popitem() takes no keyword arguments

2015-06-06 Thread Ram Rachum
New submission from Ram Rachum: Python 3.5.0b2 (v3.5.0b2:7a088af5615b, May 31 2015, 06:22:19) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import collections

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'd like to see this in 3.5. This is a no-brainer improvement and has very little chance of breaking anything compared to a new OrderedDict implementation. -- nosy: +larry versions: +Python 3.5 ___ Python tracker

[issue24391] Better repr for threading objects

2015-06-06 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue18003] lzma module very slow with line-oriented reading.

2015-06-06 Thread Larry Hastings
Larry Hastings added the comment: A small last-minute optimization is not a release-blocker. -- priority: release blocker -> normal ___ Python tracker ___ ___

[issue24391] Better repr for threading objects

2015-06-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: +1. The patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18003] lzma module very slow with line-oriented reading.

2015-06-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is for consistency with reprs of lock objects (issue21137): -- ___ Python tracker ___ __

[issue24393] Test urllib2_localnet fails depending on host proxy configuration

2015-06-06 Thread Étienne Buira
New submission from Étienne Buira: test_urllib2_localnet make non-explicit use of host configured http_proxy and no_proxy, that will fail the test depending on their contents. -- components: Tests files: test_urllib2_localnet_proxy_conf.diff keywords: patch messages: 244901 nosy: eacb p

[issue24391] Better repr for threading objects

2015-06-06 Thread Brett Cannon
Brett Cannon added the comment: While I like the concept, I don't like the reprs where the type is not the first thing listed, e.g., "set Event" not having "Event" first. The default repr and typical practice of having the type come first makes my brain initially read that repr as a "set of Ev

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2015-06-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The glob module is not affected because it ignores all OSErrors (including "Permission denied" and "Too many levels of symbolic links"). >>> import glob >>> glob.glob('**/*', recursive=True) ['dir2/file1', 'dir2/file2', 'dir2/dir3', 'dir1/file1', 'dir1/file2'

[issue24392] pop functioning

2015-06-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: The behaviour is correct, this is not a bug. Each time you pop from aa, the following items move down one space. Then, the next time you pop, the items have moved: ['a0', 'b1', 'c2', 'd3', 'e4', 'f5', 'g6', 'h7', 'i8', 'j9', 'k10', 'l11'] d3 is the third item

[issue24392] pop functioning

2015-06-06 Thread Padmanabhan Tr
New submission from Padmanabhan Tr: I have attached the python sequence & my comments. I use Python version 3.4.2 I guess a bug need be corrected -- components: Regular Expressions files: bug_a messages: 244897 nosy: Padmanabhan.Tr, ezio.melotti, mrabarnett priority: normal severity: nor

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file39637/threading_objects_reprs.patch ___ Python tracker ___ __

[issue24391] Better repr for threading objects

2015-06-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds makes reprs of threading objects Semaphore, BoundedSemaphore, Event, and Barrier expose their public states. This will help for debugging. Examples: -- components: Library (Lib) messages: 244896 nosy: berker.peksag, bre

[issue24383] consider implementing __await__ on concurrent.futures.Future

2015-06-06 Thread Stefan Behnel
Stefan Behnel added the comment: (Copying my review comment here so that it doesn't get lost as it's more of a general design thing than a specific review comment.) Having Future know and deal with asyncio seems wrong to me. asyncio should be able to deal *somehow* with a Future that is being

[issue24390] Python 3.4.3 64 bits is not "high dpi aware"

2015-06-06 Thread Ivan Bykov
New submission from Ivan Bykov: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> SM_CYSCREEN = 1 >>> from ctypes import windll >>> GetSystemMetrics = windll.user32.GetSystemMetrics