Alex Gaynor | 29 Aug 21:47 2014
Picon

PEP 476: Enabling certificate validation by default!

Hi all,

I've just submitted PEP 476, on enabling certificate validation by default for
HTTPS clients in Python. Please have a look and let me know what you think.

PEP text follows.

Alex

---

PEP: 476
Title: Enabling certificate verification by default for stdlib http clients
Version: $Revision$
Last-Modified: $Date$
Author: Alex Gaynor <alex.gaynor <at> gmail.com>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 28-August-2014

Abstract
========

Currently when a standard library http client (the ``urllib`` and ``http``
modules) encounters an ``https://`` URL it will wrap the network HTTP traffic
in a TLS stream, as is necessary to communicate with such a server. However,
during the TLS handshake it will not actually check that the server has an X509
certificate is signed by a CA in any trust root, nor will it verify that the
Common Name (or Subject Alternate Name) on the presented certificate matches
(Continue reading)

Python tracker | 29 Aug 18:08 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-08-22 - 2014-08-29)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4638 (+17)
  closed 29431 (+32)
  total  34069 (+49)

Open issues with patches: 2193 

Issues opened (41)
==================

#17095: Modules/Setup *shared* support broken
http://bugs.python.org/issue17095  reopened by haypo

#22200: Remove distutils checks for Python version
http://bugs.python.org/issue22200  reopened by Arfrever

#22232: str.splitlines splitting on non-\r\n characters
http://bugs.python.org/issue22232  reopened by terry.reedy

#22252: ssl blocking IO errors
http://bugs.python.org/issue22252  opened by h.venev

#22253: ConfigParser does not handle files without sections
(Continue reading)

Nick Coghlan | 28 Aug 14:26 2014
Picon

Cleaning up surrogate escaped strings (was Bytes path related questions for Guido)


On 26 Aug 2014 21:34, "MRAB" <python <at> mrabarnett.plus.com> wrote:
>
> On 2014-08-26 03:11, Stephen J. Turnbull wrote:
>>
>> Nick Coghlan writes:
>>
>>   > "purge_surrogate_escapes" was the other term that occurred to me.
>>
>> "purge" suggests removal, not replacement.  That may be useful too.
>>
>> neutralize_surrogate_escapes(s, remove=False, replacement='\uFFFD')
>>
> How about:
>
>     replace_surrogate_escapes(s, replacement='\uFFFD')
>
> If you want them removed, just pass an empty string as the replacement.

The current proposal on the issue tracker is to instead take advantage of the existing error handlers:

    def convert_surrogateescape(data, errors='replace'):
        return data.encode('utf-8', 'surrogateescape').decode('utf-8', errors)

That code is short, but semantically dense - it took a few iterations to come up with that version. (Added bonus: once you're alerted to the possibility, it's trivial to write your own version for existing Python 3 versions. The standard name just makes it easier to look up when you come across it in a piece of code, and provides the option of optimising it later if it ever seems worth the extra work)

I also filed a separate RFE to make backslashreplace usable on input, since that allows the option of separating the replacement operation from the encoding operation.

Cheers,
Nick.

<div>
<p dir="ltr"><br>
On 26 Aug 2014 21:34, "MRAB" &lt;<a href="mailto:python <at> mrabarnett.plus.com">python <at> mrabarnett.plus.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 2014-08-26 03:11, Stephen J. Turnbull wrote:<br>
&gt;&gt;<br>
&gt;&gt; Nick Coghlan writes:<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &gt; "purge_surrogate_escapes" was the other term that occurred to me.<br>
&gt;&gt;<br>
&gt;&gt; "purge" suggests removal, not replacement.&nbsp; That may be useful too.<br>
&gt;&gt;<br>
&gt;&gt; neutralize_surrogate_escapes(s, remove=False, replacement='\uFFFD')<br>
&gt;&gt;<br>
&gt; How about:<br>
&gt;<br>
&gt; &nbsp; &nbsp; replace_surrogate_escapes(s, replacement='\uFFFD')<br>
&gt;<br>
&gt; If you want them removed, just pass an empty string as the replacement.</p>
<p dir="ltr">The current proposal on the issue tracker is to instead take advantage of the existing error handlers:</p>
<p dir="ltr">&nbsp;&nbsp;&nbsp; def convert_surrogateescape(data, errors='replace'):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return data.encode('utf-8', 'surrogateescape').decode('utf-8', errors)</p>
<p dir="ltr">That code is short, but semantically dense - it took a few iterations to come up with that version. (Added bonus: once you're alerted to the possibility, it's trivial to write your own version for existing Python 3 versions. The standard name just makes it easier to look up when you come across it in a piece of code, and provides the option of optimising it later if it ever seems worth the extra work)</p>

<p dir="ltr">I also filed a separate RFE to make backslashreplace usable on input, since that allows the option of separating the replacement operation from the encoding operation.</p>
<p dir="ltr">Cheers,<br>
Nick.<br></p>
</div>
Neal Becker | 27 Aug 14:58 2014
Picon

pip enhancement

On systems where os-level packaging is available (e.g., fedora linux), it is not 
unusual to want a newer python package installed than available from the vendor.  
pip install --user can be used for this.

But then there is the danger that these pip installed packages are not 
maintained.

At least, pip should have the ability to alert the user to potential updates,

pip update

could list which packages need updating, and offer to perform the update.  I 
think this would go a long way to helping with this problem.

--

-- 
-- Those who don't understand recursion are doomed to repeat it

Paul Moore | 26 Aug 17:23 2014
Picon

Windows Unicode console support [Was: Bytes path support]

On 24 August 2014 04:27, Nick Coghlan <ncoghlan <at> gmail.com> wrote:
> One of those areas is the fact that we still use the old 8-bit APIs to
> interact with the Windows console. Those are just as broken in a
> multilingual world as the other Windows 8-bit APIs, so Drekin came up
> with a project to expose the Windows console as a UTF-16-LE stream
> that uses the 16-bit APIs instead:
> https://pypi.python.org/pypi/win_unicode_console
>
> I personally hope we'll be able to get the issues Drekin references
> there resolved for Python 3.5 - if other folks hope for the same
> thing, then one of the best ways to help that happen is to try out the
> win_unicode_console module and provide feedback on what does and
> doesn't work.

This looks very cool, and I plan on giving it a try. But I don't see
any issues mentioned there (unless you mean the fact that it's not
possible to hook into Python's interactive interpreter directly, but I
don't see how that could be fixed in an external module). There's no
open issues on the project's github tracker.

I'd love to see this go into 3.5, so any more specific suggestions as
to what would be needed to move it forwards would be great.

Paul
Nick Coghlan | 24 Aug 06:44 2014
Picon

Bytes path related questions for Guido

At Guido's request, splitting out two specific questions from Serhiy's
thread where I believe we could do with an explicit "yes or no" from
him.

1. Should we accept patches adding support for the direct use of bytes
paths in lower level filesystem manipulation APIs? (i.e. everything
that isn't pathlib)

This was Serhiy's original question (due to some open issues [1,2]). I
think the answer is yes, as we already do in some cases, and the
"pathlib doesn't support binary paths" design decision is a high level
platform independent API vs low level potentially platform dependent
API one rather than being about disallowing the use of bytes paths in
general.

[1] http://bugs.python.org/issue19997
[2] http://bugs.python.org/issue20797

2. Should we add some additional helpers to the string module for
dealing with surrogate escaped bytes and other techniques for
smuggling arbitrary binary data as text?

My proposal [3] is to add:

* string.escaped_surrogates (constant with the 128 escaped code points)
* string.clean(s): replaces surrogates with '\ufffd' or another
specified code point
* string.redecode(s, encoding): encodes a string back to bytes and
then decodes it again using the specified encoding (the old encoding
defaults to 'latin-1' to match the assumptions in WSGI)

"s != string.clean(s)" would then serve as a check for "does this
string contain any surrogate escaped bytes?"

[3] http://bugs.python.org/issue18814#msg225791

Regards,
Nick.

--

-- 
Nick Coghlan   |   ncoghlan <at> gmail.com   |   Brisbane, Australia
Python tracker | 22 Aug 18:08 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-08-15 - 2014-08-22)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4621 (+19)
  closed 29399 (+28)
  total  34020 (+47)

Open issues with patches: 2179 

Issues opened (41)
==================

#22207: Test for integer overflow on Py_ssize_t: explicitly cast to si
http://bugs.python.org/issue22207  opened by haypo

#22208: tarfile can't add in memory files (reopened)
http://bugs.python.org/issue22208  opened by markgrandi

#22209: Idle: add better access to extension information
http://bugs.python.org/issue22209  opened by terry.reedy

#22210: pdb-run-restarting-a-pdb-session
http://bugs.python.org/issue22210  opened by zhengxiexie

#22211: Remove VMS specific code in expat.h  & xmlrole.h
http://bugs.python.org/issue22211  opened by John.Malmberg

#22212: zipfile.py fails if  zlib.so module fails to build.
http://bugs.python.org/issue22212  opened by John.Malmberg

#22213: pyvenv style virtual environments unusable in an embedded syst
http://bugs.python.org/issue22213  opened by grahamd

#22214: Tkinter: Don't stringify callbacks arguments
http://bugs.python.org/issue22214  opened by serhiy.storchaka

#22215: "embedded NUL character" exceptions
http://bugs.python.org/issue22215  opened by serhiy.storchaka

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216  opened by zvyn

#22217: Reprs for zipfile classes
http://bugs.python.org/issue22217  opened by serhiy.storchaka

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218  opened by haypo

#22219: python -mzipfile fails to add empty folders to created zip
http://bugs.python.org/issue22219  opened by Antony.Lee

#22220: Ttk extensions test failure
http://bugs.python.org/issue22220  opened by serhiy.storchaka

#22221: ast.literal_eval confused by coding declarations
http://bugs.python.org/issue22221  opened by jorgenschaefer

#22222: dtoa.c: remove custom memory allocator
http://bugs.python.org/issue22222  opened by haypo

#22223: argparse not including '--' arguments in previous optional REM
http://bugs.python.org/issue22223  opened by Jurko.Gospodnetić

#22225: Add SQLite support to http.cookiejar
http://bugs.python.org/issue22225  opened by demian.brecht

#22226: Refactor dict result handling in Tkinter
http://bugs.python.org/issue22226  opened by serhiy.storchaka

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227  opened by serhiy.storchaka

#22228: Adapt bash readline operate-and-get-next function
http://bugs.python.org/issue22228  opened by lelit

#22229: wsgiref doesn't appear to ever set REMOTE_HOST in the environ
http://bugs.python.org/issue22229  opened by alex

#22231: httplib: unicode url will cause an ascii codec error when comb
http://bugs.python.org/issue22231  opened by Bob.Chen

#22232: str.splitlines splitting on none-\r\n characters
http://bugs.python.org/issue22232  opened by scharron

#22233: http.client splits headers on none-\r\n characters
http://bugs.python.org/issue22233  opened by scharron

#22234: urllib.parse.urlparse accepts any falsy value as an url
http://bugs.python.org/issue22234  opened by Ztane

#22235: httplib: TypeError with file() object in ssl.py
http://bugs.python.org/issue22235  opened by erob

#22236: Do not use _default_root in Tkinter tests
http://bugs.python.org/issue22236  opened by serhiy.storchaka

#22237: sorted() docs should state that the sort is stable
http://bugs.python.org/issue22237  opened by Wilfred.Hughes

#22239: asyncio: nested event loop
http://bugs.python.org/issue22239  opened by djarb

#22240: argparse support for "python -m module" in help
http://bugs.python.org/issue22240  opened by tebeka

#22241: strftime/strptime round trip fails even for UTC datetime objec
http://bugs.python.org/issue22241  opened by akira

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242  opened by jon.poler

#22243: Documentation on try statement incorrectly implies target of e
http://bugs.python.org/issue22243  opened by mwilliamson

#22244: load_verify_locations fails to handle unicode paths on Python 
http://bugs.python.org/issue22244  opened by alex

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246  opened by akira

#22247: More incomplete module.__all__ lists
http://bugs.python.org/issue22247  opened by vadmium

#22248: urllib.request.urlopen raises exception when 30X-redirect url 
http://bugs.python.org/issue22248  opened by tomasgroth

#22249: Possibly incorrect example is given for socket.getaddrinfo()
http://bugs.python.org/issue22249  opened by Alexander.Patrakov

#22250: unittest lowercase methods
http://bugs.python.org/issue22250  opened by simonzack

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251  opened by berker.peksag

Most recent 15 issues with no replies (15)
==========================================

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251

#22250: unittest lowercase methods
http://bugs.python.org/issue22250

#22249: Possibly incorrect example is given for socket.getaddrinfo()
http://bugs.python.org/issue22249

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246

#22244: load_verify_locations fails to handle unicode paths on Python 
http://bugs.python.org/issue22244

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242

#22239: asyncio: nested event loop
http://bugs.python.org/issue22239

#22234: urllib.parse.urlparse accepts any falsy value as an url
http://bugs.python.org/issue22234

#22231: httplib: unicode url will cause an ascii codec error when comb
http://bugs.python.org/issue22231

#22229: wsgiref doesn't appear to ever set REMOTE_HOST in the environ
http://bugs.python.org/issue22229

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227

#22225: Add SQLite support to http.cookiejar
http://bugs.python.org/issue22225

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216

#22212: zipfile.py fails if  zlib.so module fails to build.
http://bugs.python.org/issue22212

#22211: Remove VMS specific code in expat.h  & xmlrole.h
http://bugs.python.org/issue22211

Most recent 15 issues waiting for review (15)
=============================================

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242

#22240: argparse support for "python -m module" in help
http://bugs.python.org/issue22240

#22236: Do not use _default_root in Tkinter tests
http://bugs.python.org/issue22236

#22228: Adapt bash readline operate-and-get-next function
http://bugs.python.org/issue22228

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227

#22226: Refactor dict result handling in Tkinter
http://bugs.python.org/issue22226

#22222: dtoa.c: remove custom memory allocator
http://bugs.python.org/issue22222

#22219: python -mzipfile fails to add empty folders to created zip
http://bugs.python.org/issue22219

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218

#22217: Reprs for zipfile classes
http://bugs.python.org/issue22217

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216

#22215: "embedded NUL character" exceptions
http://bugs.python.org/issue22215

#22214: Tkinter: Don't stringify callbacks arguments
http://bugs.python.org/issue22214

Top 10 most discussed issues (10)
=================================

#17535: IDLE: Add an option to show line numbers along the left side o
http://bugs.python.org/issue17535   9 msgs

#22208: tarfile can't add in memory files (reopened)
http://bugs.python.org/issue22208   8 msgs

#2527: Pass a namespace to timeit
http://bugs.python.org/issue2527   6 msgs

#22195: Make it easy to replace print() calls with logging calls
http://bugs.python.org/issue22195   6 msgs

#22241: strftime/strptime round trip fails even for UTC datetime objec
http://bugs.python.org/issue22241   6 msgs

#22194: access to cdecimal / libmpdec API
http://bugs.python.org/issue22194   5 msgs

#22198: Odd floor-division corner case
http://bugs.python.org/issue22198   5 msgs

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218   5 msgs

#20152: Derby #15: Convert 50 sites to Argument Clinic across 9 files
http://bugs.python.org/issue20152   4 msgs

#20184: Derby #16: Convert 50 sites to Argument Clinic across 9 files
http://bugs.python.org/issue20184   4 msgs

Issues closed (27)
==================

#7283: test_site failure when .local/lib/pythonX.Y/site-packages hasn
http://bugs.python.org/issue7283  closed by ned.deily

#15696: Correct __sizeof__ support for mmap
http://bugs.python.org/issue15696  closed by serhiy.storchaka

#16599: unittest: Access test result from tearDown
http://bugs.python.org/issue16599  closed by Claudiu.Popa

#19628: maxlevels -1 on compileall for unlimited recursion
http://bugs.python.org/issue19628  closed by python-dev

#19714: Add tests for importlib.machinery.WindowsRegistryFinder
http://bugs.python.org/issue19714  closed by brett.cannon

#19997: imghdr.what doesn't accept bytes paths
http://bugs.python.org/issue19997  closed by serhiy.storchaka

#20797: zipfile.extractall should accept bytes path as parameter
http://bugs.python.org/issue20797  closed by serhiy.storchaka

#21308: PEP 466: backport ssl changes
http://bugs.python.org/issue21308  closed by python-dev

#21389: The repr of BoundMethod objects sometimes incorrectly identifi
http://bugs.python.org/issue21389  closed by python-dev

#21549: Add the members parameter for TarFile.list()
http://bugs.python.org/issue21549  closed by serhiy.storchaka

#22016: Add a new 'surrogatereplace' output only error handler
http://bugs.python.org/issue22016  closed by ncoghlan

#22068: tkinter: avoid reference loops with Variables and Fonts
http://bugs.python.org/issue22068  closed by serhiy.storchaka

#22118: urljoin fails with messy relative URLs
http://bugs.python.org/issue22118  closed by pitrou

#22150: deprecated-removed directive is broken in Sphinx 1.2.2
http://bugs.python.org/issue22150  closed by berker.peksag

#22156: Fix compiler warnings "comparison between signed and unsigned 
http://bugs.python.org/issue22156  closed by haypo

#22157: _ctypes on ppc64: libffi/src/powerpc/linux64.o: ABI version 1 
http://bugs.python.org/issue22157  closed by doko

#22165: Empty response from http.server when directory listing contain
http://bugs.python.org/issue22165  closed by serhiy.storchaka

#22188: test_gdb fails on invalid gdbinit
http://bugs.python.org/issue22188  closed by python-dev

#22191: warnings.__all__ incomplete
http://bugs.python.org/issue22191  closed by brett.cannon

#22200: Remove distutils checks for Python version
http://bugs.python.org/issue22200  closed by python-dev

#22201: python -mzipfile fails to unzip files with folders created by 
http://bugs.python.org/issue22201  closed by serhiy.storchaka

#22205: debugmallocstats test is cpython only
http://bugs.python.org/issue22205  closed by python-dev

#22206: PyThread_create_key(): fix comparison between signed and unsig
http://bugs.python.org/issue22206  closed by haypo

#22224: docs.python.org is prone to political blocking in Russia
http://bugs.python.org/issue22224  closed by georg.brandl

#22230: 'python -mzipfile -c' does not zip empty directories
http://bugs.python.org/issue22230  closed by serhiy.storchaka

#22238: fractions.gcd results in infinite loop when nan or inf given a
http://bugs.python.org/issue22238  closed by mark.dickinson

#22245: test_urllib2_localnet prints out error messages
http://bugs.python.org/issue22245  closed by orsenthil

ACTIVITY SUMMARY (2014-08-15 - 2014-08-22)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open    4621 (+19)
  closed 29399 (+28)
  total  34020 (+47)

Open issues with patches: 2179 

Issues opened (41)
==================

#22207: Test for integer overflow on Py_ssize_t: explicitly cast to si
http://bugs.python.org/issue22207  opened by haypo

#22208: tarfile can't add in memory files (reopened)
http://bugs.python.org/issue22208  opened by markgrandi

#22209: Idle: add better access to extension information
http://bugs.python.org/issue22209  opened by terry.reedy

#22210: pdb-run-restarting-a-pdb-session
http://bugs.python.org/issue22210  opened by zhengxiexie

#22211: Remove VMS specific code in expat.h  & xmlrole.h
http://bugs.python.org/issue22211  opened by John.Malmberg

#22212: zipfile.py fails if  zlib.so module fails to build.
http://bugs.python.org/issue22212  opened by John.Malmberg

#22213: pyvenv style virtual environments unusable in an embedded syst
http://bugs.python.org/issue22213  opened by grahamd

#22214: Tkinter: Don't stringify callbacks arguments
http://bugs.python.org/issue22214  opened by serhiy.storchaka

#22215: "embedded NUL character" exceptions
http://bugs.python.org/issue22215  opened by serhiy.storchaka

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216  opened by zvyn

#22217: Reprs for zipfile classes
http://bugs.python.org/issue22217  opened by serhiy.storchaka

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218  opened by haypo

#22219: python -mzipfile fails to add empty folders to created zip
http://bugs.python.org/issue22219  opened by Antony.Lee

#22220: Ttk extensions test failure
http://bugs.python.org/issue22220  opened by serhiy.storchaka

#22221: ast.literal_eval confused by coding declarations
http://bugs.python.org/issue22221  opened by jorgenschaefer

#22222: dtoa.c: remove custom memory allocator
http://bugs.python.org/issue22222  opened by haypo

#22223: argparse not including '--' arguments in previous optional REM
http://bugs.python.org/issue22223  opened by Jurko.Gospodnetić

#22225: Add SQLite support to http.cookiejar
http://bugs.python.org/issue22225  opened by demian.brecht

#22226: Refactor dict result handling in Tkinter
http://bugs.python.org/issue22226  opened by serhiy.storchaka

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227  opened by serhiy.storchaka

#22228: Adapt bash readline operate-and-get-next function
http://bugs.python.org/issue22228  opened by lelit

#22229: wsgiref doesn't appear to ever set REMOTE_HOST in the environ
http://bugs.python.org/issue22229  opened by alex

#22231: httplib: unicode url will cause an ascii codec error when comb
http://bugs.python.org/issue22231  opened by Bob.Chen

#22232: str.splitlines splitting on none-\r\n characters
http://bugs.python.org/issue22232  opened by scharron

#22233: http.client splits headers on none-\r\n characters
http://bugs.python.org/issue22233  opened by scharron

#22234: urllib.parse.urlparse accepts any falsy value as an url
http://bugs.python.org/issue22234  opened by Ztane

#22235: httplib: TypeError with file() object in ssl.py
http://bugs.python.org/issue22235  opened by erob

#22236: Do not use _default_root in Tkinter tests
http://bugs.python.org/issue22236  opened by serhiy.storchaka

#22237: sorted() docs should state that the sort is stable
http://bugs.python.org/issue22237  opened by Wilfred.Hughes

#22239: asyncio: nested event loop
http://bugs.python.org/issue22239  opened by djarb

#22240: argparse support for "python -m module" in help
http://bugs.python.org/issue22240  opened by tebeka

#22241: strftime/strptime round trip fails even for UTC datetime objec
http://bugs.python.org/issue22241  opened by akira

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242  opened by jon.poler

#22243: Documentation on try statement incorrectly implies target of e
http://bugs.python.org/issue22243  opened by mwilliamson

#22244: load_verify_locations fails to handle unicode paths on Python 
http://bugs.python.org/issue22244  opened by alex

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246  opened by akira

#22247: More incomplete module.__all__ lists
http://bugs.python.org/issue22247  opened by vadmium

#22248: urllib.request.urlopen raises exception when 30X-redirect url 
http://bugs.python.org/issue22248  opened by tomasgroth

#22249: Possibly incorrect example is given for socket.getaddrinfo()
http://bugs.python.org/issue22249  opened by Alexander.Patrakov

#22250: unittest lowercase methods
http://bugs.python.org/issue22250  opened by simonzack

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251  opened by berker.peksag

Most recent 15 issues with no replies (15)
==========================================

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251

#22250: unittest lowercase methods
http://bugs.python.org/issue22250

#22249: Possibly incorrect example is given for socket.getaddrinfo()
http://bugs.python.org/issue22249

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246

#22244: load_verify_locations fails to handle unicode paths on Python 
http://bugs.python.org/issue22244

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242

#22239: asyncio: nested event loop
http://bugs.python.org/issue22239

#22234: urllib.parse.urlparse accepts any falsy value as an url
http://bugs.python.org/issue22234

#22231: httplib: unicode url will cause an ascii codec error when comb
http://bugs.python.org/issue22231

#22229: wsgiref doesn't appear to ever set REMOTE_HOST in the environ
http://bugs.python.org/issue22229

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227

#22225: Add SQLite support to http.cookiejar
http://bugs.python.org/issue22225

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216

#22212: zipfile.py fails if  zlib.so module fails to build.
http://bugs.python.org/issue22212

#22211: Remove VMS specific code in expat.h  & xmlrole.h
http://bugs.python.org/issue22211

Most recent 15 issues waiting for review (15)
=============================================

#22251: Various markup errors in documentation
http://bugs.python.org/issue22251

#22246: add strptime(s, '%s')
http://bugs.python.org/issue22246

#22242: Doc fix in the Import section in language reference.
http://bugs.python.org/issue22242

#22240: argparse support for "python -m module" in help
http://bugs.python.org/issue22240

#22236: Do not use _default_root in Tkinter tests
http://bugs.python.org/issue22236

#22228: Adapt bash readline operate-and-get-next function
http://bugs.python.org/issue22228

#22227: Simplify tarfile iterator
http://bugs.python.org/issue22227

#22226: Refactor dict result handling in Tkinter
http://bugs.python.org/issue22226

#22222: dtoa.c: remove custom memory allocator
http://bugs.python.org/issue22222

#22219: python -mzipfile fails to add empty folders to created zip
http://bugs.python.org/issue22219

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218

#22217: Reprs for zipfile classes
http://bugs.python.org/issue22217

#22216: smtplip STARTTLS fails at second attampt due to unsufficiant q
http://bugs.python.org/issue22216

#22215: "embedded NUL character" exceptions
http://bugs.python.org/issue22215

#22214: Tkinter: Don't stringify callbacks arguments
http://bugs.python.org/issue22214

Top 10 most discussed issues (10)
=================================

#17535: IDLE: Add an option to show line numbers along the left side o
http://bugs.python.org/issue17535   9 msgs

#22208: tarfile can't add in memory files (reopened)
http://bugs.python.org/issue22208   8 msgs

#2527: Pass a namespace to timeit
http://bugs.python.org/issue2527   6 msgs

#22195: Make it easy to replace print() calls with logging calls
http://bugs.python.org/issue22195   6 msgs

#22241: strftime/strptime round trip fails even for UTC datetime objec
http://bugs.python.org/issue22241   6 msgs

#22194: access to cdecimal / libmpdec API
http://bugs.python.org/issue22194   5 msgs

#22198: Odd floor-division corner case
http://bugs.python.org/issue22198   5 msgs

#22218: Fix more compiler warnings "comparison between signed and unsi
http://bugs.python.org/issue22218   5 msgs

#20152: Derby #15: Convert 50 sites to Argument Clinic across 9 files
http://bugs.python.org/issue20152   4 msgs

#20184: Derby #16: Convert 50 sites to Argument Clinic across 9 files
http://bugs.python.org/issue20184   4 msgs

Issues closed (27)
==================

#7283: test_site failure when .local/lib/pythonX.Y/site-packages hasn
http://bugs.python.org/issue7283  closed by ned.deily

#15696: Correct __sizeof__ support for mmap
http://bugs.python.org/issue15696  closed by serhiy.storchaka

#16599: unittest: Access test result from tearDown
http://bugs.python.org/issue16599  closed by Claudiu.Popa

#19628: maxlevels -1 on compileall for unlimited recursion
http://bugs.python.org/issue19628  closed by python-dev

#19714: Add tests for importlib.machinery.WindowsRegistryFinder
http://bugs.python.org/issue19714  closed by brett.cannon

#19997: imghdr.what doesn't accept bytes paths
http://bugs.python.org/issue19997  closed by serhiy.storchaka

#20797: zipfile.extractall should accept bytes path as parameter
http://bugs.python.org/issue20797  closed by serhiy.storchaka

#21308: PEP 466: backport ssl changes
http://bugs.python.org/issue21308  closed by python-dev

#21389: The repr of BoundMethod objects sometimes incorrectly identifi
http://bugs.python.org/issue21389  closed by python-dev

#21549: Add the members parameter for TarFile.list()
http://bugs.python.org/issue21549  closed by serhiy.storchaka

#22016: Add a new 'surrogatereplace' output only error handler
http://bugs.python.org/issue22016  closed by ncoghlan

#22068: tkinter: avoid reference loops with Variables and Fonts
http://bugs.python.org/issue22068  closed by serhiy.storchaka

#22118: urljoin fails with messy relative URLs
http://bugs.python.org/issue22118  closed by pitrou

#22150: deprecated-removed directive is broken in Sphinx 1.2.2
http://bugs.python.org/issue22150  closed by berker.peksag

#22156: Fix compiler warnings "comparison between signed and unsigned 
http://bugs.python.org/issue22156  closed by haypo

#22157: _ctypes on ppc64: libffi/src/powerpc/linux64.o: ABI version 1 
http://bugs.python.org/issue22157  closed by doko

#22165: Empty response from http.server when directory listing contain
http://bugs.python.org/issue22165  closed by serhiy.storchaka

#22188: test_gdb fails on invalid gdbinit
http://bugs.python.org/issue22188  closed by python-dev

#22191: warnings.__all__ incomplete
http://bugs.python.org/issue22191  closed by brett.cannon

#22200: Remove distutils checks for Python version
http://bugs.python.org/issue22200  closed by python-dev

#22201: python -mzipfile fails to unzip files with folders created by 
http://bugs.python.org/issue22201  closed by serhiy.storchaka

#22205: debugmallocstats test is cpython only
http://bugs.python.org/issue22205  closed by python-dev

#22206: PyThread_create_key(): fix comparison between signed and unsig
http://bugs.python.org/issue22206  closed by haypo

#22224: docs.python.org is prone to political blocking in Russia
http://bugs.python.org/issue22224  closed by georg.brandl

#22230: 'python -mzipfile -c' does not zip empty directories
http://bugs.python.org/issue22230  closed by serhiy.storchaka

#22238: fractions.gcd results in infinite loop when nan or inf given a
http://bugs.python.org/issue22238  closed by mark.dickinson

#22245: test_urllib2_localnet prints out error messages
http://bugs.python.org/issue22245  closed by orsenthil
Serhiy Storchaka | 19 Aug 10:37 2014
Picon

Bytes path support

Builting open(), io classes, os and os.path functions and some other 
functions in the stdlib support bytes paths as well as str paths. But 
many functions doesn't. There are requests about adding this support 
([1], [2]) in some modules. It is easy (just call os.fsdecode() on 
argument) but I'm not sure it is worth to do. Pathlib doesn't support 
bytes path and it looks intentional. What is general policy about 
support of bytes path in the stdlib?

[1] http://bugs.python.org/issue19997
[2] http://bugs.python.org/issue20797

Terry Reedy | 18 Aug 22:12 2014
Picon

https:bugs.python.org -- Untrusted Connection (Firefox)

Firefox does not want to connect to https:bugs.python.org. Plain 
bugs.python.org works fine. Has the certificate expired?

--

-- 
Terry Jan Reedy

Andreas Maier | 18 Aug 13:34 2014
Picon
Picon

Review needed for patch for issue #12067

Hello,
a patch for issue #12067 (targeting Py 3.5) is available since a few 
weeks and is ready for review. From my perspective, it is ready for commit.

Could the community please review the patch?

https://bugs.python.org/issue12067

Thanks,
Andy
Ian Cordasco | 17 Aug 20:40 2014
Picon

Fwd: PEP 467: Minor API improvements for bytes & bytearray

On Aug 17, 2014 12:17 PM, "Donald Stufft" <donald <at> stufft.io> wrote:
>> On Aug 17, 2014, at 1:07 PM, Raymond Hettinger <raymond.hettinger <at> gmail.com> wrote:
>>
>>
>> On Aug 17, 2014, at 1:41 AM, Nick Coghlan <ncoghlan <at> gmail.com> wrote:
>>
>>> If I see "bytearray(10)" there is nothing there that suggests "this
>>> creates an array of length 10 and initialises it to zero" to me. I'd
>>> be more inclined to guess it would be equivalent to "bytearray([10])".
>>>
>>> "bytearray.zeros(10)", on the other hand, is relatively clear,
>>> independently of user expectations.
>>
>>
>> Zeros would have been great but that should have been done originally.
>> The time to get API design right is at inception.
>> Now, you're just breaking code and invalidating any published examples.
>>
>>>>
>>>> Another thought is that the core devs should be very reluctant to deprecate
>>>> anything we don't have to while the 2 to 3 transition is still in progress.
>>>> Every new deprecation of APIs that existed in Python 2.7 just adds another
>>>> obstacle to converting code.  Individually, the differences are trivial.
>>>> Collectively, they present a good reason to never migrate code to Python 3.
>>>
>>>
>>> This is actually one of the inconsistencies between the Python 2 and 3
>>> binary APIs:
>>
>>
>> However, bytearray(n) is the same in both Python 2 and Python 3.
>> Changing it in Python 3 increases the gulf between the two.
>>
>> The further we let Python 3 diverge from Python 2, the less likely that
>> people will convert their code and the harder you make it to write code
>> that runs under both.
>>
>> FWIW, I've been teaching Python full time for three years.  I cover the
>> use of bytearray(n) in my classes and not a single person out of 3000+
>> engineers have had a problem with it.   I seriously question the PEP's
>> assertion that there is a real problem to be solved (i.e. that people
>> are baffled by bytearray(bufsiz)) and that the problem is sufficiently
>> painful to warrant the headaches that go along with API changes.
>>
>> The other proposal to add bytearray.byte(3) should probably be named
>> bytearray.from_byte(3) for clarity.  That said, I question whether there is
>> actually a use case for this.   I have never seen seen code that has a
>> need to create a byte array of length one from a single integer.
>> For the most part, the API will be easiest to learn if it matches what
>> we do for lists and for array.array.
>>
>> Sorry Nick, but I think you're making the API worse instead of better.
>> This API isn't perfect but it isn't flat-out broken either.   There is some
>> unfortunate asymmetry between bytes() and bytearray() in Python 2,
>> but that ship has sailed.  The current API for Python 3 is pretty good
>> (though there is still a tension between wanting to be like lists and like
>> strings both at the same time).
>>
>>
>> Raymond
>>
>>
>> P.S.  The most important problem in the Python world now is getting
>> Python 2 users to adopt Python 3.  The core devs need to develop
>> a strong distaste for anything that makes that problem harder.
>>
>
> For the record I’ve had all of the problems that Nick states and I’m
> +1 on this change.

I've run into these problems as well, but I'm swayed by Raymond's
argument regarding bytearray's constructor. I wouldn't be adverse to
adding zeroes (for some parity between bytes and bytearray) to that
but I'm not sure deprecating te behaviour of bytearray's constructor
is necessary.

(Whilst on my phone I only replied to Donald, so I'm forwarding this
to the list.)
_______________________________________________
Python-Dev mailing list
Python-Dev <at> python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: https://mail.python.org/mailman/options/python-dev/python-python-dev%40m.gmane.org

Gmane