[issue21817] `concurrent.futures.ProcessPoolExecutor` swallows tracebacks

2014-08-22 Thread Claudiu Popa

Claudiu Popa added the comment:

Any type of feedback regarding this approach will be appreciated.

--

___
Python tracker 

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Jayanth Koushik

Jayanth Koushik added the comment:

The whole page on compound statements seems to be rife with inconsistencies.

--

___
Python tracker 

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



[issue22248] urllib.request.urlopen raises exception when 30X-redirect url contains non-ascii chars

2014-08-22 Thread Tomas Groth

New submission from Tomas Groth:

Running this simple test script produces the traceback show below.

import urllib.request
page = 
urllib.request.urlopen('http://legacy.biblegateway.com/versions/?vid=DN1933&action=getVersionInfo#books')

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.4/urllib/request.py", line 153, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 461, in open
response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 571, in http_response
'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 493, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 676, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 455, in open
response = self._open(req, data)
  File "/usr/lib/python3.4/urllib/request.py", line 473, in _open
'_open', req)
  File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain
result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 1258, in http_open
return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.4/urllib/request.py", line 1232, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.4/http/client.py", line 1065, in request
self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1093, in _send_request
self.putrequest(method, url, **skips)
  File "/usr/lib/python3.4/http/client.py", line 957, in putrequest
self._output(request.encode('ascii'))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-32: 
ordinal not in range(128)


Using curl we can see that there is a redirect to an url with a special char:
$ curl -vs 
"http://legacy.biblegateway.com/versions/?vid=DN1933&action=getVersionInfo#books";
 >DN1933
* Hostname was NOT found in DNS cache
*   Trying 23.23.93.211...
* Connected to legacy.biblegateway.com (23.23.93.211) port 80 (#0)
> GET /versions/?vid=DN1933&action=getVersionInfo HTTP/1.1
> User-Agent: curl/7.35.0
> Host: legacy.biblegateway.com
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
* Server nginx/1.4.7 is not blacklisted
< Server: nginx/1.4.7
< Date: Fri, 22 Aug 2014 08:35:30 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< Connection: keep-alive
< X-Powered-By: PHP/5.5.7
< Set-Cookie: bg_id=1b9a80d5e6d545487cfd153d6df65c4e; path=/; 
domain=.biblegateway.com
< Set-Cookie: a9gl=0; path=/; domain=.biblegateway.com
< Location: 
http://legacy.biblegateway.com/versions/Dette-er-Biblen-på-dansk-1933/
< 
* Connection #0 to host legacy.biblegateway.com left intact


When the redirect-url doesn't contain special chars everything works as 
expected, like with this url: 
"http://legacy.biblegateway.com/versions/?vid=DNB1930&action=getVersionInfo#books";

--
components: Library (Lib)
messages: 225651
nosy: tomasgroth
priority: normal
severity: normal
status: open
title: urllib.request.urlopen raises exception when 30X-redirect url contains 
non-ascii chars
type: behavior
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



[issue13938] 2to3 fails to convert types.StringTypes appropriately

2014-08-22 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> commit review
type:  -> enhancement

___
Python tracker 

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



[issue16599] unittest: Access test result from tearDown

2014-08-22 Thread Claudiu Popa

Changes by Claudiu Popa :


--
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue22248] urllib.request.urlopen raises exception when 30X-redirect url contains non-ascii chars

2014-08-22 Thread Tomas Groth

Tomas Groth added the comment:

Small correction. Use this url for a working redirect instead of the one given 
at the end of the first comment:
http://legacy.biblegateway.com/versions/?vid=ESV&action=getVersionInfo#books

--

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord

Michael Foord added the comment:

This seems like a reasonable improvement, I'd be in favour. I'd be *slightly* 
concerned that a test can override an explicit verbosity setting of the user, 
but I guess that annoyance is up to the test writer (they should check for an 
explicit setting first).

--

___
Python tracker 

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



[issue22245] test_urllib2_localnet prints out error messages

2014-08-22 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Interesting. I had not noticed these with my run on Mac and neither did 
Buildbots report. Looks like explicit closing of wfile do_GET method can be 
cause of tis problem.

--

___
Python tracker 

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



[issue22247] More incomplete module.__all__ lists

2014-08-22 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2014-08-22 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> patch review
type:  -> behavior
versions: +Python 3.5 -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



[issue22245] test_urllib2_localnet prints out error messages

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 48a77fbfd6cb by Senthil Kumaran in branch '3.4':
Fix issue22245 - Fix urllib2_localnet test.
http://hg.python.org/cpython/rev/48a77fbfd6cb

New changeset cb291294bdc8 by Senthil Kumaran in branch 'default':
merge from 3.4
http://hg.python.org/cpython/rev/cb291294bdc8

--
nosy: +python-dev

___
Python tracker 

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



[issue22245] test_urllib2_localnet prints out error messages

2014-08-22 Thread Senthil Kumaran

Senthil Kumaran added the comment:

It was reproducible on my local machine too. Those errors were present and 
somehow escaped me. Thanks for raising this.

Fixed these and tested in my local machine and test_urllib2_localnet was 
successful.

--
assignee:  -> orsenthil
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue21669] Custom error messages when print & exec are used as statements

2014-08-22 Thread Nick Coghlan

Nick Coghlan added the comment:

For the record, I just posted the Q&A reference to Stack Overflow: 
https://stackoverflow.com/questions/25445439/what-does-syntaxerror-missing-parentheses-in-call-to-print-mean-in-python/

--

___
Python tracker 

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



[issue22098] Behavior of Structure inconsistent with BigEndianStructure when using __slots__

2014-08-22 Thread Claudiu Popa

Claudiu Popa added the comment:

That makes sense. Quoting from the data model: "When inheriting from a class 
without __slots__, the __dict__ attribute of that class will always be 
accessible, so a __slots__ definition in the subclass is meaningless".
In the current case, for the little-endian systems, which I presume you have, 
BigEndianStructure is a subclass of Structure, but it doesn't have a definition 
of __slots__ in the body, leading to your results, according to the 
specificaton from the data model. In this case, it makes sense for Point1 to 
have __slots__, but not for Point2.

--
nosy: +Claudiu.Popa

___
Python tracker 

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



[issue21817] `concurrent.futures.ProcessPoolExecutor` swallows tracebacks

2014-08-22 Thread Ram Rachum

Ram Rachum added the comment:

Hi Claudiu, sorry for the silence.

This output looks great. I'd love to see that go into Python.

--

___
Python tracker 

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



[issue22249] Possibly incorrect example is given for socket.getaddrinfo()

2014-08-22 Thread Alexander Patrakov

New submission from Alexander Patrakov:

See the example at 
https://docs.python.org/2/library/socket.html#socket.getaddrinfo

>>> socket.getaddrinfo("www.python.org", 80, 0, 0, socket.SOL_TCP)

As I am primarily a C programmer, it is quite surprising for me to see a SOL_* 
being passed into the proto argument. I thought that SOL_* is only for 
setsockopt(), and IPPROTO_* would be suitable. Yes, for TCP and UDP the SOL_* 
and IPPROTO_* constants are the same, but see e.g. 
http://msdn.microsoft.com/en-us/library/windows/desktop/ms737530%28v=vs.85%29.aspx
 which specifically points out that IPPROTO_* constants as acceptable values.

--
assignee: docs@python
components: Documentation
messages: 225659
nosy: Alexander.Patrakov, docs@python
priority: normal
severity: normal
status: open
title: Possibly incorrect example is given for socket.getaddrinfo()
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



[issue22118] urljoin fails with messy relative URLs

2014-08-22 Thread Stefan Behnel

Stefan Behnel added the comment:

I'm now getting duplicated slashes in URLs, e.g.:

https://new//foo.html
http://my.little.server/url//logo.gif

In both cases, the base URL that gets joined with the postfix had a trailing 
slash, e.g.

"http://my.little.server/url/"; + "logo.gif" -> 
"http://my.little.server/url//logo.gif";

--
nosy: +scoder

___
Python tracker 

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



[issue22118] urljoin fails with messy relative URLs

2014-08-22 Thread Nick Coghlan

Nick Coghlan added the comment:

Issue #1500504 (the "urischemes" proposal that never got turned into a PyPI 
package) has several additional test cases. This particular attachment is one 
AMK cleaned up to run on Py3k:

http://bugs.python.org/file32591/urischemes.py

The module itself likely isn't worth salvaging, but the additional examples in 
the test cases were very useful in flushing out various RFC compliance issues.

--

___
Python tracker 

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



[issue22247] More incomplete module.__all__ lists

2014-08-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Issue 20689: socket.__all__

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue21338] Silent mode for compileall

2014-08-22 Thread Berker Peksag

Changes by Berker Peksag :


--
assignee:  -> berker.peksag
nosy: +berker.peksag

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Oh, I'm only proposing read-only access to the verbosity information. And 
forcing output buffering would only last for the current test method, of course.

--

___
Python tracker 

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a21ddb1c41d2 by Brett Cannon in branch 'default':
Issue #19714: Tests for importlib.machinery.WindowsRegistryFinder.
http://hg.python.org/cpython/rev/a21ddb1c41d2

--
nosy: +python-dev

___
Python tracker 

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Claudiu. Sorry it took so long to apply, but you know 
what I have been working on instead so I'm sure you understand. =)

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



[issue22191] warnings.__all__ incomplete

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

And Python 2.7.

--
status: pending -> open

___
Python tracker 

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



[issue22240] argparse support for "python -m module" in help

2014-08-22 Thread Miki Tebeka

Miki Tebeka added the comment:

For zip file the help should probably be:
usage: python file.zip

--

___
Python tracker 

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-08-22 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: commit review -> resolved

___
Python tracker 

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



[issue22191] warnings.__all__ incomplete

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

The patch looks good, Jon! I'm running the test suite now to make sure nothing 
odd happens from the change, but barring that this should be committed in 
Python 3.4 and default shortly.

--
stage:  -> commit review
status: open -> pending

___
Python tracker 

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



[issue22191] warnings.__all__ incomplete

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a77dc87a34ff by Brett Cannon in branch '3.4':
Issue #22191: Fix warnings.__all__.
http://hg.python.org/cpython/rev/a77dc87a34ff

New changeset aeb5fc7a9956 by Brett Cannon in branch 'default':
Merge for issue #22191 fix
http://hg.python.org/cpython/rev/aeb5fc7a9956

--
nosy: +python-dev

___
Python tracker 

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



[issue22197] Allow better verbosity / output control in test cases

2014-08-22 Thread Michael Foord

Michael Foord added the comment:

Yep. I have no qualms about allowing test cases to switch on buffering.

--

___
Python tracker 

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



[issue22191] warnings.__all__ incomplete

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 727fd4ead3fd by Brett Cannon in branch '2.7':
Issue #22191: Fix warnings.__all__.
http://hg.python.org/cpython/rev/727fd4ead3fd

--

___
Python tracker 

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



[issue22191] warnings.__all__ incomplete

2014-08-22 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22250] unittest lowercase methods

2014-08-22 Thread Simon Zack

New submission from Simon Zack:

The python unittest module currently uses camel case. This feels rather 
inconsistent with the rest of the python library, which is in lower case and 
follows PEP8.

Would it be a good idea to add lower-case aliases, and possibly deprecate the 
camel case methods in the future?

--
components: Library (Lib)
messages: 225673
nosy: simonzack
priority: normal
severity: normal
status: open
title: unittest lowercase methods
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



[issue22098] Behavior of Structure inconsistent with BigEndianStructure when using __slots__

2014-08-22 Thread eryksun

eryksun added the comment:

Since BigEndianStructure doesn't explicitly define the instance slots, they get 
the default slots for __dict__ and __weakref__. It wouldn't make sense to 
exclude these slots from instances of the Point2 subclass, so there's no 
mechanism for that. You can only add slots.

That said, the BigEndianStructure and LittleEndianStructure subclasses should 
define __slots__ = (). That removes the inconsistency.

http://hg.python.org/cpython/file/c0e311e010fc/Lib/ctypes/_endian.py#l46

--
nosy: +eryksun

___
Python tracker 

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



[issue22098] Behavior of Structure inconsistent with BigEndianStructure when using __slots__

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> That said, the BigEndianStructure and LittleEndianStructure subclasses should 
> define __slots__ = (). That removes the inconsistency.

That would probably be reasonable indeed. Anyone wants to write a patch?

--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge, pitrou
stage:  -> needs patch
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



[issue22150] deprecated-removed directive is broken in Sphinx 1.2.2

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b834b1fa2aab by Berker Peksag in branch '3.4':
Issue #22150: Fix deprecated-removed directive in Sphinx 1.2.
http://hg.python.org/cpython/rev/b834b1fa2aab

New changeset 8f635f77e7e9 by Berker Peksag in branch 'default':
Issue #22150: Fix deprecated-removed directive in Sphinx 1.2.
http://hg.python.org/cpython/rev/8f635f77e7e9

--
nosy: +python-dev

___
Python tracker 

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



[issue22150] deprecated-removed directive is broken in Sphinx 1.2.2

2014-08-22 Thread Berker Peksag

Berker Peksag added the comment:

Thank you for your review, Ezio!

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c2d71f9afa0b by Brett Cannon in branch 'default':
Issue #20152: Convert _multibytecodecs to Argument Clinic.
http://hg.python.org/cpython/rev/c2d71f9afa0b

--

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2617db7e43a3 by Brett Cannon in branch 'default':
Issue #20152: Convert the grp module to Argument Clinic.
http://hg.python.org/cpython/rev/2617db7e43a3

--

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

To make it easier to track what is left to commit:

* grp
* spwd
* fcntl
* pyexpat
* array
* cmath [Martin says this no longer applies cleanly]

I should also mention all of these patches probably need to shift to `output 
preset file` as well.

--
stage: needs patch -> commit review

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

To make it easier to track what is left to commit:
* spwd
* fcntl
* pyexpat
* array
* cmath [Martin says this no longer applies cleanly]

--

___
Python tracker 

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



[issue22251] Various markup errors in documentation

2014-08-22 Thread Berker Peksag

New submission from Berker Peksag:

/home/berker/projects/cpython/default/Doc/extending/newtypes.rst:985: ERROR: 
Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/faq/library.rst:700: ERROR: Error in 
"seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/argparse.rst:1896: ERROR: 
Error in "warning" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/asyncio-eventloop.rst:200: 
ERROR: Error in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/asyncio-protocol.rst:397: 
ERROR: Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/asyncio-protocol.rst:405: 
ERROR: Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/asyncio-task.rst:271: ERROR: 
Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/email.contentmanager.rst:404: 
ERROR: Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/logging.handlers.rst:867: 
ERROR: Error in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/multiprocessing.rst:853: 
ERROR: Error in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/os.rst:59: ERROR: Error in 
"seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/pathlib.rst:34: ERROR: Error 
in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/pathlib.rst:40: ERROR: Error 
in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/pathlib.rst:43: ERROR: Error 
in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/pickle.rst:143: ERROR: Error 
in "note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/ssl.rst:269: ERROR: Error in 
"note" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/ssl.rst:934: ERROR: Error in 
"seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/statistics.rst:138: ERROR: 
Error in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/stdtypes.rst:3874: ERROR: 
Error in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/sys.rst:800: ERROR: Error in 
"seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/library/warnings.rst:43: ERROR: Error 
in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/using/cmdline.rst:109: ERROR: Error 
in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/using/cmdline.rst:161: ERROR: Error 
in "seealso" directive:
invalid option block.

/home/berker/projects/cpython/default/Doc/using/cmdline.rst:364: ERROR: Error 
in "seealso" directive:
invalid option block.

--
assignee: berker.peksag
components: Documentation
files: markup.diff
keywords: easy, patch
messages: 225682
nosy: berker.peksag, ezio.melotti, georg.brandl
priority: low
severity: normal
stage: patch review
status: open
title: Various markup errors in documentation
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36435/markup.diff

___
Python tracker 

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



[issue21307] PEP 466: backport hashlib changes

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Uploaded patch adds the algorithm availability constants to the hashlib module.

--
components: +Extension Modules
keywords: +needs review, patch
Added file: http://bugs.python.org/file36436/backport-hashlib.diff

___
Python tracker 

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



[issue21305] PEP 466: update os.urandom

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch backports the persistent FD for urandom.

--
components: +Extension Modules, Interpreter Core
keywords: +needs review, patch
Added file: http://bugs.python.org/file36437/backport-urandom.diff

___
Python tracker 

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



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

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 38688f0a0e04 by Berker Peksag in branch '3.4':
Issue #19447: Add a test case to py_compile.compile() to make sure
http://hg.python.org/cpython/rev/38688f0a0e04

New changeset efb0a3eb4e06 by Berker Peksag in branch 'default':
Issue #19447: Add a test case to py_compile.compile() to make sure
http://hg.python.org/cpython/rev/efb0a3eb4e06

--
nosy: +python-dev

___
Python tracker 

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



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

2014-08-22 Thread Berker Peksag

Berker Peksag added the comment:

3.3 is in security-only mode and this issue has been fixed in 3.4. I've just 
committed your test case to 3.4 and default. Thanks for the patch, Bohuslav.

--
assignee:  -> berker.peksag
components: +Library (Lib) -Build
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.4, Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22246] add strptime(s, '%s')

2014-08-22 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +belopolsky
stage:  -> patch review

___
Python tracker 

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



[issue22252] ssl blocking IO errors

2014-08-22 Thread Hristo Venev

New submission from Hristo Venev:

ssl.SSLWantReadError and ssl.SSLWantWriteError should inherit 
io.BlockingIOError.

Generic code that works with non-blocking sockets will stop working with 
SSLSockets.

Does anybody have any idea if SSLSocket.read() will need to write to the 
underlying socket or SSLSocket.write() need to read from it? AFAIK they don't.

Assuming that ssl.SSLWantReadErorr and ssl.SSLWantWriteError perfectly map to 
io.BlockingIOError (except during handshake).

--
components: Library (Lib)
messages: 225687
nosy: h.venev
priority: normal
severity: normal
status: open
title: ssl blocking IO errors
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



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

2014-08-22 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

You should use importlib.util.cache_from_source(bad_coding) instead of 
bad_coding + 'c'.

--

___
Python tracker 

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



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

2014-08-22 Thread Berker Peksag

Berker Peksag added the comment:

Good point. Thank you Arfrever.

--

___
Python tracker 

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



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

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d99014320220 by Berker Peksag in branch '3.4':
Issue #19447: Use importlib.util.cache_from_source() instead of ``bad_coding + 
'c'``.
http://hg.python.org/cpython/rev/d99014320220

New changeset 78fff5310206 by Berker Peksag in branch 'default':
Issue #19447: Use importlib.util.cache_from_source() instead of ``bad_coding + 
'c'``.
http://hg.python.org/cpython/rev/78fff5310206

--

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b3aa30f474c4 by Brett Cannon in branch 'default':
Issue #20152: Port the spwd module to Argument Clinic.
http://hg.python.org/cpython/rev/b3aa30f474c4

--

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c48980af7df2 by Brett Cannon in branch 'default':
Issue #20152: Port the pwd module to Argument Clinic.
http://hg.python.org/cpython/rev/c48980af7df2

--

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2014-08-22 Thread kernc

New submission from kernc:

ConfigParser does not handle files that specify options in the "global" section 
(first option specified before any section is). This configuration "behavior" 
is present in the configuration files in the wild [1, 2], and while the naive 
workaround is simple, ... really?!

The support for section-less configuration would also play nice with various 
"POSIX-compatible config files" (think /etc/default/*, /etc/os-release, ...).

Ideally, the support could be enabled by default or only when `strict=False` 
constructor argument is supplied. The options in this global section could 
likely be accessed in the empty ('') section, e.g. `config.get('', 'option')`.

Thus, ConfigParser could finally really replace the venerable ConfigObj [3].

[1]: http://stackoverflow.com/a/22501121/
[2]: 
https://www.google.com/search?q=MissingSectionHeaderError%3A+File+contains+no+section+headers
[3]: http://www.voidspace.org.uk/python/configobj.html

--
components: Library (Lib)
messages: 225693
nosy: kernc
priority: normal
severity: normal
status: open
title: ConfigParser does not handle files without sections
type: behavior
versions: Python 2.7, Python 3.2, Python 3.5

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0c2792a8f9db by Brett Cannon in branch 'default':
Issue #20152: Port pyexpat to Argument Clinic.
http://hg.python.org/cpython/rev/0c2792a8f9db

--

___
Python tracker 

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



[issue20152] Derby #15: Convert 50 sites to Argument Clinic across 9 files

2014-08-22 Thread Brett Cannon

Brett Cannon added the comment:

To make it easier to track what is left to commit:
* fcntl [does not apply cleanly
* array
* cmath [Martin says this no longer applies cleanly]

--

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2014-08-22 Thread Łukasz Langa

Łukasz Langa added the comment:

That's an interesting feature request. Parsing it only while `strict=False` 
sounds like a good plan.

--
assignee:  -> lukasz.langa
nosy: +lukasz.langa
stage:  -> needs patch
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.2

___
Python tracker 

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



[issue22254] match object generated by re.finditer cannot call groups() on mac

2014-08-22 Thread leiju

New submission from leiju:

See the simple test below:


failed on 13.3.0 Darwin Kernel Version 13.3.0, Python 2.7.8:


Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> import re
>>> 
>>> p = '(abc)|(def)|(xyz)'
>>> s = 'abcdefxyz'
>>> 
>>> 
>>> for s in re.finditer(p, s): print s.groups()
... 
Traceback (most recent call last):
  File "", line 1, in 
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", 
line 186, in finditer
return _compile(pattern, flags).finditer(string)
TypeError: expected string or buffer
>>



same test succeeds on Windows 7 professional:



Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> p = '(abc)|(def)|(xyz)'
>>> s = 'abcdefxyz'
>>>
>>> import re
>>>
>>> for x in re.finditer(p, s): print x.groups()
...
('abc', None, None)
(None, 'def', None)
(None, None, 'xyz')
>>>
>>>
>>>
>>>




same test succeeds on freedbsd 7.4. Python 2.7.1:
=



Python 2.7.1 (r271:86832, Jan 31 2011, 17:18:31) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> p = '(abc)|(def)|(xyz)'
>>> s = 'abcdefxyz'
>>> for s in re.finditer(p, s): print s.groups()
... 
('abc', None, None)
(None, 'def', None)
(None, None, 'xyz')
>>> 
>>> 
>>> 
>>>

--
assignee: ronaldoussoren
components: Macintosh, Regular Expressions
messages: 225697
nosy: ezio.melotti, leiju, mrabarnett, ronaldoussoren
priority: normal
severity: normal
status: open
title: match object generated by re.finditer cannot call groups() on mac
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



[issue22250] unittest lowercase methods

2014-08-22 Thread R. David Murray

R. David Murray added the comment:

We tried going down this path with the Threading module in the python3 
transiontion, and it was a mess.  I don't think we are going to do it for any 
other module.

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



[issue22254] match object generated by re.finditer cannot call groups() on mac

2014-08-22 Thread leiju

leiju added the comment:

closed as cannot reproduce it anymore:


Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> 
>>> import re
>>> p = '(abc)|(def)|(xyz)'
>>> s = 'abcdefxyz'
>>> 
>>> for s in re.finditer(p, s): print s.groups()
... 
('abc', None, None)
(None, 'def', None)
(None, None, 'xyz')
>>> 
>>> 
>>> 
>>>

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch resolves the issue, includes a test.

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file36438/t22244.diff

___
Python tracker 

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



[issue22248] urllib.request.urlopen raises exception when 30X-redirect url contains non-ascii chars

2014-08-22 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +orsenthil

___
Python tracker 

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



[issue22221] ast.literal_eval confused by coding declarations

2014-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This issue is about the SyntaxError message for eval functions, not the ast 
module per se. My first response is that the reported message is not a bug and 
that this issue should be closed as 'not a bug'.

(General reason) Trying to eval an expression preceded by a comment on its own 
line or followed by a comment works.

>>> eval("#before\n'string'#after")
'string'

Trying to eval a bare comment *is* a syntax error.

>>> eval("#comment\n")
...
SyntaxError: unexpected EOF while parsing

So the issue as presented is the special-case message.  However, messages are 
not part of the language specification and improving them is 
often/usually/always? treated as an enhancement.  Changing them will break code 
and tests that depend on the exact wording. 2.7 does not get enhancements.

(Specific reason) In 2.x, the input to (literal-)eval is either latin-1 encoded 
bytes or unicode. 'Latin-1' input could potentially consist of an encoding 
declaration on one line followed on the next line by a literal string encoded 
as indicated.

>>> le("# -*- coding: utf-8 -*-\n'string'")
'string'

Unicode input, the subject of this issue, is encoded to latin-1, which means 
that any literal string in the expression has to be latin-1 encoded. Therefore, 
a latin-1 encoding declaration is redundant and anything else is either 
redundant (if the original unicode only contains characters that encode the 
same in latin-1, as in the example above) or wrong, with hard to predict 
behavior.  Someone thought it worthwhile to add the special case check.  I 
think it should be left as is.

Jorgen, please either close this or explain why you think not, in light of the 
above.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue22250] unittest lowercase methods

2014-08-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

assertlessequal looks non-readable and assert_less_equal is two characters 
longer.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22250] unittest lowercase methods

2014-08-22 Thread Ezio Melotti

Ezio Melotti added the comment:

This has been already proposed and rejected in the past.
It's not something that is going to happen (at least until Python 4 or 5).

--
nosy: +ezio.melotti
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue22221] ast.literal_eval confused by coding declarations

2014-08-22 Thread Jorgen Schäfer

Jorgen Schäfer added the comment:

I do not understand how your comments apply to this bug. There is no
comment anywhere.  There is a single string literal whose contents look
like a comment. The expression parses correctly without syntax error if you
add a few newlines in front. Could you clarify your objection?
On Aug 22, 2014 9:59 PM, "Terry J. Reedy"  wrote:

>
> Terry J. Reedy added the comment:
>
> This issue is about the SyntaxError message for eval functions, not the
> ast module per se. My first response is that the reported message is not a
> bug and that this issue should be closed as 'not a bug'.
>
> (General reason) Trying to eval an expression preceded by a comment on its
> own line or followed by a comment works.
>
> >>> eval("#before\n'string'#after")
> 'string'
>
> Trying to eval a bare comment *is* a syntax error.
>
> >>> eval("#comment\n")
> ...
> SyntaxError: unexpected EOF while parsing
>
> So the issue as presented is the special-case message.  However, messages
> are not part of the language specification and improving them is
> often/usually/always? treated as an enhancement.  Changing them will break
> code and tests that depend on the exact wording. 2.7 does not get
> enhancements.
>
> (Specific reason) In 2.x, the input to (literal-)eval is either latin-1
> encoded bytes or unicode. 'Latin-1' input could potentially consist of an
> encoding declaration on one line followed on the next line by a literal
> string encoded as indicated.
>
> >>> le("# -*- coding: utf-8 -*-\n'string'")
> 'string'
>
> Unicode input, the subject of this issue, is encoded to latin-1, which
> means that any literal string in the expression has to be latin-1 encoded.
> Therefore, a latin-1 encoding declaration is redundant and anything else is
> either redundant (if the original unicode only contains characters that
> encode the same in latin-1, as in the example above) or wrong, with hard to
> predict behavior.  Someone thought it worthwhile to add the special case
> check.  I think it should be left as is.
>
> Jorgen, please either close this or explain why you think not, in light of
> the above.
>
> --
> nosy: +terry.reedy
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue22232] str.splitlines splitting on non-\r\n characters

2014-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Objects/unicodeobject.c linebreak is at 266. With 3.4.1:
>>> 'a\x0ab\x0bc\x0cd\x0d1c\x1c1d\x1d1e\x1e'.splitlines()
['a', 'b', 'c', 'd', '1c', '1d', '1e']
\x0a == \n, \x0d == \r

The \r\n pair is a special case, as promised, but other pairs are not.
>>> 'a\r\nb'.splitlines()
['a', 'b']
>>> 'a\x0b\nb'.splitlines()
['a', '', 'b']

--
nosy: +terry.reedy
title: str.splitlines splitting on none-\r\n characters -> str.splitlines 
splitting on non-\r\n characters

___
Python tracker 

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



[issue21166] Bus error in pybuilddir.txt 'python -m sysconfigure --generate-posix-vars' build step

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset edb6b282469e by Ned Deily in branch '2.7':
Issue #21166: Prevent possible segfaults and other random failures of
http://hg.python.org/cpython/rev/edb6b282469e

New changeset e52d85f2e284 by Ned Deily in branch '3.4':
Issue #21166: Prevent possible segfaults and other random failures of
http://hg.python.org/cpython/rev/e52d85f2e284

New changeset 599dc1304a70 by Ned Deily in branch 'default':
Issue #21166: merge from 3.4
http://hg.python.org/cpython/rev/599dc1304a70

--
nosy: +python-dev

___
Python tracker 

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



[issue21166] Bus error in pybuilddir.txt 'python -m sysconfigure --generate-posix-vars' build step

2014-08-22 Thread Ned Deily

Ned Deily added the comment:

Committed for release in 2.7.9, 3.4.2, and 3.5.0

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22199] 2.7 sysconfig._get_makefile_filename should be sysconfig.get_makefile_filename

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c57cf191e759 by Ned Deily in branch '2.7':
Issue #22199: Make get_makefile_filename() available in Lib/sysconfig.py
http://hg.python.org/cpython/rev/c57cf191e759

--
nosy: +python-dev

___
Python tracker 

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



[issue22232] str.splitlines splitting on non-\r\n characters

2014-08-22 Thread Samuel Charron

Samuel Charron added the comment:

It's also at line #14941 for unicode strings if I understand correctly

With 3.4.0: 

>>> "a\x85b\x1ec".splitlines()
['a', 'b', 'c']

--

___
Python tracker 

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



[issue22199] 2.7 sysconfig._get_makefile_filename should be sysconfig.get_makefile_filename

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 404cf4c071c8 by Ned Deily in branch '2.7':
Issue #22199: update Misc/NEWS
http://hg.python.org/cpython/rev/404cf4c071c8

--

___
Python tracker 

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



[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2014-08-22 Thread Steven Myint

Changes by Steven Myint :


--
nosy: +myint

___
Python tracker 

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



[issue22199] 2.7 sysconfig._get_makefile_filename should be sysconfig.get_makefile_filename

2014-08-22 Thread Ned Deily

Ned Deily added the comment:

Committed for release in 2.7.9

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think 'target' can just be replaced by 'identifier'.
Using 'expression' (or 'expr' in the ast doc) for what should be 'exceptions: 
identifier' or paranthesized tuple of identifiers;, is also too broad. However, 
that must be enforced in the compiler rather than the parser, and compiler 
restrictions are in the text, not the grammar.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Michael Williamson

Michael Williamson added the comment:

> Using 'expression' (or 'expr' in the ast doc) for what should be 'exceptions: 
> identifier' or paranthesized tuple of identifiers;, is also too broad. 
> However, that must be enforced in the compiler rather than the parser, and 
> compiler restrictions are in the text, not the grammar.

I would expect any expression to be valid so long as it evaluates at runtime to 
an exception type (or tuple of exception types), so the use of expression seems 
correct to me. In other words, the following is valid Python (but would not be 
allowed if I've understood your statement correctly):

def f():
try:
"".blah
except some_error():
print("caught")

def some_error():
return AttributeError

f()

--

___
Python tracker 

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



[issue16808] inspect.stack() should return list of named tuples

2014-08-22 Thread David Thiede

Changes by David Thiede :


--
nosy: +davet

___
Python tracker 

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



[issue22199] 2.7 sysconfig._get_makefile_filename should be sysconfig.get_makefile_filename

2014-08-22 Thread Éric Araujo

Éric Araujo added the comment:

Thanks Ned for analysing and cleanin up the mess :-)

--

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2014-08-22 Thread kernc

kernc added the comment:

I, for one, would actually prefer if global options were parsed by default and 
MissingSectionHeaderError was deprecated instead.
>From what little specification available, INI format does **not** require 
>options be in sections [4, 5].

Additionally, "Linux and Unix systems also use a similar file format for system 
configuration" [6] and allowing global options being a (very sane) default 
would nicely fill this use case as well.

In general, the format is not well defined [6], so choice of name `strict` for 
an argument is kind of odd too. What is it conforming to?

It may be my sole opinion that parsing global options by default into a '' (or 
appropriate) section and deprecating MissingSectionHeaderError would benefit 
everyone [2, 9] and hinder few if any one at all [8, 9]. YMMV.

[4]: http://en.wikipedia.org/wiki/INI_file#Sections
[5]: http://en.wikipedia.org/wiki/INI_file#Global_properties
[6]: http://en.wikipedia.org/wiki/INI_file
[7]: http://en.wikipedia.org/wiki/INI_file#Varying_features
[8]: http://nullege.com/pages/noresult/MissingSectionHeaderError
[9]: https://github.com/search?l=python&q=MissingSectionHeaderError&type=Code

--

___
Python tracker 

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



[issue22221] ast.literal_eval confused by coding declarations

2014-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

[When responding, please do not quote more than a line or two. If responding by 
email, please delete the rest. Otherwise, the result is extra noise when 
viewing online.]

You are right, I missed the outer 's, though my examples are not completely 
irrelevant. Eval looks inside the inner quotes for a coding line in certain 
circumstances, or maybe it always looks and we do not notice when there is not 
problem.  Here are some of my results on US Win 7, cp1252, 3.4.1, interactive 
prompt, idle

pass: eval(u'"""# -*- coding: utf-8 -*-\na"""')
fail: eval(u'"""\n# -*- coding: utf-8 -*-\na"""')
  since coding can be on line 1 or 2, these should be same
pass: eval(u'"""\n\n# -*- coding: utf-8 -*-\na"""')
  coding on 3rd line should be ignored
fail: eval(u'"""\\\n# -*- coding: utf-8 -*-\na"""')
  logically, this matches the first example; physically, the second
pass: eval(u'"""# -*- coding: utf-8 -*-\na€"""')
  but € prints as \xc2\x80', its utf-8 encoding as pasted in

>From file, saved from Idle editor as cp1252
pass: print(eval("# -*- coding: utf-8 -*-\n'euro€'"))
  no u prefix, € prints as €
fail: print(eval(u"# -*- coding: utf-8 -*-\n'euro€'"))

Save the following two lines in one file as utf-8
pass: print(eval("# -*- coding: utf-8 -*-\n'euro€'"))
print(eval(u"# -*- coding: utf-8 -*-\n'euro∢'"))
  but € & ∢ print as '€' & '∢'
  adding # -*- coding: utf-8 -*- line makes no difference
  adding u prefix fails either way

--

___
Python tracker 

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You are right, only the result, and not the form of 'expression' is 
constrained. I will let Jayanth propose other errors.

--

___
Python tracker 

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



[issue22252] ssl blocking IO errors

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> ssl.SSLWantReadError and ssl.SSLWantWriteError should inherit 
> io.BlockingIOError.
> Generic code that works with non-blocking sockets will stop working with 
> SSLSockets.

I'll have to think about that, but in any case non-blocking SSL code needs to 
be subtler than normal non-blocking code, because of this:

> Does anybody have any idea if SSLSocket.read() will need to write to the 
> underlying socket or SSLSocket.write() need to read from it? AFAIK they don't.

Yet the documentation clearly tells you they can:
https://docs.python.org/3/library/ssl.html#notes-on-non-blocking-sockets

--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou

___
Python tracker 

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



[issue22255] Multiprocessing freeze_support raises RuntimeError

2014-08-22 Thread Michael McAuliffe

New submission from Michael McAuliffe:

On Windows, I froze a script that uses multiprocessing with cx-freeze and 
Python 3.4.1 that had freeze_support() in the "if __name__ == '__main__'" 
section of the main module, and the resulting executable crashes with a 
RuntimeError 'context has already been set'.

The error happens in a call to set_start_method in multiprocessing.spawn's 
prepare function, and changing the line in spawn.py from:

if 'start_method' in data:
set_start_method(data['start_method'])

to:

if 'start_method' in data:
set_start_method(data['start_method'], force = True)

allows the frozen executable to successfully run.

--
components: Library (Lib)
messages: 225719
nosy: Michael.McAuliffe
priority: normal
severity: normal
status: open
title: Multiprocessing freeze_support raises RuntimeError
type: crash
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



[issue21307] PEP 466: backport hashlib changes

2014-08-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

use a frozenset for algorithms_guaranteed.

in the docs under more algor... may be available make the two variables
link to their docs.  you might explicitly mention python 2.7.9 in that
paragraph.

you probably should use pystring_fromstring imstead of unicode given this
is 2.7.

On Fri, Aug 22, 2014 at 9:46 AM, Alex Gaynor  wrote:

>
> Alex Gaynor added the comment:
>
> Uploaded patch adds the algorithm availability constants to the hashlib
> module.
>
> --
> components: +Extension Modules
> keywords: +needs review, patch
> Added file: http://bugs.python.org/file36436/backport-hashlib.diff
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue21307] PEP 466: backport hashlib changes

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch uses PyString_FromString.

To the other two points:

1) Python3 uses a mutable set for both of these, any reason for Python2 to be 
inconsistent?

2) The docs in Python3 don't have this link either, I'm trying to minimize the 
delta; if you think there should be a link I'd prefer it be done in python3, 
and then I can backport that as well.

--
Added file: http://bugs.python.org/file36439/backport-hashlib.diff

___
Python tracker 

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



[issue21307] PEP 466: backport hashlib changes

2014-08-22 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Keeping the delta small makes sense. I'd use frozenset in 3 as well but its
unimportant. LGTM.

--

___
Python tracker 

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



[issue22232] str.splitlines splitting on non-\r\n characters

2014-08-22 Thread R. David Murray

R. David Murray added the comment:

See issue 7643 for some technical background.  There are some other interesting 
issues to read if you seach the tracker for 'splitlines unicode', one of which 
is an open doc issue. Clearly the docs about this are inadequate.

Basically, though, I think you are correct.  email should not be using 
splitlines().  It was more or less correct when email was splitting binary 
data, but even then it wasn't exactly correct per the letter of RFC.

Unfortunately not using splitlines has some performance implications...but then 
again we haven't done any sort of performance improvement pass on the new email 
code, so it may well be marginal in the overall scheme of things.

--
components: +email
nosy: +barry

___
Python tracker 

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



[issue2527] Pass a namespace to timeit

2014-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e0f681f4ade3 by Antoine Pitrou in branch 'default':
Issue #2527: Add a *globals* argument to timeit functions, in order to override 
the globals namespace in which the timed code is executed.
http://hg.python.org/cpython/rev/e0f681f4ade3

--
nosy: +python-dev

___
Python tracker 

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



[issue2527] Pass a namespace to timeit

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you, Ben! Your patch is now pushed to the default branch.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue21536] extension built with a shared python cannot be loaded with a static python

2014-08-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +lemburg

___
Python tracker 

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



[issue20421] expose SSL socket protocol version

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch. Doc updates still missing.

--
keywords: +patch
Added file: http://bugs.python.org/file36440/ssl_version.patch

___
Python tracker 

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Can't you just use "et" in PyArg_Parse?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Unfortunately no, the API accepts explicit Nones (in addition to simply not 
passing the argument), and et errors on those.

--

___
Python tracker 

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You could do all the argument conversion in the Python SSLContext class and 
then delegate to the base _SSLContext class...

--

___
Python tracker 

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

It's not clear to me that that's better, and it makes the diff with the Python3 
version larger.

--

___
Python tracker 

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



[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch adds an additional test for a more interesting unicode path.

--
Added file: http://bugs.python.org/file36441/t22244.diff

___
Python tracker 

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



[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-22 Thread Jayanth Koushik

Jayanth Koushik added the comment:

The page on compound statements defines compound statements as:

compound_stmt ::=  if_stmt
   | while_stmt
   | for_stmt
   | try_stmt
   | with_stmt
   | funcdef
   | classdef

The full grammar specification on the other hand says:

compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef 
| classdef | decorated

This accordingly leads to different definitions of funcdef and classdef. This 
is not necessarily 'incorrect', but for the sake of clarity, it might be better 
if both pages followed the same conventions.

--

___
Python tracker 

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



[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-08-22 Thread Bob Chen

Bob Chen added the comment:

I personally suggest httplib convert the url and other elements to be string, 
at the begging of the class init.

--

___
Python tracker 

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