Re: subprocess module usage

2014-09-01 Thread Earl Lapus
On Mon, Sep 1, 2014 at 1:39 PM, Chris Angelico ros...@gmail.com wrote: Glad it's working! But please, don't just take my word for it and make a black-box change to your code. When you invoke subprocesses, be sure you understand what's going on, and when shell=True is appropriate and when

Re: This could be an interesting error

2014-09-01 Thread Mark Lawrence
On 01/09/2014 03:53, Steven D'Aprano wrote: Mark Lawrence wrote: return (pigword) These^ ^ Those are parenthesis :P But not having to use them is a time saver. Thanks No they are round brackets, as opposed to square or curly. True, they are round brackets, but

Re: This could be an interesting error

2014-09-01 Thread Rustom Mody
On Monday, September 1, 2014 10:42:46 AM UTC+5:30, Chris Angelico wrote: On Mon, Sep 1, 2014 at 2:55 PM, Larry Hudson wrote: While this is definitely OT, I strongly suggest you take the time to learn to touch-type. (Actually, I would recommend it for everyone.) It's true that it will take

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread Andrea D'Amore
You make hard to follow your messages both by sending lot of messages and not using an adequate quoting. Please pick a posting style [1] (possibly interleaved) and stick to it. On 2014-08-31 23:35:09 +, andydtay...@gmail.com said: Andrea - yes I am using the virtualenv interpreter as the

Re: This could be an interesting error

2014-09-01 Thread Gregory Ewing
Steven D'Aprano wrote: or words in Foreign like cwm Seeing that w is a vowel in Welsh, there should probably be a special version of the program for Welsh speakers. (Welshlatin? Pigwelsh?) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess module usage

2014-09-01 Thread Cameron Simpson
On 01Sep2014 14:33, Earl Lapus earl.la...@gmail.com wrote: On Mon, Sep 1, 2014 at 1:39 PM, Chris Angelico ros...@gmail.com wrote: Glad it's working! But please, don't just take my word for it and make a black-box change to your code. When you invoke subprocesses, be sure you understand what's

Re: subprocess module usage

2014-09-01 Thread Chris Angelico
On Mon, Sep 1, 2014 at 6:46 PM, Cameron Simpson c...@zip.com.au wrote: Not really. If the arguments are coming in from the command line, someone (a user, even if that user is the programmer) typed them. Even if not malicious, they can still be mistaken. Or just unfortunate. I'm guessing that

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread andydtaylor
Posting style point taken. Google groups doesn't exactly help you with that. * You guys have probably been tinkering with this stuff for years. I haven't. * Your man on the street would say I described the error fairly well. * It's not like I wasn't trying my best to fix it myself * So far as

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread Andrea D'Amore
On 2014-09-01 12:32:38 +, andydtay...@gmail.com said: Google groups doesn't exactly help you with that. Drop it, get a usenet client or subscribe the mailing list (the newsgroup and the ml are bridged IIRC). * Your man on the street would say I described the error fairly well. That

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread Chris Angelico
On Mon, Sep 1, 2014 at 10:32 PM, andydtay...@gmail.com wrote: Posting style point taken. Google groups doesn't exactly help you with that. * You guys have probably been tinkering with this stuff for years. I haven't. * Your man on the street would say I described the error fairly well. *

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread Mark Lawrence
On 01/09/2014 13:32, andydtay...@gmail.com wrote: Posting style point taken. Google groups doesn't exactly help you with that. Thunderbird is as good a solution as any although there are plenty of other choices. * Statements like Please equip yourself with a tool that provides us with

[Announce] tabhistory - tab completion and command history

2014-09-01 Thread Steven D'Aprano
I am happy to announce an upgrade to the tabhistory module, which brings advanced tab completion and command history to Python 2.4 through 3.3 and beyond. Features Tab completion -- * At the beginning of lines, pressing the TAB key indents the line. * Inside

Editing text with an external editor in Python

2014-09-01 Thread Steven D'Aprano
Python's input() or raw_input() function is good for getting a single line of text from the user. But what if you want a more substantial chunk of text from the user? Here's how to call out to an external editor such as ed, nano, vim, emacs, and even GUI text editors: import tempfile def

Re: Editing text with an external editor in Python

2014-09-01 Thread Chris Angelico
On Tue, Sep 2, 2014 at 2:11 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Anyone able to test it on Windows for me please? Seems to partially work. I added an 'import os' at the top, and a simple test call to the function, and it did give me my editor (nano) and retrieved the

Re: Editing text with an external editor in Python

2014-09-01 Thread Roy Smith
In article 54049ab7$0$29972$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: import tempfile def edit(editor, content=''): f = tempfile.NamedTemporaryFile(mode='w+') [...] command = editor + + f.name status =

Re: Editing text with an external editor in Python

2014-09-01 Thread Steven D'Aprano
Roy Smith wrote: Hmmm. Didn't we just have a thread about passing external data to shells? $ mkdir '/tmp/;rm -rf;' $ TMPDIR='/tmp/;rm -rf;' python Python 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. import

Re: Editing text with an external editor in Python

2014-09-01 Thread Steven D'Aprano
Chris Angelico wrote: On Tue, Sep 2, 2014 at 2:11 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Anyone able to test it on Windows for me please? Seems to partially work. I added an 'import os' at the top, and a simple test call to the function, and it did give me my

Information

2014-09-01 Thread getachewagmuas
Hey I am Getachew , I am using cantera, python xy 2.7.6. My question is how can i convert XML file to Ct. py file format. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess module usage

2014-09-01 Thread Akira Li
Earl Lapus earl.la...@gmail.com writes: Hi, I made simple test program using the subprocess module (see attached: exec_cmd.py). I ran it passing variations of 'ls' command options. I encounter exceptions every time I use '-l' options. Example runs where exception occurs: # ./exec_cmd.py

Re: Editing text with an external editor in Python

2014-09-01 Thread Tim Chase
On 2014-09-02 04:23, Steven D'Aprano wrote: Read $VISUAL, if it exists, otherwise $EDITOR, if it exists, otherwise fall back on something hard coded. Or read it from an ini file. Or create an entry in the register. Whatever. That's up to the application which uses this function, not the

Re: Information

2014-09-01 Thread Joel Goldstick
On Mon, Sep 1, 2014 at 3:40 PM, getachewagm...@gmail.com wrote: Hey I am Getachew , I am using cantera, python xy 2.7.6. My question is how can i convert XML file to Ct. py file format. Thanks -- https://mail.python.org/mailman/listinfo/python-list This is a general purpose python

Re: Editing text with an external editor in Python

2014-09-01 Thread Cameron Simpson
On 02Sep2014 04:02, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Roy Smith wrote: Hmmm. Didn't we just have a thread about passing external data to shells? $ mkdir '/tmp/;rm -rf;' $ TMPDIR='/tmp/;rm -rf;' python Python 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] on

Re: Editing text with an external editor in Python

2014-09-01 Thread Chris Angelico
On Tue, Sep 2, 2014 at 4:02 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'm not really seeing how this is a security vulnerability. If somebody can break into my system and set a hostile GIT_EDITOR, or TMPDIR, environment variables, I've already lost. Agreed. If I'm calling

Re: Editing text with an external editor in Python

2014-09-01 Thread Chris Angelico
On Tue, Sep 2, 2014 at 4:23 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Chris Angelico wrote: C:\Python34\python 123123123.py cygwin warning: MS-DOS style path detected: C:\DOCUME~1\M\LOCALS~1\Temp\tmp94rcwd57 Preferred POSIX equivalent is:

Re: Psycopg2 package installation puzzle in Pycharm - any thoughts?

2014-09-01 Thread andydtaylor
Mark - it's more that I just didn't understand what you mean. Here's you: Probably an out and out programmer; uses a number of languages; a decade of experience, educated in best practice via your experience. Here's me: Idiot. A decade of experience in VBA and Excel in mindless finance jobs,

error while writing program to send mail.

2014-09-01 Thread Om Prakash
Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in module msg['Subject'] = 'The contents of $s' % message

Re: error while writing program to send mail.

2014-09-01 Thread Cameron Simpson
On 02Sep2014 05:05, Om Prakash torque.in...@gmail.com wrote: I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in module

Re: error while writing program to send mail.

2014-09-01 Thread MRAB
On 2014-09-02 00:35, Om Prakash wrote: Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in module

Re:error while writing program to send mail.

2014-09-01 Thread Dave Angel
Om Prakash torque.in...@gmail.com Wrote in message: Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in

Re: ANN: binario - simple work with binary files

2014-09-01 Thread Tim Roberts
Rustom Mody rustompm...@gmail.com wrote: On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote: To the equivalent code with struct: import struct dscrp = H?fs5B f = open('file.dat') stuff = struct.unpack( dscrp, f.read() ) print stuff In both cases, you have to

Define proxy in windows 7

2014-09-01 Thread Om Prakash
Hi, I am wondering how to define proxy setting in env variable on windows 7, I want this so i can use pip to pull packages for me, the same setting though working earlier on windows xp. http_proxy = proxy name:80 now this same setting doesn't work, i tried doing in the cmd.exe prompt. set

Re: error while writing program to send mail.

2014-09-01 Thread Om Prakash
On 09/02/2014 05:29 AM, MRAB wrote: On 2014-09-02 00:35, Om Prakash wrote: Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File

Re: Editing text with an external editor in Python

2014-09-01 Thread gschemenauer3
On Monday, September 1, 2014 11:11:34 AM UTC-5, Steven D'Aprano wrote: Python's input() or raw_input() function is good for getting a single line of text from the user. But what if you want a more substantial chunk of text from the user? Here's how to call out to an external editor such as

Re: Define proxy in windows 7

2014-09-01 Thread Cameron Simpson
On 02Sep2014 06:25, Om Prakash torque.in...@gmail.com wrote: I am wondering how to define proxy setting in env variable on windows 7, I want this so i can use pip to pull packages for me, the same setting though working earlier on windows xp. http_proxy = proxy name:80 now this same

Re: Define proxy in windows 7

2014-09-01 Thread Chris Angelico
On Tue, Sep 2, 2014 at 12:06 PM, Cameron Simpson c...@zip.com.au wrote: I am not a Windows user, but on UNIX systems the format of http_proxy and https_proxy is: http://proxyname:3128/ being the proxy hostname and port number respectively. You're saying: proxyname:8080 instead.

Re: Editing text with an external editor in Python

2014-09-01 Thread Steven D'Aprano
Cameron Simpson wrote: It is not just about being hacked. It is about being robust in the face of unusual setups. If I were producing this function for general use (even my own personal general use) it would need to be reliable. That includes things like $TMPDIR having spaces in it (or

Re: error while writing program to send mail.

2014-09-01 Thread Denis McMahon
On Tue, 02 Sep 2014 05:05:41 +0530, Om Prakash wrote: fp = open(message, 'rb') message here is a string literal fp.close should be fp.close() msg['Subject'] = 'The contents of $s' % message message here is a variable. The variable named message has not previously had a value assigned to

Re: ANN: binario - simple work with binary files

2014-09-01 Thread Rustom Mody
On Tuesday, September 2, 2014 6:05:19 AM UTC+5:30, Tim Roberts wrote: Rustom Mody wrote: On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote: To the equivalent code with struct: import struct dscrp = H?fs5B f = open('file.dat') stuff = struct.unpack( dscrp,

[issue22315] TypeError in error handling in distutils.dir_util.copy_tree

2014-09-01 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - resolved status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22315 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-09-01 Thread Claudiu Popa
Claudiu Popa added the comment: Serhiy, is there anything left to do for this patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___

[issue21527] concurrent.futures.ThreadPoolExecutor does not use a default value

2014-09-01 Thread Claudiu Popa
Claudiu Popa added the comment: Thank you, Guido. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21527 ___

[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-09-01 Thread Rebecka
Rebecka added the comment: I've checked and an updated test file for 3.4 shows the same behaviour in the renamed module http.cookiejar. Even though no standard exists I hope 3.4+ would be changed to simplify the cookie handling, since there is a lot of hassle converting UTC times to local

[issue22320] Invalid link in General Python FAQ

2014-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 241f9aa9fb89 by Ned Deily in branch '2.7': Issue #22320: Fix broken link in the General Python FAQ. http://hg.python.org/cpython/rev/241f9aa9fb89 New changeset 3eaba8a0cb3a by Ned Deily in branch '3.4': Issue #22320: Fix broken link in the General

[issue22320] Invalid link in General Python FAQ

2014-09-01 Thread Ned Deily
Ned Deily added the comment: Thanks again for the patch! (I did change the wording slightly.) -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22320

[issue22320] Invalid link in General Python FAQ

2014-09-01 Thread Josh Lynn
Josh Lynn added the comment: No problem! Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22320 ___ ___ Python-bugs-list mailing list

[issue10240] dict.update.__doc__ is misleading

2014-09-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10240 ___

[issue22311] Pip 404's

2014-09-01 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +dstufft ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22311 ___ ___ Python-bugs-list mailing list

[issue20567] test_idle causes test_ttk_guionly 'can't invoke event command: application has been destroyed' messages from Tk

2014-09-01 Thread Andrea Torre
Andrea Torre added the comment: Ubuntu 12.04 64-bit Python 2.7.3 (virtualenv) Hi, just adding a few info, hope not completely useless, that seem related to the issue. I got the same message when running nosetests against my source. It's an application using Tkinter as frontend. All tests

[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-09-01 Thread Andreas Røsdal
Andreas Røsdal added the comment: Is there any interest in this patch? it would be nice with a review of the patch. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20215 ___

[issue18615] sndhdr.whathdr could return a namedtuple

2014-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks good. I'll apply it shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___

[issue22306] Inconsistent division by 0 behaviour in decimal module

2014-09-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry. Scratch my last comment. I see from the docs ( https://docs.python.org/3/library/decimal.html ) vthat the decimal module explicitly references that IBM spec. I imagine that standard python arithmatic doesn't even attempt to conform to this ibm

[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2014-09-01 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- stage: - needs patch versions: +Python 3.5 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22293 ___

[issue21400] Code coverage documentation is out-of-date.

2014-09-01 Thread Heather McCartney
Heather McCartney added the comment: Here's a patch with a suggestion for the new text, with the part about the code coverage website removed. Once that part was gone, I found the remainder slightly easier to read when the options were presented the other way around, so the simpler (although

[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-09-01 Thread Akira Li
Akira Li added the comment: time.time() returns the current time in seconds since Epoch it is neither local nor UTC time. It can be converted to both. You can get local time using datetime.fromtimestamp(ts). You can get UTC time using datetime.utcfromtimestamp(ts) or to get an aware datetime

[issue19447] py_compile.compile raises if a file has bad encoding

2014-09-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d0bcb653085 by Berker Peksag in branch '3.4': Issue #19447: Suppress output of py_compile.compile(). http://hg.python.org/cpython/rev/2d0bcb653085 New changeset a8ef9d7c4d20 by Berker Peksag in branch 'default': Issue #19447: Suppress output of

[issue19447] py_compile.compile raises if a file has bad encoding

2014-09-01 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19447 ___

[issue20567] test_idle causes test_ttk_guionly 'can't invoke event command: application has been destroyed' messages from Tk

2014-09-01 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20567 ___ ___

[issue22321] odd result for datetime.time.strftime(%s)

2014-09-01 Thread Dima Tisnek
New submission from Dima Tisnek: $ python2 -c 'import datetime; print datetime.time(10, 44, 11).strftime(%s)' -2208955189 $ python3 -c 'import datetime; print (datetime.time(10, 44, 11).strftime(%s))' -2208955189 So apparently, datetime.time(...).strftime(%s) semantically seconds since unix

[issue17396] modulefinder fails if module contains syntax error

2014-09-01 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17396

[issue20020] modernize the modulefinder module

2014-09-01 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20020 ___ ___

[issue20215] Python2.7 socketserver can not listen IPv6 address

2014-09-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20215 ___ ___ Python-bugs-list mailing

[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note the .timestamp() method will work correctly if the datetime object is expressed in *local time*, which is not what Rebecka's code uses. Otherwise the incantation is a bit more complex:

[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-09-01 Thread Akira Li
Akira Li added the comment: timestamp() method works correctly for an aware datetime objects as in my example (notice: timezone.utc in the code). The issue is not that it is a manual computation, the issue is that it is incorrect: #XXX WRONG, DO NOT DO IT

[issue22296] cookielib uses time.time(), making incorrect checks of expiration times in cookies

2014-09-01 Thread Akira Li
Akira Li added the comment: The last example assumes that time.gmtime(0) is 1970-01-01 00:00:00Z (otherwise time.time() may return different timestamp) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22296

[issue22319] mailbox.MH chokes on directories without .mh_sequences

2014-09-01 Thread Tim Chase
Tim Chase added the comment: I had to tweak the example reproduction code as it seemed to succeed (i.e., fail to demonstrate the problem) in some instances. The same exception occurs, but here's the full original traceback: $ cd

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-09-01 Thread Ian Cordasco
Changes by Ian Cordasco graffatcolmin...@gmail.com: -- nosy: +icordasc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-09-01 Thread Ian Cordasco
Ian Cordasco added the comment: However, one sticking point is whether that optimization may also have adverse effects in terms of security (since we would always be sending auth headers, even when the server doesn't ask for it...). Antoine's concern has always been a concern of mine.

[issue22322] Zip files created by `git archive` result in a SyntaxError (due to comment?)

2014-09-01 Thread Peter Wu
New submission from Peter Wu: Files created by `git archive` are not understood by the Python interpreter. This could be caused by the additional comment (for the commit hash) in the file. echo 'print(1)' __main__.py git init git add __main__.py git commit -m init git archive --format=zip

[issue22321] odd result for datetime.time.strftime(%s)

2014-09-01 Thread R. David Murray
R. David Murray added the comment: I believe this is effectively a duplicate of issue 12750. That is, python doesn't do anything in particular with %s, it just lets the platform do what it will. Issue 12750 is about making what it does consistent and cross-platform. (On gentoo linux I get

[issue22322] Zip files created by `git archive` result in a SyntaxError (due to comment?)

2014-09-01 Thread R. David Murray
R. David Murray added the comment: You are correct. zipimport does not support zip files with comments. There is already an open issue (issue 5950) for adding support for this. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: -

[issue5950] Make zipimport work with zipfile containing comments

2014-09-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue22322 for yet one use case (git archive creates ZIP file with archive comment). -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5950

[issue22311] Pip 404's

2014-09-01 Thread Donald Stufft
Donald Stufft added the comment: Yea can you give more information? How are you reproducing this? What version of Python? I can't reproduce it locally. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22311

[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2014-09-01 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: -terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19494 ___ ___ Python-bugs-list

[issue22311] Pip 404's

2014-09-01 Thread Stefan Behnel
Stefan Behnel added the comment: CPython 3.5, latest development versions. This started failing on August 21st, presumably with the changes for issue 22118. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22311

[issue21965] Add support for Memory BIO to _ssl

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: We can leave these undocumented at the Python level if you prefer. I'd rather that indeed. If there's a specific need, we can expose them as a separate issue. Maybe just SSLInstance, would that be better than SSLObject? That doesn't sound much better :-)

[issue22311] Pip 404's

2014-09-01 Thread Donald Stufft
Donald Stufft added the comment: Ok, I'll pull down Python 3.5 in a bit and see what is what. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22311 ___

[issue22311] Pip 404's

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: No need to keep this open, this is tackled in issue 22278. -- resolution: - duplicate stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22311

[issue22278] urljoin duplicate slashes

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Those tests don't seem to bring much. Part of them are straight from the RFC (and therefore already in the current test suite, I assume), part of them are for non-HTTP protocols such as fred (!). A couple of them seem to be genuine, although only one fails

[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: This means that by the end of a run, we have quite a lot of references to MagicMocks. It sounds like you are bitten by unittest keeping references to all past TestCase instances. This has been fixed recently (see #11798). -- nosy: +pitrou

[issue22301] smtplib.SMTP.starttls' documentation is just confusing

2014-09-01 Thread Michele Orrù
Michele Orrù added the comment: R. David Murray rep...@bugs.python.org writes: Since we want to encourage people to use the context, that sounds reasonable for 3.x at least. Concerning this specific proposition, I really don't see the point in having .starttls() not simply accepting a

[issue22302] Windows os.path.isabs UNC path bug

2014-09-01 Thread Akima
Akima added the comment: I checked for the existence of this bug in 2 other python versions today. It's present in CPython 3.4.1, but CPython 2.7.5 doesn't exhibit the issue. Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or

[issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2014-09-01 Thread STINNER Victor
New submission from STINNER Victor: I would like to deprecate PyUnicode_AsUnicode(), see the issue #22271 for the rationale (hint: memory footprint). The first step is to rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() to not call PyUnicode_AsUnicode() anymore. Attached patch

[issue22271] Deprecate PyUnicode_AsUnicode(): emit a DeprecationWarning

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: The deprecate PyUnicode_AsUnicode(), we should stop using it in Python itself. Here is the first step: issue #22323, rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() (to not call PyUnicode_AsUnicode() anymore). --

[issue22154] ZipFile.open context manager support

2014-09-01 Thread Mike Short
Mike Short added the comment: Context manager comment code snippet added to zipfile doc - patch attached. -- keywords: +patch nosy: +Mike.Short Added file: http://bugs.python.org/file36521/zipfile.patch ___ Python tracker rep...@bugs.python.org

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
New submission from STINNER Victor: I would like to deprecate PyUnicode_AsUnicode(), see the issue #22271 for the rationale (hint: memory footprint). To deprecate PyUnicode_AsUnicode(), we should stop using it internally. The attached patch is a work-in-progress patch, untested on Windows

[issue22278] urljoin duplicate slashes

2014-09-01 Thread Demian Brecht
Demian Brecht added the comment: I'll try to get some time this week to extend the various test cases, thanks for pointing that out Antoine. I also found that, other than the few RFC-specific blocks in the link that Nick added in the other ticket, not only were they questionable (non-HTTP as

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't generated wchar.patch correctly: please ignore changes in the unicodeobject.c files. These changes are part of issues #22271 and #22323. -- ___ Python tracker rep...@bugs.python.org

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: wchar_posixmodule.patch: patch for posixmodule.c. Sorry, the code calling PyUnicode_AsUnicode() was not generated by Argument Clinic in fact. -- Added file: http://bugs.python.org/file36523/wchar_posixmodule.patch

[issue22290] AMD64 OpenIndiana 3.x buildbot: assertion failed in PyObject_Call() in test_subprocess.test_preexec()

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: Oh, a lot of tests fail with MemoryError on this buildbot. It may explain this issue. For example, test_json crashed with SIGSEGV in this build, probably because of an unhandled MemoryError exception:

[issue22166] test_codecs leaking references

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: ExceptionChainingTest uses a function to raise an arbitrary exception. Problem: the function and its parameter becomes part of the exception traceback. Shortly, the exception links indirectly to itself in a nice reference cycle... Example: --- import

[issue22166] test_codecs leaks references

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: Attached: Draft patch to fix some reference leaks in test_codecs. -- title: test_codecs leaking references - test_codecs leaks references Added file: http://bugs.python.org/file36524/test_codecs_fix1.patch ___ Python

[issue22166] test_codecs leaks references

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: ExceptionChainingTest creates a random codec name. If you change the codec name to a fixed string like xxx, ExceptionChainingTest.test_raise_by_type() doesn't leak anymore (when test_codecs_fix1.patch is applied), but other tests start to fail. We should

[issue19826] Document that bug reporting by email is possible

2014-09-01 Thread Mike Short
Mike Short added the comment: Addition to bugs.html to describe submitting bugs via email -- keywords: +patch nosy: +Mike.Short Added file: http://bugs.python.org/file36525/bugs.patch ___ Python tracker rep...@bugs.python.org

[issue19826] Document that bug reporting by email is possible

2014-09-01 Thread Mike Short
Mike Short added the comment: Same addition to the Python Dev Guide - seemed more appropriate on the tracker page vs. the triaging page. -- Added file: http://bugs.python.org/file36526/tracker.patch ___ Python tracker rep...@bugs.python.org

[issue19826] Document that bug reporting by email is possible

2014-09-01 Thread R. David Murray
R. David Murray added the comment: I'd be just as happy to not document this. The fact that you need an account first means that people will try to submit without an account, and get a bounce. It also works better when people reply on the bug tracker rather than by email. I'd not want to

[issue1508475] transparent gzip compression in urllib

2014-09-01 Thread Martin Panter
Martin Panter added the comment: I think the patch is indeed a bit short, for instannce it looks like calling read() without a size limit could bypass the decoding. Also, I wonder if Content-Encoding handling is better done at a higher level. What if someone wants to download a *.tar.gz file?

[issue22166] test_codecs leaks references

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: We should maybe enhance the codecs API to be able to unregister a codec? That would be nice. At least as a private API in 3.4. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2014-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attached patch implements this. There is no patch. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22323 ___

[issue22038] Implement atomic operations on non-x86 platforms

2014-09-01 Thread John Malmberg
Changes by John Malmberg wb8...@gmail.com: -- nosy: +John.Malmberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list