Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Jean-Michel Pichavant
Just to update, you are correct, Chris, the file short name is passed into sys.argv. didn't need to add anything to the path. But a gotcha -- Windows didn't like my .py, clicking on the pdf causes Windows to complain about 'file x' is not a valid windows executable. I'm not an expert of

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Chris Angelico
On Wed, Jun 24, 2015 at 12:26 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Just to update, you are correct, Chris, the file short name is passed into sys.argv. didn't need to add anything to the path. But a gotcha -- Windows didn't like my .py, clicking on the pdf causes Windows to

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

2015-06-23 Thread sih4sing5hong5
sih4sing5hong5 added the comment: Thank you. I updated my patch in `VALID_MODULE_NAME.patch`. -- Added file: http://bugs.python.org/file39789/VALID_MODULE_NAME.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263

[issue2406] Improvement suggestions for the gzip module documentation

2015-06-23 Thread Jakub Kadlčík
Jakub Kadlčík added the comment: Hello, I think the example code snippets are awesome and no doubts, they helped me a lot. The only problem is that they are not idiomatic. They look like C more than Python. I suggest following patch -- nosy: +FrostyX Added file:

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f4b066754c3 by Antoine Pitrou in branch '2.7': Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). https://hg.python.org/cpython/rev/9f4b066754c3 -- ___ Python tracker

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

2015-06-23 Thread sih4sing5hong5
Changes by sih4sing5hong5 ihc...@gmail.com: Removed file: http://bugs.python.org/file39778/VALID_MODULE_NAME.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread STINNER Victor
STINNER Victor added the comment: On Python 3.5 and 3.6, You can use math.inf and math.nan. The patch is for 3.4. Ok, it confirms my guess. But when you merge your change into 3.5, you may replace nan and inf with math.nan and math.inf. As you want. --

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread STINNER Victor
STINNER Victor added the comment: polar_errno.patch doesn't apply cleanly on the default branch, I get that you wrote your patch for Python 3.4. +@cpython_only +def test_polar_errno(self): +# Check a previously set C errno doesn't disturb polar() Please add the number of this

[issue24439] Feedback for awaitable coroutine documentation

2015-06-23 Thread Martin Panter
Martin Panter added the comment: Here is a patch with more improvements to the coroutine documentation, including: * Remove expansion of “coroutine” glossary to include generators; it was not my original intention of this bug. Perhaps this can be dealt with separately in Issue 24087 if other

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 70e3230c2872 by Antoine Pitrou in branch '3.4': Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar(). https://hg.python.org/cpython/rev/70e3230c2872 New changeset d165712b2dee by Antoine Pitrou in branch '3.5': Issue #24489:

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: On Python 3.5 and 3.6, You can use math.inf and math.nan. The patch is for 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24489 ___

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

2015-06-23 Thread Martin Panter
Martin Panter added the comment: The closest I have is Python 3.3, but this times out properly for me: from http.client import HTTPConnection import socket socket.setdefaulttimeout(10) h = HTTPConnection(192.168.1.84) h.request(GET, /) h.getresponse() Traceback (most recent call last):

[issue22032] Use __qualname__ together with __module__

2015-06-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: FWIW, this broke the zope.testing doctests: https://bugs.launchpad.net/zope.testing/+bug/1467644 I submitted a patch, which was reasonable given the normalization that zope.testing does for doctest output, but people should be aware that this can break

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

2015-06-23 Thread Felix Yan
On 06/22/2015 07:51 PM, Tim Chase wrote: On Win32, you'd need the Win32 add-on libraries to shove things onto the clipboard, while under X, you'd need other facilities (either using Tkinter or piping to something like xclip(1)), and yet another way of doing things on MacOS. Or you may want an

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, pushed it! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24489 ___

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-23 Thread Jorge Herskovic
Jorge Herskovic added the comment: More data: I've been unable to replicate this behavior on Ubuntu 15.04 on Python 3.4.3 over ~20 thousand test runs. (Same machine, running in a VM) An overnight repeated run on the original machine on OS X, 3.4.3, official distribution gave an actual

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Naftali
On Thursday, June 18, 2015 at 5:05:15 PM UTC-4, Naftali wrote: Long time lurker. I'm looking to register a python script as the default pdf reader for windows. I assume I can just register the .py in the section windows section for registering default handlers, but I'm wondering how to

[issue24490] DeprecationWarning hidden even after warnings.filterwarnings('always') called

2015-06-23 Thread Jakub Mateusz Kowalski
New submission from Jakub Mateusz Kowalski: The error occurs when there was a warning before the call to filterwarnings(): $ python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits or license for more information. import warnings

[issue24458] Documentation for PEP 489

2015-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Leaving the tutorial alone until the callback problem is resolved makes sense to me. The patch overall looks good, I sent a few more detailed comments via Rietveld. -- ___ Python tracker rep...@bugs.python.org

[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python

2015-06-23 Thread Nathan Jensen
Nathan Jensen added the comment: Is it possible to get the license issues resolved and get this fixed in 2.7.11 since that's the last 2.7 release that is currently scheduled? -- nosy: +Nathan Jensen ___ Python tracker rep...@bugs.python.org

[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python

2015-06-23 Thread Steve Dower
Steve Dower added the comment: That's two separate questions: Is it possible to get the license issues resolved AFAICT they are resolved. Go ahead and copy the relevant code from setuptools. get this fixed in 2.7.11 Why do you need/want to build without setuptools? --

Re: HOPE: A Python just-in-time compiler for astrophysical computations

2015-06-23 Thread Laurent Pointal
Mark Lawrence wrote: Another beasty I've just stumbled across which you may find interesting http://www.sciencedirect.com/science/article/pii/S2213133714000687 Why use a JIT complation when you could use some C++ generation then compilation as Python module, like with Pythran ?

To write headers once with different values in separate row in CSV

2015-06-23 Thread Sahlusar
I have the following script for writing out to CSV two items in a list to a CSV in such a format, such that if we have: L = [('A', 1), ('B', 2), ('C', 3), ('D', 4),('A', 5), ('B', 6), ('D', 8)] we want A B C D 1 2 3 4 5 6 8 And with this L = [('A', 1), ('B', 2), ('C', 3), ('D', 4),('D',

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +brett.cannon, eric.snow, ethan.furman, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24491] inspect.getsource can't get source code if provided function isn't from a file

2015-06-23 Thread Zorceta
New submission from Zorceta: Both python.exe and IDLE can't. IPython is able to, as it inserts REPL input into linecache. -- messages: 245694 nosy: zorceta priority: normal severity: normal status: open title: inspect.getsource can't get source code if provided function isn't from a

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: Added file: http://bugs.python.org/file39791/test_case.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Armin Rigo
New submission from Armin Rigo: A regression in 3.5: if we use custom objects as modules (like some projects do), then these custom objects may not have an attribute called __name__. There is new code in 3.5 added for issue #17636 which tries sometimes to read the __name__ of a module when

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

2015-06-23 Thread Terry Reedy
On 6/22/2015 9:32 PM, Paul Rubin wrote: 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 disagree. For one who understands counting and Python, this is a direct way to define the count of a

Re: method returns object reference

2015-06-23 Thread Ian Kelly
On Tue, Jun 23, 2015 at 12:32 PM, Tim jtim.arn...@gmail.com wrote: The code below prints the following two lines, showing how the 'newkey' is now inside the Client response, even though it was set in the worker. This must be bad practice! In my real code, the response is no longer an

[issue19235] Add a dedicated subclass for recursion errors

2015-06-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi levkivs...@gmail.com: -- nosy: +levkivskyi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19235 ___ ___ Python-bugs-list

Re: To write headers once with different values in separate row in CSV

2015-06-23 Thread Saran Ahluwalia
It was an XML formatting issue; apparently you have to explicitly call a delimiter via the Command Prompt on my OS. IPython Notebook seems to make certain assumptions regarding read and write. On Tue, Jun 23, 2015 at 3:12 PM, John Gordon gor...@panix.com wrote: In

method returns object reference

2015-06-23 Thread Tim
I spent a while finding this problem which looks something like the old mutable default argument problem. http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments I'm not crystal clear on the details, but once I found it, the fix was easy. I'm posting here just because

Re: To write headers once with different values in separate row in CSV

2015-06-23 Thread John Gordon
In c0ea6bec-b6b1-48fd-9291-0fedcda7b...@googlegroups.com Sahlusar ahlusar.ahluwa...@gmail.com writes: However, when I extrapolate this same logic with a list like: ('Response.MemberO.PMembers.PMembers.Member.CurrentEmployer.EmployerAddress .TimeAtPreviousAddress.', None), where the

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread Larry Hastings
Larry Hastings added the comment: What's a sensible approach to ameliorate the problem? Gracefully muddle through without a __name__ on the imported object? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24492 ___

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

2015-06-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It looks like on python-dev (http://www.mail-archive.com/python-dev@python.org/msg88256.html) there is an agreement that this behavior should not be changed (at least not in the nearest future). If there are no more comments/suggestions, then maybe one could

[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python

2015-06-23 Thread Nathan Jensen
Nathan Jensen added the comment: Ok, I was confused since the ticket was still marked as Open. We are trying to make an open source CPython extension available for download and building and we don't want to add a dependency on setuptools. We will patch our build commands based on the

Re: Python File as the Default PDF handler for Windows

2015-06-23 Thread Mark Lawrence
On 23/06/2015 21:12, Dennis Lee Bieber wrote: On Tue, 23 Jun 2015 16:26:28 +0200 (CEST), Jean-Michel Pichavant jeanmic...@sequans.com declaimed the following: Just to update, you are correct, Chris, the file short name is passed into sys.argv. didn't need to add anything to the path. But a

[issue23749] asyncio missing wrap_socket (starttls)

2015-06-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio missing wrap_socket - asyncio missing wrap_socket (starttls) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23749 ___

[issue24493] subprocess with env=os.environ fails with fatal python error when calling 32-bit python from 64-bit one on Windows

2015-06-23 Thread Florian Bruhin
New submission from Florian Bruhin: Trying to call a 32bit Python via subprocess from a 64bit one works as expected: Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32 [...] subprocess.check_call([r'C:\Python34_x32\python.exe', '-c',

Re: method returns object reference

2015-06-23 Thread Ned Batchelder
On Tuesday, June 23, 2015 at 2:32:55 PM UTC-4, Tim wrote: I spent a while finding this problem which looks something like the old mutable default argument problem. http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments I'm not crystal clear on the details, but

[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python

2015-06-23 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23246 ___

Organizing function calls once files have been moved to a directory

2015-06-23 Thread kbtyo
I am working on a workflow module that will allow one to recursively check for file extensions and if there is a match move them to a folder for processing (parsing, data wrangling etc). I have a simple search process, and log for the files that are present (see below). However, I am puzzled

[issue22508] Remove __version__ string from email

2015-06-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: When I ported Mailman 3 to Python 3.5 I had to remove the check on email.__version__ :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22508 ___

Re: MGCP Server implementation

2015-06-23 Thread Laura Creighton
In a message of Mon, 22 Jun 2015 20:42:21 -, Devaki Chokshi (dchokshi) wr ites: Hello, I have a use case where a SIP voice call will be passing through an MGCP gateway. Is there a python implementation that simulates MGCP gateway/server? Thank you Devaki Chokshi --

Re: [TIP] tox-2.1.0: passenv refinements

2015-06-23 Thread holger krekel
FWIW did a tox-2.1.1 fixing some interoperability issues with detox, the distributed tox runner. cheers, holger On Fri, Jun 19, 2015 at 14:09 +, holger krekel wrote: I just released tox-2.1.0 to pypi which streamlines the passenv behaviour to accomodate a number of issues, see the

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

2015-06-23 Thread Peter Otten
Travis Griggs wrote: 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

[issue24489] cmath.polar() can raise due to pre-existing errno

2015-06-23 Thread Antoine Pitrou
New submission from Antoine Pitrou: Here is a patch, with additional tests. -- components: Library (Lib) files: polar_errno.patch keywords: patch messages: 245678 nosy: mark.dickinson, pitrou priority: normal severity: normal stage: patch review status: open title: cmath.polar() can

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-23 Thread Ned Deily
Ned Deily added the comment: Exactly how are you building the Python 3.4 that does not fail for you? FWIW, I am able to reproduce the failure easily on a 10.10.3 system using python.org 64-bit/32-bit 3.4.3, using a current MacPorts source-built 3.4.3 (which is built with clang), and

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-23 Thread Jorge Herskovic
Jorge Herskovic added the comment: The failing Python: 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] The non-failing Python: 3.4.3 (default, Jun 23 2015, 06:33:02) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] The non-failing python,

[issue24493] subprocess with env=os.environ fails with fatal python error when calling 32-bit python from 64-bit one on Windows

2015-06-23 Thread Florian Bruhin
Florian Bruhin added the comment: That gives me Environment variable SYSTEMROOT not defined which would explain the Fatal Python error I'm seeing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24493

[issue24490] DeprecationWarning hidden even after warnings.filterwarnings('always') called

2015-06-23 Thread Ned Deily
Ned Deily added the comment: The problem you describe was covered by Issue4180 and fixed in Python 3.4.2. From the discussion there, you can see that it was decided to not change the behavior of Python 2.7. -- nosy: +ned.deily resolution: - duplicate stage: - resolved status: open

[issue2406] Improvement suggestions for the gzip module documentation

2015-06-23 Thread Ned Deily
Ned Deily added the comment: Jakub, thanks for your suggested changes. But this issue was closed and the documentation updated many years ago. Please open a new issue with your suggested changes, otherwise they will likely be forgotten and ignored. -- nosy: +ned.deily

[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-06-23 Thread Steve Dower
Steve Dower added the comment: Finally got back to looking at this, and since %f works against MSVC 14.0 I'm just going to remove the part of the test that is currently failing and close this issue. -- ___ Python tracker rep...@bugs.python.org

[issue24494] Can't specify encoding with fileinput and inplace=True

2015-06-23 Thread lilydjwg
New submission from lilydjwg: I want to use fileinput to modify files, but find no way to specify the file encoding. I tried to use hook_encoded, but it says FileInput cannot use an opening hook in inplace mode. -- components: Library (Lib) messages: 245711 nosy: lilydjwg priority:

[issue24244] Python exception on strftime with %f on Python 3 and Python 2 on windows

2015-06-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2c10e9f62613 by Steve Dower in branch '3.5': Closes #24244: Removes invalid test from test_time https://hg.python.org/cpython/rev/2c10e9f62613 New changeset f0ca1fabb41f by Steve Dower in branch 'default': Closes #24244: Removes invalid test from

[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-06-23 Thread Zorceta
Changes by Zorceta zorc...@gmail.com: -- nosy: -docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12920 ___ ___ Python-bugs-list mailing

[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-06-23 Thread Zorceta
Changes by Zorceta zorc...@gmail.com: -- components: +IDLE, Interpreter Core -Documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12920 ___

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

2015-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry Larry, but I prefer Serhiy's version. The known_hash variants need to have their own function intact version and gum up the rest of the code. See the current known_hash function for comparison (Serhiy modeled on what we had already decided to do

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-23 Thread eryksun
eryksun added the comment: It seems only a minimal set of environment variables are set Apparently the initial environment is empty. The values you see are defaults set by cmd.exe when it starts. It also sets the 'hidden' variable =C: to the current directory on the C: drive, which you can

[issue19111] 2to3 should remove from future_builtins import *

2015-06-23 Thread Milan Oberkirch
Milan Oberkirch added the comment: Here is a simple patch that would solve this issue. The new fixer 'future_builtins' removes `from future_builtins import foo` statements if they aren't nested in other constructs (try-except, classes, ...) and replaces them with `pass` otherwise. --

[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-06-23 Thread Zorceta
Zorceta added the comment: When provided object is not from a file, like input in interactive shell, `inspect` internals will check for it in `linecache`, which official Python shell and IDLE won't put interactive shell input into, yet. This can be simply solved. Whether interactive shell

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-23 Thread Cyd Haselton
Cyd Haselton added the comment: UPDATE: Spent this past weekend fixing the broken on-device compiler. Will get to tests this weekend -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496

Final CFP: 2015 Workshop on Exascale Multi/many Core Computing Systems (E-MuCoCoS)

2015-06-23 Thread SP
CALL FOR PAPERS 2015 Workshop on Exascale Multi/many Core Computing Systems (E-MuCoCoS) - Paper submission deadline: June 30, 2015 (firm deadline) - Workshop proceedings are published by the IEEE * CONTEXT Exascale computing will revolutionize computational science and engineering by

Re: JSON Object to CSV File Troubleshooting

2015-06-23 Thread Denis McMahon
On Sun, 21 Jun 2015 16:56:27 -0700, Sahlusar wrote: Here is an example XML document that I am working with: You are welcome to contribute and provide me with feedback. Thank you for your continued feedback and guidance. Your XML is invalid! You have a closing MO tag with no opening tag.

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

2015-06-23 Thread Julien Palard
Julien Palard added the comment: I only have a `socket.setdefaulttimeout(10)` just after my imports... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486 ___

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
Changes by DmitryJ ga...@tut.by: Added file: http://bugs.python.org/file39781/issue24467-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24467 ___

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
DmitryJ added the comment: Attached is a patch that fixes the reported issue. Since there are no visible side effects in Python, I could not write a test for this. -- keywords: +patch Added file: http://bugs.python.org/file39780/issue24467-2.7.patch

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
Changes by DmitryJ ga...@tut.by: Added file: http://bugs.python.org/file39783/issue24467-3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24467 ___

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
Changes by DmitryJ ga...@tut.by: Added file: http://bugs.python.org/file39784/issue24467-3.5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24467 ___

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
Changes by DmitryJ ga...@tut.by: Added file: http://bugs.python.org/file39782/issue24467-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24467 ___

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

2015-06-23 Thread Larry Hastings
Larry Hastings added the comment: I suggest that 20 lines of identical code copy-and-pasted between two functions is not the cleanest way to do it. Find attached my version of the patch, which splits this common code out into a static function. -- Added file:

ANN: SortedContainers 0.9.6 released

2015-06-23 Thread Grant Jenks
Announcing the release of SortedContainers version 0.9.6 What is SortedContainers? - SortedContainers is an Apache2-licensed, pure-Python implementation of sorted list, sorted dict, and sorted set data types that is fast-as-C implementations with 100% code coverage and

ASA Conference on Statistical Practice - deadline Thursday

2015-06-23 Thread Adams, Jean
Python users, Abstracts are now being accepted for the 2016 ASA Conference on Statistical Practice, February 18-20, San Diego, CA, USA. Conference attendees are not typically familiar with Python. It would be great to have someone from the Python community give a brief overview

MGCP Server implementation

2015-06-23 Thread Devaki Chokshi (dchokshi)
Hello, I have a use case where a SIP voice call will be passing through an MGCP gateway. Is there a python implementation that simulates MGCP gateway/server? Thank you Devaki Chokshi -- https://mail.python.org/mailman/listinfo/python-list

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread DmitryJ
DmitryJ added the comment: Offending code in 2.7: https://hg.python.org/cpython/file/20c9290a5de4/Objects/bytearrayobject.c#l2381 https://hg.python.org/cpython/file/20c9290a5de4/Objects/bytearrayobject.c#l2412 Let n = 16, where = 0; memmove() then attempts to copy (n - where) = 16 bytes where

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24467 ___ ___

[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2015-06-23 Thread Paul Anton Letnes
Paul Anton Letnes added the comment: I created a patch to the devguide with some rewording as necessary. As I am not an expert on porting Python, it would be great if someone could point out any mistakes I made. The new FAQ is at the very bottom of the file, as I didn't find any other

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

2015-06-23 Thread Laura Creighton
I use len(list(self.path.iterdir())) You get an extra list created in there. Do you care? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: JSON Object to CSV File Troubleshooting

2015-06-23 Thread Sahlusar
On Tuesday, June 23, 2015 at 2:35:50 AM UTC-4, Denis McMahon wrote: On Sun, 21 Jun 2015 16:56:27 -0700, Sahlusar wrote: Here is an example XML document that I am working with: You are welcome to contribute and provide me with feedback. Thank you for your continued feedback and guidance.

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

2015-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: r'[^\W\d]\w*' doesn't match all valid Python identifiers. It would be more correct to write the check as: root, ext = os.path.splitext(basename) if not (ext == '.py' and root.isidentifier()): # valid Python identifiers only return

PyConZA 2015 - Call for Speakers

2015-06-23 Thread Neil Muller
PyConZA 2015 will take place 1st 2nd October at the Wits University Professional Development Hub in Johannesburg, South Africa. There will be two days of talks, and we will hold sprints on the 3rd 4th of October. We are currently accepting proposals for talks. If you would like to give a

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-23 Thread R. David Murray
R. David Murray added the comment: Those are in the second (or rather the first, in the file) group of tests, which have a timeout of 3 on python3. The comment in the test case says that DNS lookup delays can cause timeouts. Is there any chance that that machine sometimes has problems

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

2015-06-23 Thread R. David Murray
R. David Murray added the comment: Yes, I bet that regex is left over from python2, where we didn't have isidentifier. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263

Extract Stores from Store Locators

2015-06-23 Thread ilia . uk
Hi Everyone, I was curious whether there was a way to get a list of all stores from a store locator? Currently I am limited to 10 so using requests in python doesn't give me much advantage over the web-browser interface: import requests url =

Re: MGCP Server implementation

2015-06-23 Thread Mark Lawrence
On 22/06/2015 21:42, Devaki Chokshi (dchokshi) wrote: Hello, I have a use case where a SIP voice call will be passing through an MGCP gateway. Is there a python implementation that simulates MGCP gateway/server? Thank you Devaki Chokshi There appears to be, but I'll let you type python

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-23 Thread Ned Deily
Ned Deily added the comment: FWIW, building 3.4.3 from source as you described results in failures about 30% of the time. With some of the earlier tests, it failed even more frequently. This is running on a 2.2GHz I7. -- ___ Python tracker

[issue12920] Document that inspect.getsource only works for objects loaded from files, not interactive session

2015-06-23 Thread Ned Deily
Ned Deily added the comment: In duplicate Issue24491, zorceta notes: Both python.exe and IDLE can't. IPython is able to, as it inserts REPL input into linecache. -- nosy: +ned.deily, zorceta versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-23 Thread Florian Bruhin
Florian Bruhin added the comment: Sorry I missed this - I can reproduce this on Windows 8.1, but not on Windows 7. I hope I'll be able to try another Windows 8.1 machine today. SYSTEMROOT is definitely set in the original environment: os.environ['SYSTEMROOT'] 'C:\\Windows'

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

2015-06-23 Thread sih4sing5hong5
sih4sing5hong5 added the comment: update by adding `except AttributeError:` -- Added file: http://bugs.python.org/file39794/VALID_MODULE_NAME2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Steven D'Aprano
On Wed, 24 Jun 2015 10:21 am, Dan Stromberg wrote: I know that sounds strange: usually we look up values by key, not keys. But suppose you have a strange key type that despite being equal, is not identical in some fields, and you need to see those fields. Is there a way of getting the key

Re: To write headers once with different values in separate row in CSV

2015-06-23 Thread Steven D'Aprano
On Wed, 24 Jun 2015 03:15 am, Sahlusar wrote: That is not the underlying issue. Any thoughts or suggestions would be very helpful. Thank you for spending over 100 lines to tell us what is NOT the underlying issue. I will therefore tell you what is NOT the solution to your problem (whatever it

[issue24493] subprocess with env=os.environ fails with fatal python error when calling 32-bit python from 64-bit one on Windows

2015-06-23 Thread eryksun
eryksun added the comment: I can't reproduce this in Windows 7 or 10 using Python 3.4. What gets printed for the following? import os import subprocess cmd32 = os.path.join(os.environ['SYSTEMROOT'], 'SysWOW64', 'cmd.exe') subprocess.call('{} /c set SYSTEMROOT'.format(cmd32), env=os.environ)

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-23 Thread Ned Deily
Ned Deily added the comment: Can you show the version info from the Python 3.4 where you see the failures? /usr/local/bin/python3.4 -c 'import sys;print(sys.version)' -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org

Re: Organizing function calls once files have been moved to a directory

2015-06-23 Thread Steven D'Aprano
On Wed, 24 Jun 2015 06:16 am, kbtyo wrote: I am working on a workflow module that will allow one to recursively check for file extensions and if there is a match move them to a folder for processing (parsing, data wrangling etc). I have a simple search process, and log for the files that

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Steven D'Aprano
On Wed, 24 Jun 2015 11:32 am, MRAB wrote: On 2015-06-24 01:21, Dan Stromberg wrote: I know that sounds strange: usually we look up values by key, not keys. But suppose you have a strange key type that despite being equal, is not identical in some fields, and you need to see those fields.

[issue24379] operator.subscript

2015-06-23 Thread Joe Jevnik
Joe Jevnik added the comment: I removed the C implementation. -- Added file: http://bugs.python.org/file39792/operator_subscript_pyonly.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379

[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-06-23 Thread irdb
Changes by irdb electro@gmail.com: -- nosy: +irdb ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15348 ___ ___ Python-bugs-list mailing list

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Ben Finney
Dan Stromberg drsali...@gmail.com writes: Is there a way of getting the key used by the dictionary, short of storing a reference to it in the value, or using a second dictionary? The dictionary knows its keys and can provide them on request. Call the ‘dict.keys’ method to get them as a

Re: Looking up a dictionary _key_ by key?

2015-06-23 Thread Dan Stromberg
On Tue, Jun 23, 2015 at 5:33 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Dan Stromberg drsali...@gmail.com writes: Is there a way of getting the key used by the dictionary, short of storing a reference to it in the value, or using a second dictionary? The dictionary knows its keys and

  1   2   >