[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-14 Thread Jayanth Koushik

New submission from Jayanth Koushik:

In the difflib documentation, multiple uses of 'splitlines' use '1' as the 
'keepends' argument. In Python 2.x, 1 is not guaranteed to be True and while 
this is guaranteed in 3.x, it would be much clearer to specify the argument as 
'True'.

--

___
Python tracker 

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-14 Thread Jayanth Koushik

Changes by Jayanth Koushik :


--
assignee: docs@python
components: Documentation
nosy: docs@python, jayanthkoushik
priority: normal
severity: normal
status: open
title: Use of '1' instead of 'True' as 'splitlines' argument in difflib 
documentation
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2014-04-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I have not tried your patch yet, but the relevant code seems to be

class ModifiedInterpreter(InteractiveInterpreter):
def runcode(self, code):
if code.co_filename[0] != '<': ## your patch
self.tkconsole.write('Executing ' + code.co_filename + '\n')
if self.tkconsole.executing:
self.interp.restart_subprocess()

 def restart_subprocess(self, with_cwd=False):
if was_executing:
console.write('\n')
console.showprompt()
halfbar = ((int(console.width) - 16) // 2) * '='
console.write(halfbar + ' RESTART ' + halfbar)

The 2 problems I see with the patch are that 1) it prints prematurely and 2) it 
does not replace RESTART. Both should be solved by passing the title string to 
restart_process as a new 'title' arg (title=' RESTART ').

The halfbar expression should use len(title). I believe 16 is 9 (len(' RESTART 
')) + 4 (len('>>> ')) + 3 (console.width (80) - 77). So
halfbar = ((int(console.width) - len(title) - 7) // 2) * '='

I think the bar would be better without a prompt before it. If 
console.showprompt() is deleted, 7 becomes 3.
I will code this later.

--
assignee:  -> terry.reedy

___
Python tracker 

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



[issue20983] Python 3.4 'repair' Windows installation does not install pip & setuptools packages

2014-04-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Don: This is not a helpdesk system, but a bug tracker; the difference is that 
we don't help you here, but you help us.

If you need help yourself, I suggest subscribing to python-list, at

https://mail.python.org/mailman/listinfo/python-list

and posting a question there.

--

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Sure, here is the information on how to create a patch - 
https://docs.python.org/devguide/

It could feel that there are multiple steps, but the process is easy.

--

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

You should have a look at the following guides:

https://docs.python.org/devguide/docquality.html
https://docs.python.org/devguide/patch.html

--
nosy: +kushal.das

___
Python tracker 

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



[issue21231] Issue a python 3 warning when old style classes are defined.

2014-04-14 Thread Alex Gaynor

New submission from Alex Gaynor:

This will assist in porting applications from Python2 to Python3.

--
files: old-style-classes.diff
keywords: patch
messages: 216273
nosy: alex
priority: normal
severity: normal
status: open
title: Issue a python 3 warning when old style classes are defined.
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file34865/old-style-classes.diff

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Yury Selivanov

Changes by Yury Selivanov :


--
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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0c35d3616df5 by Yury Selivanov in branch '3.4':
asyncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1
http://hg.python.org/cpython/rev/0c35d3616df5

New changeset 13ff8645be57 by Yury Selivanov in branch 'default':
syncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1
http://hg.python.org/cpython/rev/13ff8645be57

--

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Yury Selivanov

Yury Selivanov added the comment:

> [...] CoroWrapper.send() signature is different from a real generator's 
> send() method, but I think that send() to a coroutine is an internal detail 
> anyway [...]

Yeah, and since it's used in debug mode only, I think we should be safe.

> When you commit, can you do upstgream (Tulip) first?

Sure, this patch was for tulip code.

--

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-14 Thread Evens Fortuné

Evens Fortuné added the comment:

Do you have some documentation on how to do a "docs patch" ?

I'm sorry this is the first time I'm reporting a bug.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

The precedent has already been set by the 'cleandoc' function, I think.  This 
one seems to go right along with that one.

--

___
Python tracker 

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



[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-14 Thread Evens Fortuné

Evens Fortuné added the comment:

I don't quite understand what you are asking me. You need a copy of the 
document ? 

You can find an example at this link: 
https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen

--

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks.

The patch contains a number of lines that are not wrapped to <80, which is one 
of our requirements.  It would be great to get that fixed.  (In the 
documentation, you can use \ to wrap the prototype line.)

There is non-ascii in one place in the documentation...probably an em-dash, 
which is written in sphinx as '---'.

Also, please remove the news entry from the patch, it will just make it harder 
to apply (and is in the wrong place anyway...we add entries at the top of the 
appropriate section, not the bottom).

--

___
Python tracker 

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



[issue20578] BufferedIOBase.readinto1 is missing

2014-04-14 Thread Nikolaus Rath

Changes by Nikolaus Rath :


Added file: http://bugs.python.org/file34864/benchmark_r3.py

___
Python tracker 

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



[issue20578] BufferedIOBase.readinto1 is missing

2014-04-14 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Attached is an updated patch that 
 - removes the code duplication in _pyio.BufferedIOBase
 - adds an internal _readinto helper method to _pyio.BufferedReader that makes 
the implementation similar to io.BufferedReader.
 - implements _pyio.BuffereadReader.{readinto,readinto1} in terms of the new 
helper method and, as a side effect, also increases their performance.


Performance of the _pyio implementation on my system is:

pre-patch:
readinto:  5.130e+00 seconds
readinto1 not available

post-patch:
readinto:  2.039e+00 seconds
readinto1: 1.995e+00 seconds

--
Added file: http://bugs.python.org/file34863/issue20578_r3.diff

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Glenn.

--
resolution:  -> fixed
stage:  -> 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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84ccbb961f26 by R David Murray in branch 'default':
#21215: update debian/ubuntu build-dep instructions.
http://hg.python.org/devguide/rev/84ccbb961f26

--
nosy: +python-dev

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

A simple docs patch would definitely help here. Thanks for the bug report.

--
nosy: +orsenthil

___
Python tracker 

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



[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Hello Evens,
If you can, then please attach a doc to this and we and fix this soon.

--
nosy: +orsenthil

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, looks good. I tried your test with my earlier workaround and the wrapper 
got deallocated too early, proving that my workaround was indeed wrong and your 
test is useful. I am still concerned theoretically that the CoroWrapper.send() 
signature is different from a real generator's send() method, but I think that 
send() to a coroutine is an internal detail anyway, so I can live with that, 
and I don't see another work-around.

When you commit, can you do upstgream (Tulip) first?

--

___
Python tracker 

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



[issue21230] imghdr does not accept adobe photoshop mime type

2014-04-14 Thread Faiz Abbasi

New submission from Faiz Abbasi:

Python 2.7

I noticed a recurring bug we've had attempting to send a particular JPEG image 
in emails:

email.mime.image.__init__
: Could not guess image MIME subtype

After looking into the imghdr.what and tests source code, I noticed that this 
JPEG image begins with the following data: 
'\xff\xd8\xff\xee\x00\x0eAdobe\x00d\x00\x00\x00\x00\x00\xff\xed\x008Photoshop '

I've attached the image in question to this bug report.

There's two functions for asserting an image is JPEG format, test_jpeg and 
test_exif. I'd like to propose another function for resolving Adobe Photoshop 
image formats.

Unless, of course, this is expected behavior?

Thanks!

--
components: email
files: image.jpeg
messages: 216260
nosy: barry, benjamin.peterson, faiz, r.david.murray
priority: normal
severity: normal
status: open
title: imghdr does not accept adobe photoshop mime type
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file34862/image.jpeg

___
Python tracker 

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



[issue1704474] optparse tests fail under Jython

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Well, we want it to apply to python3 as well, since we want to see jython 
support python3 eventually :)

Also, optparse is present in python3 for backward compatibility reasons 
only...there were very few changes between the time python3 branched from 
python2 and argparse superceeded optparse.  So the differences between the two 
code bases should be minimal.  Obviously you can't test against jython3, since 
it doesn't exist, but what you can do is make the patch based on the python2 
optparse, and then see if the patch applies cleanly to python3.  It probably 
won't, but as far as I can see from a quick diff, most of the changes will be 
related to the changes between python2 syntax and python3 syntax, and will be 
easy to forward port even without being able to test it directly against jython.

--

___
Python tracker 

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



[issue1191964] asynchronous Subprocess

2014-04-14 Thread Josiah Carlson

Changes by Josiah Carlson :


Added file: http://bugs.python.org/file34861/subprocess_5.patch

___
Python tracker 

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



[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-14 Thread Evens Fortuné

Evens Fortuné added the comment:

I forgot to tell that it is in section "20.5. urllib.request — Extensible 
library for opening URLs" for Python 3.2.5

--

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-14 Thread Evens Fortuné

New submission from Evens Fortuné:

In the Python Standard Library, at the end of :
 - Section "20.7.3. Examples" of "20.7. httplib — HTTP protocol client" (for 
Python 2.7.6) 
 - Section "20.10.3. Examples" of "20.10. http.client — HTTP protocol client" 
(for Python 3.2.5)
 - Section "21.12.3. Examples" of "21.12. http.client — HTTP protocol client" 
(for Python 3.3.5, Python 3.4.0, and Python 3.5a0)

the last example is described this way (change httplib for http.client for 
Python 3.2+):



>>> # This creates an HTTP message
>>> # with the content of BODY as the enclosed representation
>>> # for the resource http://localhost:8080/foobar
...
>>> import httplib
>>> BODY = "***filecontents***"
>>> conn = httplib.HTTPConnection("localhost", 8080)
>>> conn.request("PUT", "/file", BODY)
>>> response = conn.getresponse()
>>> print response.status, response.reason
200, OK



Is it possible that the request method should have been called this way:

conn.request("PUT", "/foobar", BODY)
  ^^
Thank you

--
assignee: docs@python
components: Documentation
messages: 216257
nosy: EvensF, docs@python
priority: normal
severity: normal
status: open
title: Path used for HTTP PUT request doesn't match the description
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Glenn.

--
resolution:  -> fixed
stage:  -> 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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 57fb5441a4aa by R David Murray in branch 'default':
#15916: if there are no docstrings, make empty suite, not an error.
http://hg.python.org/cpython/rev/57fb5441a4aa

--
nosy: +python-dev

___
Python tracker 

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



[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?

2014-04-14 Thread Evens Fortuné

New submission from Evens Fortuné:

In the Python Library documentation, in section "21.6. urllib.request — 
Extensible library for opening URLs", in the description of the 
urllib.request.urlopen() function it is writen:

-

[…]
For http and https urls, this function returns a http.client.HTTPResponse 
object which has the following HTTPResponse Objects methods.

For ftp, file, and data urls and requests explicity handled by legacy […]

-

The first sentence seemed to imply that something is supposed to be specified 
if I understand correctly. Is it me missing something ?

--
assignee: docs@python
components: Documentation
messages: 216254
nosy: EvensF, docs@python
priority: normal
severity: normal
status: open
title: Missing enumeration of HTTPResponse Objects methods of 
urllib.request.urlopen's http.client.HTTPResponse?
type: enhancement
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-14 Thread leewz

New submission from leewz:

Python's `decimal.Decimal` doesn't seem to like taking modulo or intdiv of 
large Decimals by integers (where "large" depends on how many digits are 
internally stored).

>>> from decimal import *
>>> getcontext().prec
28
>>> Decimal(10**29)%1
Traceback (most recent call last):
  File "", line 1, in 
decimal.InvalidOperation: []
>>> getcontext().prec=50
>>> Decimal(10**29)%1
Decimal('0')

Same for `Decimal(10**29)//1`

This is a logical problem: "Alice has a 100-digit number which begins with 
1543256. What is the last digit?"

But I found the error hard to understand. Searching for "DivisionImpossible" 
didn't turn up anything immediate (it wasn't added to the official docs?). I 
was most of the way through writing out a question to StackOverflow when it 
clicked. (Also, why is it an InvalidOperation that holds an exception as a 
message? Never saw that before.)

Suggestions:
- Improve docs with further examples. The examples of InvalidOperation are 
logical MATH errors (e.g. division by 0), not logical PROGRAMMING errors.
- Uh, maybe the error message could be changed to something like, "The answer 
you seek lies beyond the mantissa." Or more sanely, "Not enough precision to 
compute the answer." Or something else that hints to me to look into precision.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 216253
nosy: docs@python, leewz
priority: normal
severity: normal
status: open
title: Decimal class error messages for integer division aren't good
type: enhancement
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



[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 339c79791b65 by Benjamin Peterson in branch '2.7':
when an exception is raised in fdopen, never close the fd (changing on my mind 
on #21191)
http://hg.python.org/cpython/rev/339c79791b65

--

___
Python tracker 

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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Yes, they indeed are. Thank you!

--
resolution:  -> fixed
stage:  -> 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



[issue10983] Errors in http.client.HTTPConnection class (python3)

2014-04-14 Thread Nikolaus Rath

Nikolaus Rath added the comment:

This issue can be closed. The testcases have been added in 39ee3286d187.

--

___
Python tracker 

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



[issue10523] argparse has problem parsing option files containing empty rows

2014-04-14 Thread Caelyn McAulay

Caelyn McAulay added the comment:

The current behaviour takes empty lines and interprets them as empty strings. 

The attached demonstration script shows the error occurring. The first case is 
a simple example to illustrate what happens in the general case. The second 
case shows empty lines being interpreted as empty strings and assigned to 
arguments.

The third case, despite being very similar to the first, results in argparse 
exiting with an error message. Internally, what is happening is, after taking 
the 'foo' and 'baz' arguments and assigning them 'bar' and 'quux' respectively, 
it reads in an argument "", which it does not recognize. And produces the 
following error message:

"argparse_example.py: error: unrecognized arguments:"

The error message, in it's current form, is kind of opaque.

For the third case, if we move the blank line to between 'bar' and '-baz', the 
same error results, as again it tried to interpret the blank line as an 
argument. If we move the blank line to the start of the file, same thing again. 

If we move the blank line between '-foo' and 'bar', instead the error reads: 
"argparse_example.py: error: unrecognized arguments: bar" - which is at least 
somewhat comprehensible.

The question is, how should blank lines be handled? 

Should they be accepted as possible values for arguments? 

If they fall into spaces where arguments (versus values for arguments) are 
expected, should we skip them?

If the current handling is fine, I would propose updating the documentation to 
add the following after the paragraph that begins "Arguments read from a file 
...":

"By default, blank lines are interpreted as empty strings. An empty string is 
not an acceptable argument; but it is an acceptable value for an argument."

And changing the way that the error from argparse is displayed so that it is 
more obvious what "argparse_example.py: error: unrecognized arguments:" means.

--
nosy: +math_foo
Added file: http://bugs.python.org/file34860/argparse_example.py

___
Python tracker 

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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 008486e18e90 by R David Murray in branch '3.4':
#15104: add backtick code markup.
http://hg.python.org/cpython/rev/008486e18e90

New changeset 14e874736d3a by R David Murray in branch 'default':
Merge: #15104: add backtick code markup.
http://hg.python.org/cpython/rev/14e874736d3a

--

___
Python tracker 

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



[issue18262] ZipInfo.external_attr are not documented

2014-04-14 Thread Alex Lord

Alex Lord added the comment:

And here's the 3.4 and 3.5 patch

--
Added file: http://bugs.python.org/file34859/Issue18262_34_35.patch

___
Python tracker 

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



[issue18262] ZipInfo.external_attr are not documented

2014-04-14 Thread Alex Lord

Alex Lord added the comment:

Here's a documentation patch for 2.7 that informs the users that Zipfile.extra 
and Zipfile.extraall don't save permissions and that Zipfile.writestr will use 
ZipInfo.extra_attr or default to chmod permission set of 0600.

--
keywords: +patch
nosy: +Alex.Lord
versions:  -Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file34858/Issue18262_27.patch

___
Python tracker 

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-14 Thread A Kaptur

A Kaptur added the comment:

This patch adds tests demonstrating broken behavior inspect.getsource and 
inspect.getsourcelines of decorators containing lambda functions, and modifies 
inspect.getsourcelines to behave correctly.

We use co_lnotab to extract line numbers on all objects with a code object. 
inspect.getsourcelines can also take a class, which cannot use co_lnotab as 
there is no associated code object.

@ballingt and I paired on this patch.

Some open questions about inspect.getsource not created or addressed by this 
patch:
- Is this a bug that should be patched in previous versions as well?
- the docs for say it can take a traceback. What is the correct behavior here?  
There aren't any tests at the moment. We suggest the line of code that caused 
the traceback, i.e. the line at tb.tb_lineno
-  We added tests of decorated classes. The source of decorated classes does 
not include the decorators, which is different than the usual behavior of 
decorated functions. What is the correct behavior here?
- inspect.getblock and inspect.BlockFinder use the term "block" in a way that 
is inconsistent with its typical use in the interpreter (that is, in ceval.c). 
Should this be renamed? If so, to what? ("chunk"?)

--
keywords: +patch
nosy: +akaptur
stage:  -> patch review
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file34857/issue21217.patch

___
Python tracker 

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



[issue8931] '#' has no effect with 'c' type

2014-04-14 Thread Mark Dickinson

Changes by Mark Dickinson :


--
title: '#' has no affect with 'c' type -> '#' has no effect with 'c' type

___
Python tracker 

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Reviewed the issue and correct rollbacks and commits were applied.
This ticket should be closed. Thanks!

--
status: open -> closed

___
Python tracker 

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



[issue13244] WebSocket schemes in urllib.parse

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Reading both the RFCs and requirements, I see that this is already taken care.

Note: we are actually have unencoded fragment like # and RFCs talk about 
fragments with # character only. If you want the behavior of parse with 
urlencoded to match un-urlencoded one, that's a different requirement and not a 
scope here.

Here is 3.5 output

$ ./python.exe
Python 3.5.0a0 (default:528234542ff0, Apr 14 2014, 18:25:27)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.parse
>>> p = urllib.parse.urlparse('ws://example.com/something?query=foo#bar')
>>> p
ParseResult(scheme='ws', netloc='example.com', path='/something', params='', 
query='query=foo', fragment='bar')
>>> p = urllib.parse.urlparse('ws://example.com/something#bar')
>>> p
ParseResult(scheme='ws', netloc='example.com', path='/something', params='', 
query='', fragment='bar')


Here is 2.7.6 output


$ ./python.exe
Python 2.7.6+ (2.7:7dab4feec126+, Jan 11 2014, 15:25:20)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urlparse
>>> ^D
[localhost 2.7]$ ./python.exe
Python 2.7.6+ (2.7:7dab4feec126+, Jan 11 2014, 15:25:20)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from urlparse import urlparse
>>> urlparse('ws://example.com/something?query=foo#bar')
ParseResult(scheme='ws', netloc='example.com', path='/something', params='', 
query='query=foo', fragment='bar')
>>> urlparse('ws://example.com/something#bar')
ParseResult(scheme='ws', netloc='example.com', path='/something', params='', 
query='', fragment='bar')
>>>


I find it satisfactory and I think, this bug should be closed. Thank you!

--
assignee:  -> orsenthil
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue21204] multiprocessing example does not work on Windows

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

To clarify, the commit in that issue is in 2.7.  So if there is something else 
that isn't in 2.7, it is a different issue.

--

___
Python tracker 

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



[issue21204] multiprocessing example does not work on Windows

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

If you look at the source code for 2.7, it is clear that patch has been applied.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-14 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Yury and David, please, can you discuss about this point, or just close this 
ticket if this one is useless.

Thank you

--

___
Python tracker 

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Stefan Krah

Stefan Krah added the comment:

FreeBSD 9.0 has the same broken install:

$ openssl version
OpenSSL 0.9.8y 5 Feb 2013

$ ls /usr/include/openssl/ecd*
/usr/include/openssl/ecdh.h /usr/include/openssl/ecdsa.h


I'm inclined to view this as an OS issue. FreeBSD 9.2 (koobs'
buildslave) apparently does not have this problem.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-14 Thread Yury Selivanov

Yury Selivanov added the comment:

I don't like this idea. inspect module is about introspection, and not about 
interpreting its results. I'd keep this function in pydoc and document it if 
there is noticeable demand for it.

--

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Kushal.  Sorry it took so long to get this committed :)

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> behavior
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue21198] Minor tarfile documentation bug

2014-04-14 Thread Matt Chaput

Matt Chaput added the comment:

Oops! Yes, I accidentally included a bunch of other crap.

--

___
Python tracker 

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



[issue21198] Minor tarfile documentation bug

2014-04-14 Thread Matt Chaput

Changes by Matt Chaput :


Removed file: http://bugs.python.org/file34824/issue21198.patch

___
Python tracker 

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



[issue17498] error responses from server are masked in smtplib when server closes connection

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3c441e9ccf87 by R David Murray in branch '3.4':
#17498: Defer SMTPServerDisconnected errors until the next command.
http://hg.python.org/cpython/rev/3c441e9ccf87

New changeset 842014ab1c06 by R David Murray in branch 'default':
Merge #17498: Defer SMTPServerDisconnected errors until the next command.
http://hg.python.org/cpython/rev/842014ab1c06

--
nosy: +python-dev

___
Python tracker 

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



[issue20874] Tutorial section on starting python is out of date

2014-04-14 Thread Rafael Mejia

Rafael Mejia added the comment:

I've resubmitted the patch with the minimum lines changed and no trailing white 
space.

--
Added file: http://bugs.python.org/file34856/issue_20874_2.patch

___
Python tracker 

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



[issue17861] put opcode information in one place

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

New patch with proper changesets.

--
Added file: http://bugs.python.org/file34855/issue17861_v4.patch

___
Python tracker 

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-14 Thread Steven Hiscocks

Steven Hiscocks added the comment:

Just to add for those interested: a possible work around solution is using 
"os.path.sameopenfile" to check fds against another known fd for urandom.

And for those wish to have a bit of fun (and maybe a security consideration):
python -c "import os;os.urandom(1);os.closerange(3,256);fd = 
open('/dev/zero');print(os.urandom(10))"
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

The patch looks good, but 'splitdoc' needs to remain a valid name for the 
function in the pydoc namespace.  You could just add 'splitdoc = 
inspect.splitdoc' after the import statements.  (The reason it needs to remain 
valid is for backward compatibility...there may be people who discovered it and 
have been importing it from pydoc.)

--
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



[issue8931] '#' has no affect with 'c' type

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


--
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



[issue21222] Mock create_autospec with name argument fails

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

Fix for the issue with test case. We are checking name in keyword arguments, if 
found replace _name with it and delete it from keyword arguments.

--
keywords: +patch
Added file: http://bugs.python.org/file34854/issue21222.patch

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-14 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

I move the pydoc.splitdoc function to the inspect module.
Update the documentation.
Add a unittest for this new function.

I can provide an other patch for the backward-compatiblity if this function is 
used by an other module than pydoc.

--
keywords: +patch
nosy: +matrixise
Added file: http://bugs.python.org/file34853/issue12916_1.patch

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

Here is an updated patch that applies cleanly to head. Tests pass against head 
of repo.

--
nosy: +Glenn.Jones
Added file: http://bugs.python.org/file34852/issue15795_updated.patch

___
Python tracker 

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



[issue17078] string.Template.safe_substitute hard-wires "braces" as {}

2014-04-14 Thread Sam Kimbrel

Sam Kimbrel added the comment:

Florent Xicluna already fixed this in r84888 for 3.2+; I've tested that the 
patch applies cleanly to 2.7 and tests pass. Someone with the commit bit should 
transplant that commit into 2.7 as it does not change the public API to this 
module.

--
nosy: +sam.kimbrel

___
Python tracker 

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



[issue1191964] asynchronous Subprocess

2014-04-14 Thread Josiah Carlson

Josiah Carlson added the comment:

I ended up eliminating the overlapped IO cancel call on Windows. Better to be 
correct than to minimize internal state. Instead, we keep a reference to the 
overlapped IO object, and any attempts to write to the child stdin before the 
previous overlapped IO completes are kicked back as a 0 byte write. The 
communicate() method does the right thing with pre-existing non-blocking 
writes, whether input is passed or not.

I also eliminated universal_newline support for non-blocking reads and writes 
to prevent error conditions on edge cases:

On the write side of things, you could end up with a partial multi-byte 
character write, which with universal newlines, would be impossible to finish 
the send using the public API without first modifying state attributes on the 
Popen object (disabling universal newlines for a subsequent bytes 
write_nonblocking() call).

On the read side of things, if you get a partial read of a multi-byte 
character, then the subsequent decode operation would fail with a 
UnicodeDecodeError. Though you could pull the original bytes from the 
exception, that's an awful API to create.

--
Added file: http://bugs.python.org/file34851/subprocess_4.patch

___
Python tracker 

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



[issue16278] Improve os.rename documentation and tests

2014-04-14 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy:  -orsenthil

___
Python tracker 

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



[issue10318] "make altinstall" installs many files with incorrect shebangs

2014-04-14 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy:  -orsenthil

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Yury Selivanov

Yury Selivanov added the comment:

Please see the corowrapper_02.patch. I've removed the version check, now it's 
much simpler.

--
Added file: http://bugs.python.org/file34850/corowrapper_02.patch

___
Python tracker 

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



[issue21223] fix test_site/test_startup_imports when some of the extensions are built as builtins

2014-04-14 Thread Eric Snow

Eric Snow added the comment:

Looks good to me.  This should not impact the standard build, but is useful for 
alternate builds.  Does something similar need to happen to also exclude frozen 
modules?

--
nosy: +brett.cannon, ncoghlan

___
Python tracker 

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



[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Did you hand test it?  Also, you could open a new issue to add tests for the 
ftplib cli, and probably improve and document it?  It was designed as a test, 
but some people may be using it and it might even be actually useful :)

--

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

Uploaded new patch with a little more about getting build-deps installed.

--
Added file: http://bugs.python.org/file34849/issue21215.patch

___
Python tracker 

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



[issue21220] Enhance obmalloc allocation strategy

2014-04-14 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
nosy: +larry

___
Python tracker 

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



[issue12220] minidom xmlns not handling spaces in xmlns attribute value field

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks.  Could you also change 'Invalid syntax' to 'Unsupported syntax', per 
the last bit of the discussion between Terry and I?

--

___
Python tracker 

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




[issue1704474] optparse tests fail under Jython

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

I'll use Jython 2.7. The Jython people can backport the fix to 2.5.4, if they 
want it there too.

So... this is marked as related to Python 3.2, but Jython is on Python 2 of 
course. I'll just take the version as being wrong. So, what should the patch 
that fixes this be based on? Not Python 3, obviously. But CPython 2.7's latest? 
Or the Jython 2.7 repository? And where should the fix be committed? In 
CPython's repository, or in Jython?

--

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2014-04-14 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

gunicorn has an implementation of the HTTP/1.1 protocol, we can ask to the 
author of this project if we can use its code and reuse it in the standard 
library.

--

___
Python tracker 

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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am a bit puzzled. According to
https://docs.python.org/2.7/using/cmdline.html#interface-options __main__.py 
(not indexed) has been supported since 2.5. On the other hand, recursively 
grepping Lib for 'e' in __main__.py files hits about 20 files in 3.4 but only 2 
in 2.7. Moreover, those two files fail for trying to do relative imports: "from 
.main import main, TestProgram, USAGE_AS_MAIN".

--

___
Python tracker 

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



[issue21226] PyImport_ExecCodeModuleObject not setting module attributes

2014-04-14 Thread Trevor Caira

New submission from Trevor Caira:

In Python/import.c, PyImport_ExecCodeModuleObject creates a new module object 
but doesn't set all of the attributes required for modules, such as __spec__ or 
__loader__.

This breaks mod_wsgi from 3.3 and up, which depends on 
PyImport_ExecCodeModuleEx, which delegates to PyImport_ExecCodeModuleObject for 
its module creation logic. See 
https://code.google.com/p/modwsgi/source/browse/mod_wsgi/mod_wsgi.c#6289

--
components: Library (Lib)
messages: 216217
nosy: brett.cannon, eric.snow, ncoghlan, trevor3
priority: normal
severity: normal
status: open
title: PyImport_ExecCodeModuleObject not setting module attributes
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue20874] Tutorial section on starting python is out of date

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Actually I take it back, the patch as a patch also has a couple issues: the 
line lengths are not in fact less than 80 characters in any case, and there is 
trailing whitespace on several lines.

Could you redo it with just the minimum lines changed and no trailing 
whitespace?

--

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum

Guido van Rossum added the comment:

Yuri, thanks for the test, but why would the patch need a version check? 
Shouldn't the work-around work equally well in Python versions that don't need 
it? Maybe all we need is a comment explaining that it is a work-around and a 
hint that eventually we should change it back?

--

___
Python tracker 

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



[issue20874] Tutorial section on starting python is out of date

2014-04-14 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

David, thank you for this comment about the automatic activation of the command 
line editing.

--

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

It may not just the be the version, but the capabilities. We have ensure that 
capabilities are met/added before updated the version. Thanks for filing the 
issue.

--
nosy: +orsenthil

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

Added docs to patch

--
Added file: http://bugs.python.org/file34848/issue15916-with-docs.patch

___
Python tracker 

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



[issue20874] Tutorial section on starting python is out of date

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Just as a point of information, when making a patch like this it is best to 
change the smallest number of lines possible, without worrying about line 
wrapping.  This allows us to see just what was changed.  The committer can then 
reflow the paragraph (actually I prefer to commit the minimum change and then 
do a separate reflow commit).

The patch itself looks fine.  Stéphane: the original docs didn't explain it 
either, and in 3.4 you don't have to do anything to enable it.  (That is, if it 
isn't automatically enabled, it *can't* be turned on, because readline isn't 
available.)

--

___
Python tracker 

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad74229a6fba by Eric V. Smith in branch '3.4':
Issue #13598: Add auto-numbering of replacement fields to string.Formatter.
http://hg.python.org/cpython/rev/ad74229a6fba

--
nosy: +python-dev

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2014-04-14 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

Hi,

With this issue, I would like to ask you to use the last version of the HTTP 
protocol in the BaseHTTPRequestHandler for Python 3.5.
Because this one uses the version 1.0 of the protocol for the 
backward-compatibility.

https://docs.python.org/3/library/http.server.html?highlight=protocol_version#http.server.BaseHTTPRequestHandler.protocol_version

When we develop an web app with Flask/Werkzeug or an other tool, the default 
version of 
the protocol is "HTTP/1.0". If we use Gunicorn, the protocol version is 
HTTP/1.1 and not 1.0, but this one can support the old version.

So, I propose to change the default version to the HTTP/1.1. It seems that the 
code of the server can handle this version without any problem.

HTTP 1.0 - http://www.ietf.org/rfc/rfc1945.txt - 1996
HTTP 1.1 - http://www.ietf.org/rfc/rfc2616.txt - 1999

In 2014, I think we can move to HTTP 1.1 by default.

Regards,

Stephane

--
components: Library (Lib)
messages: 216206
nosy: matrixise
priority: normal
severity: normal
status: open
title: BaseHTTPRequestHandler, update the protocol version to http 1.1 by 
default?
versions: Python 3.5

___
Python tracker 

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



[issue21225] io.py: Improve docstrings for classes

2014-04-14 Thread A.M. Kuchling

New submission from A.M. Kuchling:

io.py contains the following to declare ABCs for some of its classes:

class IOBase(_io._IOBase, metaclass=abc.ABCMeta):
pass

(and similarly for RawIOBase, BufferedIOBase, TextIOBase).

_io._IOBase has an extensive docstring, but IOBase doesn't. (Python doesn't 
inherit parent-class docstrings, on the theory that the subclass may change 
things that make the docstring invalid.)

I propose the attached patch.

--
files: io-copy-docstrings.patch
keywords: easy, patch
messages: 216210
nosy: akuchling
priority: normal
severity: normal
stage: patch review
status: open
title: io.py: Improve docstrings for classes
type: enhancement
Added file: http://bugs.python.org/file34847/io-copy-docstrings.patch

___
Python tracker 

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



[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-14 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's an updated patch, for PyLong_AsUnsignedLongAndOverflow only, including 
docs and tests.

--
keywords: +patch
Added file: 
http://bugs.python.org/file34846/pylong_as_unsigned_long_and_overflow.patch

___
Python tracker 

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50fe497983fd by Eric V. Smith in branch '3.4':
Issue #13598: Added acknowledgements to Misc/NEWS.
http://hg.python.org/cpython/rev/50fe497983fd

--

___
Python tracker 

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


--
resolution:  -> fixed
stage: patch review -> 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



[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-04-14 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.5

___
Python tracker 

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



[issue984870] curses: getmaxyx() breaks when the window shrinks

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

I get the same traceback. The traceback happens only when the window is shrunk 
below the size specified in derwin(). It's easy to see this by changing the 
first and second arguments to the derwin call to something like 2, 2, and then 
you can resize the window to a much smaller size without getting this 
exception. (My curses.version is 2.2 also. Running on OSX Mavericks.)

The getmaxyx() function reports the correct size when the window is shrunk. 
Also note that the upstream bug has been closed, with the comment "Not seen in 
python 2.7".

So I think we can close this. Maybe we want to document the behavior of 
derwin() and related functions of raising _curses.error when the dimensions of 
the terminal are smaller than that of the window, though? (Or maybe raise a 
better exception?) That should probably be another bug report, though.

--
nosy: +chrish42

___
Python tracker 

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



[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 211eeb97b352 by Gregory P. Smith in branch '3.4':
Add conditional code for android's lack of definition of SYS_getdent64.
http://hg.python.org/cpython/rev/211eeb97b352

New changeset 9f89958ded0a by Gregory P. Smith in branch 'default':
Add conditional code for android's lack of definition of SYS_getdent64.
http://hg.python.org/cpython/rev/9f89958ded0a

--
nosy: +python-dev

___
Python tracker 

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-14 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-14 Thread Tatiana Al-Chueyr

Tatiana Al-Chueyr added the comment:

uploading test file

--
Added file: http://bugs.python.org/file34845/test_argparse_mutex_with_title.py

___
Python tracker 

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



[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-14 Thread Tatiana Al-Chueyr

Changes by Tatiana Al-Chueyr :


Removed file: http://bugs.python.org/file34844/test_argparse_mutex_with_title.py

___
Python tracker 

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



[issue1704474] optparse tests fail under Jython

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

I'm guessing they've got a local fix in the release candidate and won't change 
even their test code there, so I'd guess the beta.  But the jython folks would 
really be the ones to ask.  Perhaps they will respond here (they are not at 
pycon).

--

___
Python tracker 

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



[issue21223] fix test_site/test_startup_imports when some of the extensions are built as builtins

2014-04-14 Thread Matthias Klose

New submission from Matthias Klose:

fix test_site/test_startup_imports when some of the extensions are built as 
builtins.

--- a/Lib/test/test_site.py Mon Apr 14 12:24:37 2014 -0400
+++ b/Lib/test/test_site.py Mon Apr 14 22:17:57 2014 +0200
@@ -459,7 +459,8 @@
 # http://bugs.python.org/issue19218>
 collection_mods = {'_collections', 'collections', 'functools',
'heapq', 'itertools', 'keyword', 'operator',
-   'reprlib', 'types', 'weakref'}
+   'reprlib', 'types', 'weakref'
+  }.difference(sys.builtin_module_names)
 self.assertFalse(modules.intersection(collection_mods), stderr)

the test now passes indepedent of the status of _collections (builtin or 
extension).

--
components: Tests
keywords: patch
messages: 216200
nosy: doko, eric.snow
priority: normal
severity: normal
stage: patch review
status: open
title: fix test_site/test_startup_imports when some of the extensions are built 
as builtins
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue17660] mock.patch could whitelist builtins to not need create=True

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e457de60028c by Michael Foord in branch 'default':
Closes issue 17660. You no longer need to explicitly pass create=True when 
patching builtin names.
http://hg.python.org/cpython/rev/e457de60028c

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> 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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Jeff Ramnani

Jeff Ramnani added the comment:

> Really? Apple's packaging looks almost criminal here.

Apple has deprecated their bundled version of OpenSSL. This issue has more 
details, http://bugs.python.org/issue17128

--
nosy: +jramnani

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


--
versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

OK, if you think it is worthwhile in the text, then sure.  But yeah, not as a 
..note.  And yes, I think we should keep backporting relevant doc patches.  
Especially since Google results still land one on the 2.7 docs...

--

___
Python tracker 

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



[issue20956] tokenize module claims tokenize.tokenize returns namedtuple, but it doesn't

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d4f5a88b94b4 by Terry Jan Reedy in branch '2.7':
Closes #20956: 2.7 tokenize does not produce named tuples. Patch by Sam Kimbrel.
http://hg.python.org/cpython/rev/d4f5a88b94b4

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> 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



[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2014-04-14 Thread Michael Foord

Changes by Michael Foord :


--
resolution:  -> fixed
stage: commit review -> 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



[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e3c64470629 by Michael Foord in branch '3.4':
Issue 17826. Setting an iterable side_effect on a mock created by 
create_autospec now works
http://hg.python.org/cpython/rev/1e3c64470629

--
nosy: +python-dev

___
Python tracker 

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



[issue21204] multiprocessing example does not work on Windows

2014-04-14 Thread jmaki

jmaki added the comment:

Upon further investigation, this may be related to:
http://bugs.python.org/issue1378
However, it seems the issue is not checked-in to Windows release for 2.x?

Regards,
John

--

___
Python tracker 

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



  1   2   3   >