[issue24488] ConfigParser.getboolean fails on boolean options

2015-06-22 Thread Andreas Hilboll
New submission from Andreas Hilboll: Not sure if this is by design (or if I'm doing something utterly stupid), but I often create a ConfigParser object for my application and then pass this around (or make it global). So when I do something like cfg.set(input_filter, include_filtered,

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Naftali
On Friday, June 19, 2015 at 1:25:12 PM UTC-4, Naftali wrote: It actually doesn't fail but it 'cannot open in protected mode' (see here http://blogs.adobe.com/dmcmahon/2012/07/27/adobe-reader-cannot-open-protected-mode-due-to-a-problem-with-your-system-configuration/) I am using

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7a0a1a4ac639 by Yury Selivanov in branch '3.5': Issue #24400: Introduce a distinct type for 'async def' coroutines. https://hg.python.org/cpython/rev/7a0a1a4ac639 New changeset 44253ce374fc by Yury Selivanov in branch 'default': Issue #24400: Merge

[issue24488] ConfigParser.getboolean fails on boolean options

2015-06-22 Thread R. David Murray
R. David Murray added the comment: In python3 you will get an error: TypeError: option values must be strings. So, this is an infelicity in the configparser API. Or, rather, I presume it is a design decision (ie: python shouldn't guess what string format you want the value to have in the

[issue24462] bytearray.find Buffer Over-read

2015-06-22 Thread DmitryJ
DmitryJ added the comment: Attached please find a patch against the 2.7 branch. CPython built with the patch passes the tests from the test suite. Unfortunately, as there is not much control over memory allocation, there is no 100% reliable test case that would allow for reproducing the

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-22 Thread paul j3
paul j3 added the comment: To wrap this up, the correct way to specify that 2 or more positionals share a 'dest' is to supply that dest as the first parameter. If the help should have something else, use the `metavar`. import argparse parser = argparse.ArgumentParser()

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, Martin, Stefan, thanks to all of you for the code review! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400

[issue3905] subprocess failing in GUI applications on Windows

2015-06-22 Thread Boris
Boris added the comment: Probably the same issue: everything works when called from command line, but when called via a desktop shortcut I get ... _winapi.DUPLICATE_SAME_ACCESS) OSError: [WinError 6] The handle is invalid Changing pythonw to python solved the problem. ...this could be

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Martin, I believe this was done as part of issue24180, see this commit https://hg.python.org/cpython/rev/9d9e445d25dc -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like this is a regression in 3.5. -- priority: normal - release blocker stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___

Re: CRLF problems in CPython sources

2015-06-22 Thread Rustom Mody
On Monday, June 22, 2015 at 2:53:21 PM UTC, Zachary Ware wrote: On Monday, June 22, 2015, Rustom Mody wrote: Trying to setup CPython repo I found some CRLF messes: 1. Some file-types that are inconsistently LF or CRLF    Lib/test/decimaltestdata 2. Some files that are plain

CRLF problems in CPython sources

2015-06-22 Thread Rustom Mody
Trying to setup CPython repo I found some CRLF messes: 1. Some file-types that are inconsistently LF or CRLF Lib/test/decimaltestdata 2. Some files that are plain dirty (both LF and CRLF) Lib/venv/scripts/nt/Activate.ps1 Is this worth a bug report? Is python-dev the place for talking of

Re: CRLF problems in CPython sources

2015-06-22 Thread Zachary Ware
On Monday, June 22, 2015, Rustom Mody rustompm...@gmail.com wrote: Trying to setup CPython repo I found some CRLF messes: 1. Some file-types that are inconsistently LF or CRLF Lib/test/decimaltestdata 2. Some files that are plain dirty (both LF and CRLF)

Re: Arguments for type metaclass __init__ method

2015-06-22 Thread Chris Angelico
On Mon, Jun 22, 2015 at 1:17 AM, Kaviraj Kanagaraj kavi...@launchyard.com wrote: To dynamically create a class: DynamicClass = type(DynamicClass, (object,), {'eggs' : 'spams'}) which means type's __init__ method accepts ClassName, bases(tuple) and attrbs(dict) as args. But in case of

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- resolution: not a bug - out of date stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list

[issue24439] Feedback for awaitable coroutine documentation

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Martin, I've left you some feedback in the code review. * “async def” routines are allowed in addition to generators in asyncio (e.g. in Task constructor) Right. I think we need to add some code samples too. * Other awaitables are also accepted as

Re: Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-22 Thread Ian Kelly
On Mon, Jun 22, 2015 at 2:32 AM, Ben Powers ryexan...@gmail.com wrote: on Tue, Jun 16, 2015 at 17:49 Ian Kelly ian.g.kelly at gmail.com wrote On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers ryexander at gmail.com wrote: #file.py from PyitectConsumes import foo class Bar(object): def

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Larry Hastings
Larry Hastings added the comment: Patch doesn't build for me against current trunk: gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-statement -I. -IInclude -I./Include-DPy_BUILD_CORE -c

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My bad. I submitted the last patch without checking (rebuilding Python takes too much time on my slow netbook). Here is fixed and tested patch. -- Added file: http://bugs.python.org/file39773/clru_cache_known_hash_4.patch

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-22 Thread Zachary Ware
Zachary Ware added the comment: Actually, it looks like it's due to PEP 492: C:\Users\Zachary\code\hg.python.org\3.5hg bisect -b The first bad revision is: changeset: 96411:d1959cafc68c branch: 3.5 parent: 96407:e59966bb6de5 parent: 96410:b7b73029c825 user:Yury

Published timeDecebal.py

2015-06-22 Thread Cecil Westerhof
I published timeDecebal.py: https://github.com/CecilWesterhof/PythonLibrary/blob/master/timeDecebal.py Not much yet: the Timer class from Steven D'Aprano and the function time_test. With this function you can get the results of a function AND the time it took to execute the function. (I find

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I believe this change broke RFC 4954's AUTH command when the optional initial-response is expected. $4 The AUTH Command says: AUTH mechanism [initial-response] ... initial-response: An optional initial client response. If present, this response

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Here's a rough thought for a fix. Some auth_*() methods require a challenge, but some don't, e.g. auth_plain(). Let's allow authobject() to be called with challenge=None. If they allow an initial-response, then they can just return the response bytes. If

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Also, smtpd is not compatible with auth challenges because found_terminator() doesn't know that the response its getting isn't a command but instead a challenge response. So really we need another bug to track fixes to smtpd.py to handle challenge

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Zachary, This is extremely strange. The test doesn't even start the loop, it only creates it, and prints out what 'get_debug' says. It can't be 'sys.set_coroutine_wrapper' either, as it's only called when a loop is running, or when it's about to

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-22 Thread py.user
py.user added the comment: Tested on argdest.py: #!/usr/bin/env python3 import argparse parser = argparse.ArgumentParser() parser.add_argument('x', action='append') parser.add_argument('x', action='append_const', const=42, metavar='foo') parser.add_argument('x', action='append_const',

Re: Calling a function is faster than not calling it?

2015-06-22 Thread Piet van Oostrum
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Why is calling a function faster than bypassing the function object and evaluating the code object itself? And not by a little, but by a lot? Here I have a file, eval_test.py: # === cut === from timeit import Timer def func():

[issue21935] Implement AUTH command in smtpd.

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Martin says: I cannot see any particular circumstances where unencrypted passwords for smtpd would be acceptable, given that there are perfectly established technologies. So I remain -1 on this patch. Here's a use case: a testing SMTP server, such as

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-22 Thread koobs
koobs added the comment: Observed the following test_smtplib failure on koobs-freebsd10, noting that the timeout parameter is still 3 test test_smtplib failed -- Traceback (most recent call last): File /usr/home/buildbot/python/2.7.koobs-freebsd10/build/Lib/test/test_smtplib.py, line 222,

Re: JSON Object to CSV File Troubleshooting

2015-06-22 Thread Chris Angelico
On Mon, Jun 22, 2015 at 9:33 AM, Denis McMahon denismfmcma...@gmail.com wrote: This is the sort of data conversion code I generally turn out in a day or so, it's hardly rocket science as long as you have a clear description of what is required. If you don't have a clear description of what is

[issue24325] Speedup types.coroutine()

2015-06-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +asvetlov, haypo, vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24325 ___ ___

Re: How do I get the currently installed tab completion function?

2015-06-22 Thread Chris Angelico
On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano st...@pearwood.info wrote: How do I get the currently installed completer? Solutions for any version of Python acceptable, but if they work all the way back to 2.4 or older, even better. Whether there's a way to avoid the whole try/finally I

[issue24412] setUpClass equivalent for addCleanup

2015-06-22 Thread Akshit Khurana
Changes by Akshit Khurana axitkhur...@gmail.com: -- nosy: +axitkhurana ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24412 ___ ___

[issue24379] operator.subscript

2015-06-22 Thread Joe Jevnik
Joe Jevnik added the comment: Based on some discussion on python-ideas, this is being renamed to operator.subscript. Here is the patch that makes the correct the changes to move this object into the operator module. -- components: +Extension Modules -Interpreter Core title:

Re: Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Travis Griggs
I should proof my posts before I send them, sorry Subject nearly says it all. If i’m using pathlib, what’s the simplest/idiomatic way to simply count how many files are in a given directory? I was surprised (at first) when len(self.path.iterdir()) didn’t work. I don’t see anything in the

Re: Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Ian Kelly
On Mon, Jun 22, 2015 at 4:33 PM, Travis Griggs travisgri...@gmail.com wrote: I should proof my posts before I send them, sorry Subject nearly says it all. If i’m using pathlib, what’s the simplest/idiomatic way to simply count how many files are in a given directory? I was surprised (at

[issue24450] Add gi_yieldfrom calculated property to generator object

2015-06-22 Thread Yury Selivanov
Yury Selivanov added the comment: Please find attached a new patch that exposes 'cr_await' attribute on coroutine objects. I don't think we can merge 'gi_yieldfrom' in 3.5, but 'cr_await' should probably be fine. -- Added file: http://bugs.python.org/file39776/cr_await.patch

Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Travis Griggs
Subject nearly says it all. If i’m using pathlib, what’s the simplest/idiomatic way to simply count how many files are in a given directory? I was surprised (at first) when len(self.path.iterdir()) I don’t say anything on the in the .stat() object that helps me. I could of course do the

[issue24450] Add cr_await calculated property to coroutine object

2015-06-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- title: Add gi_yieldfrom calculated property to generator object - Add cr_await calculated property to coroutine object ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24450

How do I get the currently installed tab completion function?

2015-06-22 Thread Steven D'Aprano
I have two (or more) different types of tab completion, and I want one to apply under certain circumstances, and the other to apply at others. For example, let's say I want one to apply inside a function which uses raw_input (or input in Python 3), and the other to apply the rest of the time. So

[issue24420] Documentation regressions from adding subprocess.run()

2015-06-22 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24420 ___ ___

[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()

2015-06-22 Thread Martin Panter
Martin Panter added the comment: Here is a patch: * Use different return value variable names and point out that they are encoded differently * Add another bullet point about signal handling * Fix os.system() documentation of the return value. My understanding is it is the C standard that

[issue24481] hotshot pack_string Heap Buffer Overflow

2015-06-22 Thread DmitryJ
Changes by DmitryJ ga...@tut.by: -- nosy: +dev_zzo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24481 ___ ___ Python-bugs-list mailing list

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Robin Becker
On 22/06/2015 11:33, Robin Becker wrote: . Naftali, I ran the following from python prompt for what it's worth this also works on my machine Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS C:\Users\rptlab cd tmp PS

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Robin Becker
. Naftali, I ran the following from python prompt import os os.system('C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe /n thello.pdf') and this worked as did import subprocess subprocess.Popen(['C:\Program Files (x86)\Adobe\Reader

[issue24439] Feedback for awaitable coroutine documentation

2015-06-22 Thread Martin Panter
Martin Panter added the comment: When I update my patch I can try updating the asyncio section. However I have only had limited experience with asyncio, so feel free to suggest things to add. Here is a list of things I think may need changing: * “async def” routines are allowed in addition to

rl_config

2015-06-22 Thread Robin Becker
Anyone wishing to bend their minds around instance as module can see the code I've tested on //annapurna/tmp/rl_config.py. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: rl_config

2015-06-22 Thread Robin Becker
On 22/06/2015 13:03, Robin Becker wrote: Anyone wishing to bend their minds around instance as module can see the code I've tested on //annapurna/tmp/rl_config.py. whoops misposted sorry -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list

Re: instance as module

2015-06-22 Thread Robin Becker
On 20/06/2015 08:24, Steven D'Aprano wrote: On Fri, 19 Jun 2015 07:29 pm, Robin Becker wrote: I'm trying to overcome a recursive import issue in reportlab. .. I'm afraid I don't understand what you are trying to say here. Why can't the user just set up such a default e.g.

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Larry Hastings
Larry Hastings added the comment: I can accept this change, but I don't like that code. Is it really considered acceptable to have that much copy-and-paste code in the dict implementation for KnownHash calls? Could the common code be split off into a Py_LOCAL_INLINE function? --

Re: Re: Pyitect - Plugin architectural system for Python 3.0+ (feedback?)

2015-06-22 Thread Ben Powers
on Tue, Jun 16, 2015 at 17:49 Ian Kelly ian.g.kelly at gmail.com wrote On Mon, Jun 8, 2015 at 10:42 PM, Ben Powers ryexander at gmail.com wrote: As importlib has been added in python 3 and up I decided to use it's abilities to create a plugin system for truly modular development in python.

Arguments for type metaclass __init__ method

2015-06-22 Thread Kaviraj Kanagaraj
Hi All, I was reading about meta programming in Pro Django book. I came across the type class which will be acting as default meta class for all other class. Also type metaclass is where actuall class object is created To dynamically create a class: DynamicClass = type(DynamicClass, (object,),

[issue24462] bytearray.find Buffer Over-read

2015-06-22 Thread DmitryJ
DmitryJ added the comment: I am preparing a patch for this issue, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24462 ___ ___

EuroPython 2015: Partner program deadline extended

2015-06-22 Thread M.-A. Lemburg
We have negotiated an extension of the deadline to register for the partner program tours with the local tour operator. *** EuroPython 2015 Partner Program *** https://ep2015.europython.eu/en/events/partner-program/ There is plenty to see in and around Bilbao. We have worked

[no subject]

2015-06-22 Thread John T. Haggerty
I'm looking to just have a simple program that will do a SQLite query pull a random record and then copy that record too the clipboard the system. I'm not quite seeing how to do this perhaps this is already been done elsewhere but I spent quite a bit of time trying to figure out how to do that and

Re: Do I need license to release the Python version of old BASIC games?

2015-06-22 Thread Laura Creighton
In a message of Sun, 21 Jun 2015 22:23:54 -0600, Michael Torrie writes: From some brief research, it appears there is some question about the ability to declare something to be in the public domain, but it is by no means a sure thing and lots of people feel it's just fine to declare something to

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Malthe Borch
New submission from Malthe Borch: Very simple to reproduce (see attachment). -- components: Library (Lib) files: test.py messages: 245621 nosy: malthe priority: normal severity: normal status: open title: Function source inspection fails on closures type: behavior versions: Python 3.5,

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Found my first 3.5 breakage which I think is due to this. from uuid import uuid4 '%.32x' % uuid4() -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995

Re: How to check in script if Python or Jython is used

2015-06-22 Thread Dan Stromberg
IMO, it's usually better to test for features and use them if they are present, than to build a list of features available in specific interpreters. I see it as analogous to the difference between huge C #ifdef's on OS, and autoconf. On Sun, Jun 21, 2015 at 1:12 AM, Cecil Westerhof

[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-22 Thread Evgeny Kapun
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___ ___

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Fix: '%.32x' % uuid4().int -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___ Python-bugs-list

what should every python expert know

2015-06-22 Thread baha
I don't like to move to another programming language until being guru .. (python is my first programming language) what are things that I must know and discover and understand more deeply what are the projects that can be useful for a beginner like me and the advanced tricks --

Re: what should every python expert know

2015-06-22 Thread Steven D'Aprano
On Tue, 23 Jun 2015 04:30 am, baha wrote: I don't like to move to another programming language until being guru .. (python is my first programming language) what are things that I must know and discover and understand more deeply what are the projects that can be useful for a beginner like me

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Martin Panter
Martin Panter added the comment: There are a few references left in that revision. For instance https://docs.python.org/3.5/library/asyncio-task.html#coroutines still suggests scheduling a coroutine by calling async(). But depending on the context this may cause a syntax error in 3.5, so I

Re: Simplest/Idiomatic way to count files in a directory (using pathlib)

2015-06-22 Thread Paul Rubin
Travis Griggs travisgri...@gmail.com writes: The following seems to obtuse/clever for its own good: return sum(1 for _ in self.path.iterdir()) I've generally done something like that. I suppose it could be added to itertools. -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I get the currently installed tab completion function?

2015-06-22 Thread Steven D'Aprano
On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote: On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano st...@pearwood.info wrote: How do I get the currently installed completer? Solutions for any version of Python acceptable, but if they work all the way back to 2.4 or older, even better.

[issue24379] operator.subscript

2015-06-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is C implementation needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list

[issue24379] operator.subscript

2015-06-22 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.r ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
New submission from sih4sing5hong5: Because VALID_MODULE_NAME is r'[_a-z]\w*\.py$' in unittest/loader.py. Using r'[^\W\d]\w*\.py$' insteaded. -- keywords: +patch title: Why VALID_MODULE_NAME in unittest/loader.py is r'[_a-z]\w*\.py$' not r'\w+\.py$' ? - unittest cannot load module

[issue24450] Add cr_await calculated property to coroutine object

2015-06-22 Thread Nick Coghlan
Nick Coghlan added the comment: Guido indicated on python-dev that he considered it reasonable to view adding gi_yieldfrom as part of the PEP 492 implementation: https://mail.python.org/pipermail/python-dev/2015-June/140498.html That perspective makes sense to me as well, since it preserves

Re: How do I get the currently installed tab completion function?

2015-06-22 Thread Chris Angelico
On Tue, Jun 23, 2015 at 11:41 AM, Steven D'Aprano st...@pearwood.info wrote: On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote: On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano st...@pearwood.info wrote: How do I get the currently installed completer? Solutions for any version of Python

Re: How do I get the currently installed tab completion function?

2015-06-22 Thread Steven D'Aprano
On Tue, 23 Jun 2015 12:02 pm, Chris Angelico wrote: On Tue, Jun 23, 2015 at 11:41 AM, Steven D'Aprano st...@pearwood.info wrote: On Tue, 23 Jun 2015 11:23 am, Chris Angelico wrote: On Tue, Jun 23, 2015 at 11:02 AM, Steven D'Aprano st...@pearwood.info wrote: How do I get the currently

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread Robert Collins
Robert Collins added the comment: Are the module names valid in import statements? it would help if you could perhaps attach a little tar/zip file with an example failure. -- ___ Python tracker rep...@bugs.python.org

[issue24379] operator.subscript

2015-06-22 Thread Joe Jevnik
Joe Jevnik added the comment: I just moved it over since I implemented it for slice originally, I can drop the C implementation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
sih4sing5hong5 added the comment: There is an attached file for examples. I ran {{{ cd test_dir python -m unittest -v }}} and got Ran 1 test in 0.000s -- Added file: http://bugs.python.org/file39779/test_dir.tar.gz ___ Python tracker

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
sih4sing5hong5 added the comment: By the way, I ran with Python 3.4.0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___ ___

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy's code looks like the cleanest way to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24483 ___

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Naftali
On Friday, June 19, 2015 at 1:25:12 PM UTC-4, Naftali wrote: It actually doesn't fail but it 'cannot open in protected mode' (see here http://blogs.adobe.com/dmcmahon/2012/07/27/adobe-reader-cannot-open-protected-mode-due-to-a-problem-with-your-system-configuration/) I am using

Re: Issuing a sqilte query, picking a random result, and copying to the system clipboard

2015-06-22 Thread Tim Chase
On 2015-06-21 17:08, John T. Haggerty wrote: I'm looking to just have a simple program that will do a SQLite query pull a random record and then copy that record too the clipboard the system. I'm not quite seeing how to do this perhaps this is already been done elsewhere but I spent quite a

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-22 Thread Julien Palard
New submission from Julien Palard: Requesting HTTP using `requests`, which uses `http.client` which use `socket`, sometimes, my program get stuck like this: ``` File /usr/lib/python3.2/socket.py, line 287 in readinto File /usr/lib/python3.2/http/client.py, line 308 in _read_status File

[issue23377] HTTPResponse may drop buffer holding next response

2015-06-22 Thread Martin Panter
Martin Panter added the comment: Minor update based on Demian’s review -- Added file: http://bugs.python.org/file39769/http-buffer.v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23377

[issue24465] Make tarfile have deterministic sorting

2015-06-22 Thread Sam Thursfield
Sam Thursfield added the comment: Here's a patch which does the same thing but only for shutil.make_archive(). Note that the final output will still be non-deterministic if you use format=gztar because time.time() and the base_name argument get added to the gzip header. Might be nice to add

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Laura Creighton
I think that your problem is that you have Protected Mode enabled. If you do, you either have to disable that, or write a policy config file. https://www.adobe.com/devnet-docs/acrobatetk/tools/AppSec/protectedmode.html says. From: Policy configuration Protected mode prevents a number of actions

[issue24485] Function source inspection fails on closures

2015-06-22 Thread bkcsfi sfi
Changes by bkcsfi sfi bkc...@gmail.com: -- nosy: +bkcsfi sfi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list mailing

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-22 Thread Jorge Herskovic
Jorge Herskovic added the comment: This happens reliably between 1-5% of the time on my home Mac (a 4.0 GHz i7). My work Mac Pro, a lot slower, doesn't exhibit this behavior on the same 3.4.3 interpreter. Could it be related to a concurrency issue in the interpreter? We're attempting to

[issue10399] AST Optimization: inlining of function calls

2015-06-22 Thread Mark Lawrence
Mark Lawrence added the comment: I get the impression that there's a lot to be gained here, especially when compared to some of the micro-optimizations that are committed. Can we resurrect this, perhaps by taking it up on python-dev? Also msg121082 refers to a Globals cache patch posted on

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-22 Thread Martin Panter
Martin Panter added the comment: You did not mention if the HTTP connection has a timeout set. If no timeout is set, it will block until the server sends or closes the connection. The timeout sets how long the socket spends “checking if data is available” before giving up. -- nosy:

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Martin Panter
New submission from Martin Panter: The async() function is marked as deprecated in 3.4.4. This patch replaces most references to it with references to ensure_future(). The exception is https://docs.python.org/3.4/library/asyncio-eventloop.html#asyncio.BaseEventLoop.create_task, which suggests

Re: Opening PDF Using subprocess.Popen Failing

2015-06-22 Thread Naftali
On Friday, June 19, 2015 at 1:25:12 PM UTC-4, Naftali wrote: It actually doesn't fail but it 'cannot open in protected mode' (see here http://blogs.adobe.com/dmcmahon/2012/07/27/adobe-reader-cannot-open-protected-mode-due-to-a-problem-with-your-system-configuration/) I am using