[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Nick Coghlan

Nick Coghlan added the comment:

You'd also need to update the new multiprocessing code - it currently expects 
"__main__.__spec__ == None" for all the run-from-a-path-or-stdin cases.

The -m switch and running __main__ from a supplied sys.path entry (the "dir" 
entry in your table) are both already handled by the runpy changes in issue 
19700.

The remaining cases where __main__.__spec__ is currently None:

- interactive prompt
- -c switch
- running from stdin
- running directly from a source or bytecode file

To be honest, I'm not sure it actually makes sense to try to manufacture a 
pseudo-spec for those cases. A main script may not be importable as a module 
(e.g. a hyphen in its name, or no .py suffix), and you *definitely* can't 
import a file that doesn't exist on disk (REPL, stdin, -c).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18310] itertools.tee() can't accept keyword arguments

2014-01-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

'name=val' in a signature (not a call) merely indicates that name has a 
default. The 2.x use of [] to indicate the the parameter with a default is 
optional was dropped as redundant in the 3.x docs. The 2.x; tee doc has [, 
n=2]. The 3.x doc is correctly according to the 3.x doc standard.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

Food for thought:

We could (for 3.5) add an importer just for __main__ that gives us the 
appropriate spec and loads __main__ accordingly.  Such a loader could even 
incorporate exec of the site module (and any PYTHONSTARTUP script).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

For the record, normal start-up happens like this (simplified):

1. prep for and create/initialize interpreter
2. exec the site module in the __main__ namespace (unless -S)
3. do the interface-specific stuff

Note: exec of the site module does not impact the spec.

In the case where -i/PYTHONINSPECT is issued (or implied):

1. ...
2. ...
3. exec the PYTHONSTARTUP script (if set and it exists)
4. do the interface-specific stuff
5. start the REPL

Note: the -i case does not impact the spec, nor does the exec of any 
PYTHONSTARTUP script.


See:

[1] http://docs.python.org/3.4/using/cmdline.html
[2] Python/pythonrun.c
[3] Modules/main.c
[4] PEP 432

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19697] refactor pythonrun.c to make use of specs (__main__.__spec__)

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

Here's an outline of how I see __main__.__spec__ playing out relative to the 
various cmdline interfaces.

== == == ===      
-  -c -m dir file name loader   origin   cached   has_location
== == == ===      
  __main__ builtin  -None False
X __main__ builtin  -None False
   X  __main__ builtin  -c   None False
  X   (finder) (finder) (finder) (finder) (finder)
 X__main__  path None True
 X__main__  path None True
== == == ===      

Note: __main__.__spec__ in the -m case is addressed in issue #19700.

Thoughts?

See:

[1] http://docs.python.org/3.4/using/cmdline.html
[2] Python/pythonrun.c
[3] Modules/main.c

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2014-01-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3982] support .format for bytes

2014-01-03 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20119] pdb c(ont(inue)) optional one-time-only breakpoint (like perl debugger)

2014-01-03 Thread nlev...@gmail.com

New submission from nlev...@gmail.com:

The continue command in perl's debugger (perl -d) supports setting a 
one-time-only breakpoint. IMHO this is incredibly useful. For instance when 
stepping through a program, if you get stuck in a loop, you can move past it 
with a simple one line command "c [line-after-loop]".

pdb could have the same thing!

--
files: pdb-continue-onetime-bp-00.diff
keywords: patch
messages: 207266
nosy: nlev...@gmail.com
priority: normal
severity: normal
status: open
title: pdb c(ont(inue)) optional one-time-only breakpoint (like perl debugger)
type: enhancement
Added file: http://bugs.python.org/file33306/pdb-continue-onetime-bp-00.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18310] itertools.tee() can't accept keyword arguments

2014-01-03 Thread Mark Lawrence

Mark Lawrence added the comment:

>From the glossary

Quote

keyword argument: an argument preceded by an identifier (e.g. name=) in a 
function call or passed as a value in a dictionary preceded by **. For example, 
3 and 5 are both keyword arguments in the following calls to complex():

complex(real=3, imag=5)
complex(**{'real': 3, 'imag': 5})

End Quote

>From itertools docs "itertools.tee(iterable, n=2) Return n independent 
>iterators from a single iterable", so what is this if it's not a keyword 
>argument?  Surely all that's needed in this case is for the docs to read 
>"itertools.tee(iterable[, n]) Return n independent iterators from a single 
>iterable where n defaults to 2"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2014-01-03 Thread HCT

HCT added the comment:

just want to know if there is any tentative schedule to release 3.3.4. the PEP 
for 3.3 schedule doesn't talk about 3.3.4, so I'm not sure if the decision was 
to leave latest 3.3 with this broken regression or fix it and release 3.3.4.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2014-01-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe this is my suggestion 2) in msg206715 of #19995, and I think it 
better than 3) (and 1) alone). Thanks for moving this forward. I believe what 
Guido said is that indexes (integers in the broad sense) are (or should be) a 
subset of things convertible to ints. I concur completely.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2014-01-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread Ruben D. Orduz

Ruben D. Orduz added the comment:

Senthil,

The RFC can be found here: http://tools.ietf.org/html/rfc3986#section-2.2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread Senthil Kumaran

Senthil Kumaran added the comment:

If you could point to RFC which states the list of characters which can be used 
as valid query string separators, we can include that list. (Of course in 3.5)

--
nosy: +orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20103] Documentation of itertools.accumulate is confused

2014-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +ezio.melotti
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20117] subprocess on Windows: wrong return code with shell=True

2014-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +brian.curtin, giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20103] Documentation of itertools.accumulate is confused

2014-01-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20103] Documentation of itertools.accumulate is confused

2014-01-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Somewhat orthogonal to Mitchell's suggestion, I would change 'returns' to 
'yields' and expand 'elements' to 'elements of *iterable*'.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20090] slight ambiguity in README.txt instructions for building docs

2014-01-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19255] Don't "wipe" builtins at shutdown

2014-01-03 Thread Gennadiy Zlobin

Gennadiy Zlobin added the comment:

I'm not 100% sure that this is what intended, but probably this patch can fix 
it? Please review it.

--
keywords: +patch
nosy: +gennad
Added file: http://bugs.python.org/file33305/19255.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18310] itertools.tee() can't accept keyword arguments

2014-01-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

It is an unfortunate (to my mind) but true fact that the docs do not indicate 
which functions are coded in C and for such functions, whether args passable by 
position can also be passed by name. If one wishes to pass by name, one simply 
has to experiment. The problem is possibly a bit worse for itertools because 
its docs have 'equivalent' Python code that is not quite equivalent for 
position-only C parameters. Solutions would be a fit topic for python-ideas 
list.

The tee docs do not describe 'n' as a keyword. They only indicate its default 
value, which is a different issue altogether.

The word 'keyword' only appears in the 'product' entry to describe the 'repeat' 
parameter. It there means 'pass by name only', as product() takes an indefinite 
number of positional iterables, so that a repeat value cannot be passed by 
position.


'user': please do not play with the Status: value. This is a good way to make 
yourself unpopular with developers. If a developer 'closes' an issue and you 
wish it 'reopened', ask and explain, and be willing for the request to be 
ignored or rejected.

--
nosy: +terry.reedy
stage:  -> committed/rejected
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

"I opened a new issue for the failing test: issue 20118, so I don't see a 
reason to keep this open."

Ok, I wasn't aware of this issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

I opened a new issue for the failing test: issue 20118, so I don't see a reason 
to keep this open.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

Reopen, a test is failing.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ae948d9eee by R David Murray in branch '2.7':
#16039/#20118: temporarily skip failing imaplib SSL test.
http://hg.python.org/cpython/rev/d7ae948d9eee

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7ae948d9eee by R David Murray in branch '2.7':
#16039/#20118: temporarily skip failing imaplib SSL test.
http://hg.python.org/cpython/rev/d7ae948d9eee

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2014-01-03 Thread R. David Murray

New submission from R. David Murray:

test.test_imaplib.ThreadedNetworkedTestsSSL.test_linetoolong, added as part of 
the fix for security (DOS attack) issue 16039, is failing on 2.7 on some 
buildbots (FreeBSD, OpenIndia, Windows).  On some platforms (FreeBSD at least) 
the failure seems to be intermittent.  Running the tests with the same randseed 
on linux does not reproduce the problem.  Running the test under -F on linux 
does not produce any failures.

Since this is a DOS security issue, and since the failure is that the exception 
comes from the ssl module instead of being an imaplib error but it nevertheless 
blocks the attack, I've left the patch in.  But the reason for the failure 
should be determined and either the test or the code fixed.  (In the meantime 
I'll mark the test to be skipped).

--
components: Library (Lib)
messages: 207252
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20117] subprocess on Windows: wrong return code with shell=True

2014-01-03 Thread Guido van Rossum

New submission from Guido van Rossum:

A little birdie told me:

"""
Bug in Python subprocess doesn't allow to detect if
command executed through Windows system shell
exists.

If command doesn't exist, windows shell returns 9009
exit code (127 on Linux):
---[a.bat]---
@echo off
nonex
echo %ERRORLEVEL%

> a.bat
'nonex' is not recognized as an internal or external command,
operable program or batch file.
9009

However, when executed with Python, the return code
is different on Python 2.7/3.3:
---[x.py]---
import subprocess
p = subprocess.Popen("nonex", shell=True)
print(p.wait())

> python x.py
'nonex' is not recognized as an internal or external command,
operable program or batch file.
1

The same script executed on Linux gives correct result:
# python x.py
/bin/sh: non-existent: command not found
127

---[a.sh]---
nonex
echo $?
"""

There's some more research at http://goo.gl/xEg2b1

Seems the culprit is cmd.exe, which is executed by Python internally.
It looks like it fails to return corresponding code 9009.

Possibly all that needs to be done is documenting this wart, if we can't do 
anything about it?

--
messages: 207251
nosy: ezio.melotti, gvanrossum
priority: low
severity: normal
stage: needs patch
status: open
title: subprocess on Windows: wrong return code with shell=True
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18960] First line can be executed twice

2014-01-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which fixes this issue (and related issues).

* Encoding declaration now detected in second line only if first line is 
spaces-only (this is needed for support -x option) or comment-only (needed for 
she-bang).

* Fixed support for -x option.

* PyTokenizer_FromString() no longer check encoding declaration in second line 
if it was found in first line.

* Fixed encoding detection in the tokenize module, in IDLE, in 2to3 and in the 
findnocoding script.

--
assignee:  -> serhiy.storchaka
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file33304/source_encoding_second_line.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2014-01-03 Thread Stefan Krah

Stefan Krah added the comment:

The machine has a high load: 6 processes at 100% CPU, one of which is
the FreeBSD virtual machine.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15012] test issue

2014-01-03 Thread Benjamin Peterson

Benjamin Peterson added the comment:

testing again...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15012] test issue

2014-01-03 Thread Benjamin Peterson

Benjamin Peterson added the comment:

testing 1, 2, 3

--
nosy: +benjamin.peterson -brian.curtin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19526] Review additions to the stable ABI of Python 3.4

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 15bad3abfac9 by Martin v. Löwis in branch 'default':
Issue #19526: Exclude all new API from the stable ABI.
http://hg.python.org/cpython/rev/15bad3abfac9

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19526] Review additions to the stable ABI of Python 3.4

2014-01-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

The procedure to obtain the new API was this: 

* write a C file 

#define Py_LIMITED_API
#include 

* compile this with gcc -E | grep -v '#'

* diff and inspect the two preprocessor outputs. Ideally, they come out empty, 
but they currently show lots of (legitimate) const additions, and some 
reformattings

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread Ruben D. Orduz

Ruben D. Orduz added the comment:

Ah, gotcha. I think I will leave as is then. Thanks for clarifying.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

I'm saying that this is a change that can be made only in 3.5.  if you want to 
submit a patch here for 2.7 for other people to use that's fine, but it won't 
get applied.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread Ruben D. Orduz

Ruben D. Orduz added the comment:

So, are you suggesting I should change to a different type if desired for 2.7.x 
or leave for release to 3.5 and then submit a patch to backport it to 2.7.x? I 
apologize, not sure how the workflow works in these cases. Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

As an enhancement, this could only go into 3.5.

--
nosy: +r.david.murray
versions: +Python 3.5 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19538] Changed function prototypes in the PEP 384 stable ABI

2014-01-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I agree with Serhiy. This use case is not "supported", i.e. it getting this 
compiler warning if you implement a function from the interpreter core is not a 
bug.

The work-around that he suggests sounds reasonable to me.

--
nosy: +loewis
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

And we're getting test failures in the SSL version of the test.  No similar 
failure reports in the tracker, and the same test has been running on the 
Python3 branch for a while now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18515] zipfile._ZipDecryptor generates wasteful crc32 table on import

2014-01-03 Thread Daniel Holth

Daniel Holth added the comment:

Fixed in http://hg.python.org/cpython/rev/536a2cf5f1d2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20116] urlparse.parse_qs should take argument for query separator

2014-01-03 Thread Ruben D. Orduz

New submission from Ruben D. Orduz:

Currently urlparse.parse_qs 
(http://hg.python.org/cpython/file/2.7/Lib/urlparse.py#l150) assumes and uses 
';' as a query string separator with no way to overwrite that. There are 
several web service APIs out there that use ';' as list separator (e.g. 
[URL]?fruits=lemon;lime&family=citrus). Although ';' seems like a sensible 
choice for a default, there should be a way to overwrite it.

--
messages: 207237
nosy: ruben.orduz
priority: normal
severity: normal
status: open
title: urlparse.parse_qs should take argument for query separator
type: enhancement
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13943] distutils’ build_py fails when package string is unicode

2014-01-03 Thread Éric Araujo

Éric Araujo added the comment:

It’s strange that this would happen when installing as a dependency and not 
when installing directly.  Pip can change faster than stdlib is released, could 
you report the bug to them and see if it’s possible to pass __file__ as a byte 
string?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2014-01-03 Thread Richard Oudkerk

Richard Oudkerk added the comment:

How often has this happened?

If the machine was very loaded then maybe the timeout was not enough time for 
the semaphore to be cleaned up by the tracker process.  But I would expect 1 
second to be more than ample.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17460] Remove the strict and related params completely removing the 0.9 support

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f9bb9c11363a by R David Murray in branch 'default':
whatsnew: porting note for HTTP[S]Connection strict parameter removal.
http://hg.python.org/cpython/rev/f9bb9c11363a

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

Applied to 2.7 in dd906f4ab923.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2014-01-03 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20115] NUL bytes in commented lines

2014-01-03 Thread Armin Rigo

New submission from Armin Rigo:

This is probably the smallest example of a .py file that behaves differently in 
CPython vs PyPy, and for once, I'd argue that the CPython behavior is 
unexpected:

   # make the file:
   >>> open('x.py', 'wb').write('#\x00\na')

   # run it:
   python x.py

Expected: either some SyntaxError, or "NameError: global name 'a' is not 
defined".  Got: nothing.  It seems that CPython completely ignores the line 
that is immediately after a line with a '#' and a following '\x00'.

--
components: Interpreter Core
messages: 207232
nosy: arigo
priority: low
severity: normal
status: open
title: NUL bytes in commented lines
type: compile error
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread Benjamin Peterson

Benjamin Peterson added the comment:

There's no reason not to fix it assuming the patch is good...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19023] ctypes docs: Unimplemented and undocumented features

2014-01-03 Thread Luca Faustin

Changes by Luca Faustin :


--
nosy: +faustinl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19699] Update zipimport for PEP 451

2014-01-03 Thread Brett Cannon

Changes by Brett Cannon :


--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13943] distutils’ build_py fails when package string is unicode

2014-01-03 Thread Boris FELD

Boris FELD added the comment:

I've the same problem today with package 
https://pypi.python.org/pypi/httpretty/0.7.1 but only when I try to install one 
of my project which requires httpretty, if I try to install it directly it 
works like a charm.

pip install httpretty -> works
pip install mypkg -> doesn't works

Looks like HTTPretty is using __file__ variable in setup.py 
(https://github.com/gabrielfalcao/HTTPretty/blob/master/setup.py#L35) and pip 
seems to pass the file as unicode:

http://0bin.net/paste/dQfsSAmguWNYyY7w#0O/gcrWA44wKicfTdsGT4KqRYhbZLyhN9BUXNQD1XZA=

At the last line: 
"__file__=u'/home/lothiraldan/.virtualenvs/test/build/httpretty/setup.py'"

--
nosy: +Boris.FELD

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] SHA-3 (Keccak) support may need to be removed before 3.4

2014-01-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Thanks for the report. Restored in 8a3718f31188

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] SHA-3 (Keccak) support may need to be removed before 3.4

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

@Martin: It looks like the _overlapped module is not more compiled on Windows.

http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/2032/steps/test/logs/stdio

test test_asyncio crashed -- Traceback (most recent call last):
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\asyncio\__init__.py",
 line 16, in 
from . import _overlapped
ImportError: cannot import name '_overlapped'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../lib/test/regrtest.py", line 1278, in runtest_inner
test_runner()
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\__init__.py",
 line 31, in test_main
run_unittest(suite())
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\__init__.py",
 line 21, in suite
__import__(mod_name)
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\test_base_events.py",
 line 11, in 
from asyncio import base_events
  File 
"E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\asyncio\__init__.py",
 line 18, in 
import _overlapped  # Will also be exported.
ImportError: No module named '_overlapped'

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

"Since the merge 2.6 -> 2.7 did not apply cleanly, and had other problems. I 
null merged the 2.6 changes.  I'll leave it to Benjamin to work out whatever 
patches 2.7 needs."

So Benjamin, is there a reason to not fix this security vulnerability in Python 
2.7?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20113] os.readv() and os.writev() don't raise an OSError on readv()/writev() failure

2014-01-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +rosslagerwall

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] SHA-3 (Keccak) support may need to be removed before 3.4

2014-01-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I have now removed the aha code.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16113] SHA-3 (Keccak) support may need to be removed before 3.4

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 52350d325b41 by Martin v. Löwis in branch 'default':
* Issue #16113: Remove sha3 module again.
http://hg.python.org/cpython/rev/52350d325b41

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread R. David Murray

R. David Murray added the comment:

Presumably because it has not been fixed in 2.7.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2014-01-03 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/6085/steps/test/logs/stdio

==
FAIL: test_semaphore_tracker 
(test.test_multiprocessing_forkserver.TestSemaphoreTracker)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/_test_multiprocessing.py",
 line 3661, in test_semaphore_tracker
_multiprocessing.sem_unlink(name2)
AssertionError: OSError not raised

--
keywords: buildbot
messages: 207223
nosy: haypo, sbt
priority: normal
severity: normal
status: open
title: Sporadic failure of test_semaphore_tracker() of 
test_multiprocessing_forkserver on FreeBSD 9 buildbot
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18294] zlib module is not completly 64-bit safe

2014-01-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0cca6c5513d2 by Victor Stinner in branch 'default':
Issue #18294: Fix uint_converter() in zlibmodule.c, fix the "> UINT_MAX" check
http://hg.python.org/cpython/rev/0cca6c5513d2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20113] os.readv() and os.writev() don't raise an OSError on readv()/writev() failure

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

os.readv() and os.writev() were added in Python 3.3 with the issue #10812.

--
keywords: +patch
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file33303/readv_writev.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20113] os.readv() and os.writev() don't raise an OSError on readv()/writev() failure

2014-01-03 Thread STINNER Victor

New submission from STINNER Victor:

Example:

$ python3
Python 3.3.2 (default, Nov  8 2013, 13:38:57) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.fstat(19)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 9] Bad file descriptor
>>> buf=bytearray(10)
>>> os.readv(19, [buf])
-1

I would expect an OSError on os.readv() instead of -1.

Moreover, empty list of buffers are not handled correctly:

$ python3
Python 3.3.2 (default, Nov  8 2013, 13:38:57) 
[GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.readv(0, [])
Traceback (most recent call last):
  File "", line 1, in 
SystemError: error return without exception set

Attached patch should fix both issues.

--
messages: 207220
nosy: haypo
priority: normal
severity: normal
status: open
title: os.readv() and os.writev() don't raise an OSError on readv()/writev() 
failure
versions: Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19699] Update zipimport for PEP 451

2014-01-03 Thread Nick Coghlan

Nick Coghlan added the comment:

I don't see any problem with postponing the zipimport updates until 3.5 (we 
won't be updating the extension module handling until then anyway, since that 
requires C API additions).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16039] imaplib: unlimited readline() from connection

2014-01-03 Thread STINNER Victor

STINNER Victor added the comment:

Why is this issue still open? The issue was fixed in Python 2.6.9. Why is the 
issue a release blocker? The issue was also fixed in the future Python 3.4 (in 
default).

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19699] Update zipimport for PEP 451

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

Could this wait for 3.5?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19703] Update pydoc to PEP 451

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

Here's a patch that updates pydoc to move away from find_module/load_module.

These 4 don't need to change for PEP 451:

safeimport()
HTMLDoc.docmodule()
HTMLDoc.index()
TextDoc.docmodule()

--
keywords: +patch
Added file: http://bugs.python.org/file33302/issue19703-use-new-api.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19708] Check pkgutil for anything missing for PEP 451

2014-01-03 Thread Eric Snow

New submission from Eric Snow:

Here's a patch that does the minimum of updating pkgutil and its tests to move 
away from find_module/load_module.  I'm not sure there is much more to do than 
this.

--
keywords: +patch
Added file: http://bugs.python.org/file33301/issue19708-use-new-api.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19713] Deprecate various things in importlib thanks to PEP 451

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

Here's a patch that updates a couple files to not use find_module/load_module.  
These are the only changes like this (of consequence) outside pydoc, pkgutil, 
and importlib, which are covered by other tickets.

--
Added file: http://bugs.python.org/file33300/issue19713-switch-to-new-api.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19944] Make importlib.find_spec load packages as needed

2014-01-03 Thread Eric Snow

Eric Snow added the comment:

find_spec() is at package level because find_module() is and for no other good 
reason I'm aware of.  I'd be just fine with moving it to util.  I don't expect 
it to be used enough to warrant that top-level placement.

Regarding builtins.__import__(), I'm using it in the event that someone 
"installed" their own __import__() which gives a different result than 
import_module().  Thus the parent used by find_spec() will be the expected one. 
 I agree that comment about this would be good.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com