Alex Gaynor | 19 Sep 18:53 2014
Picon

PEP476: Enabling certificate validation by default

Hi all,

I've just updated the PEP to reflect the API suggestions from Nick, and the
fact that the necessary changes to urllib were landed.

I think this is ready for pronouncement, Guido?

Cheers,
Alex

Python tracker | 19 Sep 18:07 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-09-12 - 2014-09-19)
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    4662 (+10)
  closed 29544 (+35)
  total  34206 (+45)

Open issues with patches: 2197 

Issues opened (33)
==================

#22166: test_codecs leaks references
http://bugs.python.org/issue22166  reopened by haypo

#22395: test_pathlib error for complex symlinks on Windows
http://bugs.python.org/issue22395  opened by jfoo

#22396: AIX posix_fadvise and posix_fallocate
http://bugs.python.org/issue22396  opened by David.Edelsohn

#22397: test_socket failure on AIX
http://bugs.python.org/issue22397  opened by David.Edelsohn

#22401: argparse: 'resolve' conflict handler damages the actions of th
(Continue reading)

Barry Warsaw | 19 Sep 16:31 2014

3.5 release schedule PEP

Hi Larry,

I think we need a Python 3.5 Release Schedule PEP.

Cheers,
-Barry
Hi Larry,

I think we need a Python 3.5 Release Schedule PEP.

Cheers,
-Barry
Bohuslav Kabrda | 19 Sep 09:31 2014
Picon

PEP 394 - Clarification of what "python" command should invoke

Hi,
as Fedora is getting closer to having python3 as a default, I'm being more and more asked by Fedora
users/contributors what'll "/usr/bin/python" invoke when we achieve this (Fedora 22 hopefully). So I
was rereading PEP 394 and I think I need a small clarification regarding two points in the PEP:
- "for the time being, all distributions should ensure that python refers to the same target as python2."
- "Similarly, the more general python command should be installed whenever any version of Python is
installed and should invoke the same version of Python as either python2 or python3."

The important word in the second point is, I think, *whenever*. Trying to apply these two points to Fedora 22
situation, I can think of several approaches:
- /usr/bin/python will always point to python3 (seems to go against the first mentioned PEP recommendation)
- /usr/bin/python will always point to python2 (seems to go against the second mentioned PEP
recommendation, there is no /usr/bin/python if python2 is not installed)
- /usr/bin/python will point to python3 if python2 is not installed, else it will point to python2
(inconsistent; also the user doesn't know he's running and what libraries he'll be able to import - the
system can have different sets of python2-* and python3-* extension modules installed)
- there will be no /usr/bin/python (goes against PEP and seems just wrong)

I'd really appreciate upstream guidance and perhaps a PEP clarification for distributions that ship both
python2 and python3, but can live without python2 (and are not Arch :)).

Thanks a lot!

--

-- 
Regards,
Slavek Kabrda
Ben Hoyt | 19 Sep 03:30 2014
Picon

Adding numbering to PEP 20, the Zen of Python

I was emailing someone today about implementing something (for PEP
471, as it happens) and wanted to link to the Zen of Python [1] and
note a particular clause (in this case "If the implementation is hard
to explain, it's a bad idea."). However, there are no clause numbers,
so you can't refer to specific phrases.

I know it's a short enough document that it probably doesn't matter.
And maybe numbering them would make it less Zen. Would be handy in
code reviews and the like, for example: "Not very Pythonic. See PEP 20
point 5." Is it just my pedantic self, or have others wanted to do
this too?

[1] http://legacy.python.org/dev/peps/pep-0020/

-Ben
Harish Tech | 15 Sep 05:18 2014
Picon

List insert at index that is well out of range - behaves like append

I had a list

 a = [1, 2, 3]

when I did

a.insert(100, 100)

[1, 2, 3, 100]

as list was originally of size 4 and I was trying to insert value at index 100 , it behaved like append instead of throwing any errors as I was trying to insert in an index that did not even existed .


Should it not throw


IndexError: list assignment index out of range


exception as it throws when I attempt doing


a[100] = 100

Question : 1. Any idea Why has it been designed to silently handle this instead of informing the user with an exception ?


Personal Opinion : Lets see how other dynamic languages behave in such a situation : Ruby :


    > a = [1, 2]

    > a[100] = 100

    > a

 => [1, 2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 100] 

The way ruby handles this is pretty clear and sounds meaningful (and this is how I expected to behave and it behaved as per my expectation) at least to me . So what I felt was either it should throw exception or do the way ruby handles it .


Is ruby way of handling not the obvious way ? 

I even raised it in stackoverflow http://stackoverflow.com/questions/25840177/list-insert-at-index-that-is-well-out-of-range-behaves-like-append 

and got some responses .


<div><div dir="ltr">
<p><span>I had a list</span></p>
<p><span>&nbsp;a = [1, 2, 3]</span></p>
<p><span>when I did</span></p>
<p><span>a.insert(100, 100)</span></p>
<p><span>[1, 2, 3, 100]</span></p>
<p><span>as list was originally of size 4 and I was trying to insert value at index 100 , it behaved like append instead of throwing any errors as I was trying to insert in an index that did not even existed .</span></p>
<p><span><br></span></p>
<p><span>Should it not throw</span></p>
<p><span><br></span></p>
<p><span>IndexError: list assignment index out of range</span></p>
<p><span><br></span></p>
<p><span>exception as it throws when I attempt doing</span></p>
<p><span><br></span></p>
<p><span>a[100] = 100</span></p>
<p><span>Question : 1. Any idea Why has it been designed to silently handle this instead of informing the user with an exception ?</span></p>
<p><span><br></span></p>
<p><span>Personal Opinion : Lets see how other dynamic languages behave in such a situation : Ruby :</span></p>
<p><span><br></span></p>
<p><span>&nbsp; &nbsp; &gt; a = [1, 2]</span></p>
<p><span>&nbsp; &nbsp; &gt; a[100] = 100</span></p>
<p><span>&nbsp; &nbsp; &gt; a</span></p>
<p><span>&nbsp;=&gt; [1, 2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 100]&nbsp;</span></p>
<p><span>The way ruby handles this is pretty clear and sounds meaningful (and this is how I expected to behave and it behaved as per my expectation) at least to me . So what I felt was either it should throw exception or do the way ruby handles it .</span></p>
<p><br></p>
<p>Is ruby way of handling not the obvious way ?&nbsp;</p>
<p>I even raised it in stackoverflow&nbsp;<a href="http://stackoverflow.com/questions/25840177/list-insert-at-index-that-is-well-out-of-range-behaves-like-append">http://stackoverflow.com/questions/25840177/list-insert-at-index-that-is-well-out-of-range-behaves-like-append</a>&nbsp;</p>
<p>and got some responses .</p>
<p><br></p>
</div></div>
Brynjar Smári Bjarnason | 14 Sep 12:13 2014

namedtuples bug between 3.3.2 and 3.4.1

Hi.

I am using Python 3.4.1 installed with Anaconda. I tried the following
(expecting an OrderedDict as result):

>>>from collections import namedtuple
>>>NT = namedtuple("NT",["a","b"])
>>>nt = NT(1,2)
>>>print(vars(nt))
{}

so the result is an empty dict. In Python 3.3.2 (downgraded in the
same Anaconda environment) results in:

>>>print(vars(nt))
OrderedDict([('a', 1), ('b', 2)])

I haven't looked at the source code, I can do that later in the week
and see if I can pinpoint where this is happening. But any suggestions
what and where to fix this would be good :)

Cheers,
Brynjar
Python tracker | 12 Sep 18:08 2014

Summary of Python tracker Issues


ACTIVITY SUMMARY (2014-09-05 - 2014-09-12)
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    4652 (+12)
  closed 29509 (+38)
  total  34161 (+50)

Open issues with patches: 2196 

Issues opened (39)
==================

#16662: load_tests not invoked in package/__init__.py
http://bugs.python.org/issue16662  reopened by haypo

#22343: Install bash activate script on Windows when using venv
http://bugs.python.org/issue22343  opened by marfire

#22344: Reorganize unittest.mock docs into linear manner
http://bugs.python.org/issue22344  opened by py.user

#22347: mimetypes.guess_type("//example.com") misinterprets host name 
http://bugs.python.org/issue22347  opened by vadmium

#22348: Documentation of asyncio.StreamWriter.drain()
http://bugs.python.org/issue22348  opened by martius

#22350: nntplib file write failure causes exception from QUIT command
http://bugs.python.org/issue22350  opened by vadmium

#22351: NNTP constructor exception leaves socket for garbage collector
http://bugs.python.org/issue22351  opened by vadmium

#22352: Ensure opcode names and args fit in disassembly output
http://bugs.python.org/issue22352  opened by ncoghlan

#22354: Highlite tabs in the IDLE
http://bugs.python.org/issue22354  opened by Christian.Kleineidam

#22355: inconsistent results with inspect.getsource() / inspect.getsou
http://bugs.python.org/issue22355  opened by isedev

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356  opened by akira

#22357: inspect module documentation makes no reference to __qualname_
http://bugs.python.org/issue22357  opened by isedev

#22359: Remove incorrect uses of recursive make
http://bugs.python.org/issue22359  opened by Sjlver

#22360: Adding manually offset parameter to str/bytes split function
http://bugs.python.org/issue22360  opened by cwr

#22361: Ability to join() threads in concurrent.futures.ThreadPoolExec
http://bugs.python.org/issue22361  opened by dktrkranz

#22362: Warn about octal escapes > 0o377 in re
http://bugs.python.org/issue22362  opened by serhiy.storchaka

#22363: argparse AssertionError with add_mutually_exclusive_group and 
http://bugs.python.org/issue22363  opened by Zacrath

#22364: Unify error messages of re and regex
http://bugs.python.org/issue22364  opened by serhiy.storchaka

#22365: SSLContext.load_verify_locations(cadata) does not accept CRLs
http://bugs.python.org/issue22365  opened by Ralph.Broenink

#22366: urllib.request.urlopen shoudl take a "context" (SSLContext) ar
http://bugs.python.org/issue22366  opened by alex

#22367: Please add F_OFD_SETLK, etc support to fcntl.lockf
http://bugs.python.org/issue22367  opened by Andrew.Lutomirski

#22370: pathlib OS detection
http://bugs.python.org/issue22370  opened by Antony.Lee

#22371: tests failing with -uall and http_proxy and https_proxy set
http://bugs.python.org/issue22371  opened by doko

#22374: Replace contextmanager example and improve explanation
http://bugs.python.org/issue22374  opened by terry.reedy

#22376: urllib2.urlopen().read().splitlines() opening a directory in a
http://bugs.python.org/issue22376  opened by alanoe

#22377: %Z in strptime doesn't match EST and others
http://bugs.python.org/issue22377  opened by cool-RR

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378  opened by jpv

#22379: Empty exception message of str.join
http://bugs.python.org/issue22379  opened by fossilet

#22382: sqlite3 connection built from apsw connection should raise Int
http://bugs.python.org/issue22382  opened by wtonkin

#22384: Tk.report_callback_exception kills process when run with pytho
http://bugs.python.org/issue22384  opened by Aivar.Annamaa

#22385: Allow 'x' and 'X' to accept bytes-like objects in string forma
http://bugs.python.org/issue22385  opened by ncoghlan

#22387: Making tempfile.NamedTemporaryFile a class
http://bugs.python.org/issue22387  opened by Antony.Lee

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388  opened by serhiy.storchaka

#22389: Generalize contextlib.redirect_stdout
http://bugs.python.org/issue22389  opened by barry

#22390: test.regrtest should complain if a test doesn't remove tempora
http://bugs.python.org/issue22390  opened by haypo

#22391: MSILIB truncates last character in summary information stream
http://bugs.python.org/issue22391  opened by Kevin.Phillips

#22392: Clarify documentation of __getinitargs__
http://bugs.python.org/issue22392  opened by David.Gilman

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393  opened by dan.oreilly

#22394: Update documentation building to use venv and pip
http://bugs.python.org/issue22394  opened by brett.cannon

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

#22394: Update documentation building to use venv and pip
http://bugs.python.org/issue22394

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393

#22392: Clarify documentation of __getinitargs__
http://bugs.python.org/issue22392

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378

#22370: pathlib OS detection
http://bugs.python.org/issue22370

#22367: Please add F_OFD_SETLK, etc support to fcntl.lockf
http://bugs.python.org/issue22367

#22357: inspect module documentation makes no reference to __qualname_
http://bugs.python.org/issue22357

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356

#22354: Highlite tabs in the IDLE
http://bugs.python.org/issue22354

#22352: Ensure opcode names and args fit in disassembly output
http://bugs.python.org/issue22352

#22351: NNTP constructor exception leaves socket for garbage collector
http://bugs.python.org/issue22351

#22350: nntplib file write failure causes exception from QUIT command
http://bugs.python.org/issue22350

#22347: mimetypes.guess_type("//example.com") misinterprets host name 
http://bugs.python.org/issue22347

#22344: Reorganize unittest.mock docs into linear manner
http://bugs.python.org/issue22344

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

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393

#22390: test.regrtest should complain if a test doesn't remove tempora
http://bugs.python.org/issue22390

#22389: Generalize contextlib.redirect_stdout
http://bugs.python.org/issue22389

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388

#22384: Tk.report_callback_exception kills process when run with pytho
http://bugs.python.org/issue22384

#22379: Empty exception message of str.join
http://bugs.python.org/issue22379

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378

#22366: urllib.request.urlopen shoudl take a "context" (SSLContext) ar
http://bugs.python.org/issue22366

#22363: argparse AssertionError with add_mutually_exclusive_group and 
http://bugs.python.org/issue22363

#22362: Warn about octal escapes > 0o377 in re
http://bugs.python.org/issue22362

#22359: Remove incorrect uses of recursive make
http://bugs.python.org/issue22359

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356

#22348: Documentation of asyncio.StreamWriter.drain()
http://bugs.python.org/issue22348

#22339: Incorrect behavior when subclassing enum.Enum
http://bugs.python.org/issue22339

#22330: PyOS_mystricmp is broken
http://bugs.python.org/issue22330

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

#22299: resolve() on Windows makes some pathological paths unusable
http://bugs.python.org/issue22299  19 msgs

#22302: Windows os.path.isabs UNC path bug
http://bugs.python.org/issue22302  12 msgs

#9951: introduce bytes.hex method
http://bugs.python.org/issue9951  11 msgs

#16662: load_tests not invoked in package/__init__.py
http://bugs.python.org/issue16662  11 msgs

#22166: test_codecs leaks references
http://bugs.python.org/issue22166  10 msgs

#21228: Missing enumeration of HTTPResponse Objects methods of urllib.
http://bugs.python.org/issue21228   9 msgs

#7559: TestLoader.loadTestsFromName swallows import errors
http://bugs.python.org/issue7559   7 msgs

#22339: Incorrect behavior when subclassing enum.Enum
http://bugs.python.org/issue22339   7 msgs

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

#22360: Adding manually offset parameter to str/bytes split function
http://bugs.python.org/issue22360   6 msgs

Issues closed (37)
==================

#4972: context management support in imaplib, smtplib, ftplib
http://bugs.python.org/issue4972  closed by serhiy.storchaka

#8315: ./python -m unittest test.test_importlib doesn't work
http://bugs.python.org/issue8315  closed by berker.peksag

#11487: build_installer.py should avoid relying on a young Python
http://bugs.python.org/issue11487  closed by ned.deily

#13968: Support recursive globs
http://bugs.python.org/issue13968  closed by serhiy.storchaka

#15594: test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSE
http://bugs.python.org/issue15594  closed by ned.deily

#16104: Compileall script: add option to use multiple cores
http://bugs.python.org/issue16104  closed by brett.cannon

#19232: Speed up _decimal import
http://bugs.python.org/issue19232  closed by skrah

#19524: ResourceWarning when urlopen() forgets the HTTPConnection obje
http://bugs.python.org/issue19524  closed by serhiy.storchaka

#20417: ensurepip should not be installed with --without-ensurepip
http://bugs.python.org/issue20417  closed by ncoghlan

#20643: Strange dot in documentation (after generator.close)
http://bugs.python.org/issue20643  closed by serhiy.storchaka

#21122: CPython fails to build modules with LLVM LTO on Mac OS X
http://bugs.python.org/issue21122  closed by Sjlver

#21147: sqlite3 doesn't complain if the request contains a null charac
http://bugs.python.org/issue21147  closed by serhiy.storchaka

#21951: tcl test change crashes AIX
http://bugs.python.org/issue21951  closed by haypo

#22131: uuid.bytes optimization
http://bugs.python.org/issue22131  closed by serhiy.storchaka

#22192: dict_values objects are hashable
http://bugs.python.org/issue22192  closed by roippi

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

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

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

#22284: decimal module contains less symbols when the _decimal module 
http://bugs.python.org/issue22284  closed by skrah

#22285: The Modules/ directory should not be added to sys.path
http://bugs.python.org/issue22285  closed by ned.deily

#22295: Clarify available commands for package installation
http://bugs.python.org/issue22295  closed by ncoghlan

#22336: _tkinter should use Python PyMem_Malloc() instead of Tcl ckall
http://bugs.python.org/issue22336  closed by python-dev

#22338: test_json crash on memory allocation failure
http://bugs.python.org/issue22338  closed by haypo

#22340: Fix Python 3 warnings in Python 2 tests
http://bugs.python.org/issue22340  closed by haypo

#22342: Fix typo in PEP 380 -- Syntax for Delegating to a Subgenerator
http://bugs.python.org/issue22342  closed by python-dev

#22345: https://docs.python.org/release/1.4/ returns 403
http://bugs.python.org/issue22345  closed by benjamin.peterson

#22346: asyncio documentation does not mention provisional status
http://bugs.python.org/issue22346  closed by gvanrossum

#22349: Remove more unnecessary version checks from distutils
http://bugs.python.org/issue22349  closed by python-dev

#22353: re.findall() documentation lacks information about finding THE
http://bugs.python.org/issue22353  closed by gvanrossum

#22358: Unnecessary JUMP_FORWARD(0) (NOP) in if statements without els
http://bugs.python.org/issue22358  closed by serhiy.storchaka

#22369: "context management protocol" vs "context manager protocol"
http://bugs.python.org/issue22369  closed by serhiy.storchaka

#22373: PyArray_FromAny tries to deallocate double: 12 (d)
http://bugs.python.org/issue22373  closed by benjamin.peterson

#22375: urllib2.urlopen().read().splitlines() opening a directory in a
http://bugs.python.org/issue22375  closed by alanoe

#22380: Y2K compliance section in FAQ is 14 years too old
http://bugs.python.org/issue22380  closed by python-dev

#22381: update zlib in 2.7 to 1.2.8
http://bugs.python.org/issue22381  closed by doko

#22383: Crazy unicode : How g and ɡ look the same but are two differe
http://bugs.python.org/issue22383  closed by ezio.melotti

#22386: Python 3.4 logging.getLevelName() no longer maps string to lev
http://bugs.python.org/issue22386  closed by python-dev

ACTIVITY SUMMARY (2014-09-05 - 2014-09-12)
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    4652 (+12)
  closed 29509 (+38)
  total  34161 (+50)

Open issues with patches: 2196 

Issues opened (39)
==================

#16662: load_tests not invoked in package/__init__.py
http://bugs.python.org/issue16662  reopened by haypo

#22343: Install bash activate script on Windows when using venv
http://bugs.python.org/issue22343  opened by marfire

#22344: Reorganize unittest.mock docs into linear manner
http://bugs.python.org/issue22344  opened by py.user

#22347: mimetypes.guess_type("//example.com") misinterprets host name 
http://bugs.python.org/issue22347  opened by vadmium

#22348: Documentation of asyncio.StreamWriter.drain()
http://bugs.python.org/issue22348  opened by martius

#22350: nntplib file write failure causes exception from QUIT command
http://bugs.python.org/issue22350  opened by vadmium

#22351: NNTP constructor exception leaves socket for garbage collector
http://bugs.python.org/issue22351  opened by vadmium

#22352: Ensure opcode names and args fit in disassembly output
http://bugs.python.org/issue22352  opened by ncoghlan

#22354: Highlite tabs in the IDLE
http://bugs.python.org/issue22354  opened by Christian.Kleineidam

#22355: inconsistent results with inspect.getsource() / inspect.getsou
http://bugs.python.org/issue22355  opened by isedev

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356  opened by akira

#22357: inspect module documentation makes no reference to __qualname_
http://bugs.python.org/issue22357  opened by isedev

#22359: Remove incorrect uses of recursive make
http://bugs.python.org/issue22359  opened by Sjlver

#22360: Adding manually offset parameter to str/bytes split function
http://bugs.python.org/issue22360  opened by cwr

#22361: Ability to join() threads in concurrent.futures.ThreadPoolExec
http://bugs.python.org/issue22361  opened by dktrkranz

#22362: Warn about octal escapes > 0o377 in re
http://bugs.python.org/issue22362  opened by serhiy.storchaka

#22363: argparse AssertionError with add_mutually_exclusive_group and 
http://bugs.python.org/issue22363  opened by Zacrath

#22364: Unify error messages of re and regex
http://bugs.python.org/issue22364  opened by serhiy.storchaka

#22365: SSLContext.load_verify_locations(cadata) does not accept CRLs
http://bugs.python.org/issue22365  opened by Ralph.Broenink

#22366: urllib.request.urlopen shoudl take a "context" (SSLContext) ar
http://bugs.python.org/issue22366  opened by alex

#22367: Please add F_OFD_SETLK, etc support to fcntl.lockf
http://bugs.python.org/issue22367  opened by Andrew.Lutomirski

#22370: pathlib OS detection
http://bugs.python.org/issue22370  opened by Antony.Lee

#22371: tests failing with -uall and http_proxy and https_proxy set
http://bugs.python.org/issue22371  opened by doko

#22374: Replace contextmanager example and improve explanation
http://bugs.python.org/issue22374  opened by terry.reedy

#22376: urllib2.urlopen().read().splitlines() opening a directory in a
http://bugs.python.org/issue22376  opened by alanoe

#22377: %Z in strptime doesn't match EST and others
http://bugs.python.org/issue22377  opened by cool-RR

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378  opened by jpv

#22379: Empty exception message of str.join
http://bugs.python.org/issue22379  opened by fossilet

#22382: sqlite3 connection built from apsw connection should raise Int
http://bugs.python.org/issue22382  opened by wtonkin

#22384: Tk.report_callback_exception kills process when run with pytho
http://bugs.python.org/issue22384  opened by Aivar.Annamaa

#22385: Allow 'x' and 'X' to accept bytes-like objects in string forma
http://bugs.python.org/issue22385  opened by ncoghlan

#22387: Making tempfile.NamedTemporaryFile a class
http://bugs.python.org/issue22387  opened by Antony.Lee

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388  opened by serhiy.storchaka

#22389: Generalize contextlib.redirect_stdout
http://bugs.python.org/issue22389  opened by barry

#22390: test.regrtest should complain if a test doesn't remove tempora
http://bugs.python.org/issue22390  opened by haypo

#22391: MSILIB truncates last character in summary information stream
http://bugs.python.org/issue22391  opened by Kevin.Phillips

#22392: Clarify documentation of __getinitargs__
http://bugs.python.org/issue22392  opened by David.Gilman

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393  opened by dan.oreilly

#22394: Update documentation building to use venv and pip
http://bugs.python.org/issue22394  opened by brett.cannon

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

#22394: Update documentation building to use venv and pip
http://bugs.python.org/issue22394

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393

#22392: Clarify documentation of __getinitargs__
http://bugs.python.org/issue22392

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378

#22370: pathlib OS detection
http://bugs.python.org/issue22370

#22367: Please add F_OFD_SETLK, etc support to fcntl.lockf
http://bugs.python.org/issue22367

#22357: inspect module documentation makes no reference to __qualname_
http://bugs.python.org/issue22357

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356

#22354: Highlite tabs in the IDLE
http://bugs.python.org/issue22354

#22352: Ensure opcode names and args fit in disassembly output
http://bugs.python.org/issue22352

#22351: NNTP constructor exception leaves socket for garbage collector
http://bugs.python.org/issue22351

#22350: nntplib file write failure causes exception from QUIT command
http://bugs.python.org/issue22350

#22347: mimetypes.guess_type("//example.com") misinterprets host name 
http://bugs.python.org/issue22347

#22344: Reorganize unittest.mock docs into linear manner
http://bugs.python.org/issue22344

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

#22393: multiprocessing.Pool shouldn't hang forever if a worker proces
http://bugs.python.org/issue22393

#22390: test.regrtest should complain if a test doesn't remove tempora
http://bugs.python.org/issue22390

#22389: Generalize contextlib.redirect_stdout
http://bugs.python.org/issue22389

#22388: Unify style of "Contributed by" notes
http://bugs.python.org/issue22388

#22384: Tk.report_callback_exception kills process when run with pytho
http://bugs.python.org/issue22384

#22379: Empty exception message of str.join
http://bugs.python.org/issue22379

#22378: SO_MARK support for Linux
http://bugs.python.org/issue22378

#22366: urllib.request.urlopen shoudl take a "context" (SSLContext) ar
http://bugs.python.org/issue22366

#22363: argparse AssertionError with add_mutually_exclusive_group and 
http://bugs.python.org/issue22363

#22362: Warn about octal escapes > 0o377 in re
http://bugs.python.org/issue22362

#22359: Remove incorrect uses of recursive make
http://bugs.python.org/issue22359

#22356: mention explicitly that stdlib assumes gmtime(0) epoch is 1970
http://bugs.python.org/issue22356

#22348: Documentation of asyncio.StreamWriter.drain()
http://bugs.python.org/issue22348

#22339: Incorrect behavior when subclassing enum.Enum
http://bugs.python.org/issue22339

#22330: PyOS_mystricmp is broken
http://bugs.python.org/issue22330

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

#22299: resolve() on Windows makes some pathological paths unusable
http://bugs.python.org/issue22299  19 msgs

#22302: Windows os.path.isabs UNC path bug
http://bugs.python.org/issue22302  12 msgs

#9951: introduce bytes.hex method
http://bugs.python.org/issue9951  11 msgs

#16662: load_tests not invoked in package/__init__.py
http://bugs.python.org/issue16662  11 msgs

#22166: test_codecs leaks references
http://bugs.python.org/issue22166  10 msgs

#21228: Missing enumeration of HTTPResponse Objects methods of urllib.
http://bugs.python.org/issue21228   9 msgs

#7559: TestLoader.loadTestsFromName swallows import errors
http://bugs.python.org/issue7559   7 msgs

#22339: Incorrect behavior when subclassing enum.Enum
http://bugs.python.org/issue22339   7 msgs

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

#22360: Adding manually offset parameter to str/bytes split function
http://bugs.python.org/issue22360   6 msgs

Issues closed (37)
==================

#4972: context management support in imaplib, smtplib, ftplib
http://bugs.python.org/issue4972  closed by serhiy.storchaka

#8315: ./python -m unittest test.test_importlib doesn't work
http://bugs.python.org/issue8315  closed by berker.peksag

#11487: build_installer.py should avoid relying on a young Python
http://bugs.python.org/issue11487  closed by ned.deily

#13968: Support recursive globs
http://bugs.python.org/issue13968  closed by serhiy.storchaka

#15594: test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSE
http://bugs.python.org/issue15594  closed by ned.deily

#16104: Compileall script: add option to use multiple cores
http://bugs.python.org/issue16104  closed by brett.cannon

#19232: Speed up _decimal import
http://bugs.python.org/issue19232  closed by skrah

#19524: ResourceWarning when urlopen() forgets the HTTPConnection obje
http://bugs.python.org/issue19524  closed by serhiy.storchaka

#20417: ensurepip should not be installed with --without-ensurepip
http://bugs.python.org/issue20417  closed by ncoghlan

#20643: Strange dot in documentation (after generator.close)
http://bugs.python.org/issue20643  closed by serhiy.storchaka

#21122: CPython fails to build modules with LLVM LTO on Mac OS X
http://bugs.python.org/issue21122  closed by Sjlver

#21147: sqlite3 doesn't complain if the request contains a null charac
http://bugs.python.org/issue21147  closed by serhiy.storchaka

#21951: tcl test change crashes AIX
http://bugs.python.org/issue21951  closed by haypo

#22131: uuid.bytes optimization
http://bugs.python.org/issue22131  closed by serhiy.storchaka

#22192: dict_values objects are hashable
http://bugs.python.org/issue22192  closed by roippi

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

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

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

#22284: decimal module contains less symbols when the _decimal module 
http://bugs.python.org/issue22284  closed by skrah

#22285: The Modules/ directory should not be added to sys.path
http://bugs.python.org/issue22285  closed by ned.deily

#22295: Clarify available commands for package installation
http://bugs.python.org/issue22295  closed by ncoghlan

#22336: _tkinter should use Python PyMem_Malloc() instead of Tcl ckall
http://bugs.python.org/issue22336  closed by python-dev

#22338: test_json crash on memory allocation failure
http://bugs.python.org/issue22338  closed by haypo

#22340: Fix Python 3 warnings in Python 2 tests
http://bugs.python.org/issue22340  closed by haypo

#22342: Fix typo in PEP 380 -- Syntax for Delegating to a Subgenerator
http://bugs.python.org/issue22342  closed by python-dev

#22345: https://docs.python.org/release/1.4/ returns 403
http://bugs.python.org/issue22345  closed by benjamin.peterson

#22346: asyncio documentation does not mention provisional status
http://bugs.python.org/issue22346  closed by gvanrossum

#22349: Remove more unnecessary version checks from distutils
http://bugs.python.org/issue22349  closed by python-dev

#22353: re.findall() documentation lacks information about finding THE
http://bugs.python.org/issue22353  closed by gvanrossum

#22358: Unnecessary JUMP_FORWARD(0) (NOP) in if statements without els
http://bugs.python.org/issue22358  closed by serhiy.storchaka

#22369: "context management protocol" vs "context manager protocol"
http://bugs.python.org/issue22369  closed by serhiy.storchaka

#22373: PyArray_FromAny tries to deallocate double: 12 (d)
http://bugs.python.org/issue22373  closed by benjamin.peterson

#22375: urllib2.urlopen().read().splitlines() opening a directory in a
http://bugs.python.org/issue22375  closed by alanoe

#22380: Y2K compliance section in FAQ is 14 years too old
http://bugs.python.org/issue22380  closed by python-dev

#22381: update zlib in 2.7 to 1.2.8
http://bugs.python.org/issue22381  closed by doko

#22383: Crazy unicode : How g and ɡ look the same but are two differe
http://bugs.python.org/issue22383  closed by ezio.melotti

#22386: Python 3.4 logging.getLevelName() no longer maps string to lev
http://bugs.python.org/issue22386  closed by python-dev
Li Tianqing | 11 Sep 04:55 2014

recursive closure

Hello,
    Can someone explain me why gc(CPython) can not collect recursive closure's cycle reference?  There is no __del__ here, why gc can not collect?
    Thanks a  lot.

For example:
#!/usr/bin/env python

import ipdb
import gc

gc.set_debug(gc.DEBUG_LEAK)

def A():
N = [1]
def aa(n):
if n in N:
return 1
else:
return n * aa(n-1)

x = 33 + aa(10)
#ipdb.set_trace()
print x 


if __name__ == '__main__':
while xrange(1000):
A()





--
Best
    Li Tianqing


<div>
<div>
<div>Hello,</div>
<div>&nbsp; &nbsp; Can someone explain me why gc(CPython) can not collect recursive closure's cycle reference? &nbsp;There is no __del__ here, why gc can not collect?</div>
<div>&nbsp; &nbsp;&nbsp;<span>Thanks a &nbsp;lot.</span>
</div>
<div><br></div>
<div>For example:</div>
<div>
<div>#!/usr/bin/env python</div>
<div><br></div>
<div>import ipdb</div>
<div>import gc</div>
<div><br></div>
<div>gc.set_debug(gc.DEBUG_LEAK)</div>
<div><br></div>
<div>def A():</div>
<div>
<span class="Apple-tab-span">	</span>N = [1]</div>
<div>
<span class="Apple-tab-span">	</span>def aa(n):</div>
<div>
<span class="Apple-tab-span">		</span>if n in N:</div>
<div>
<span class="Apple-tab-span">			</span>return 1</div>
<div>
<span class="Apple-tab-span">		</span>else:</div>
<div>
<span class="Apple-tab-span">			</span>return n * aa(n-1)</div>
<div><br></div>
<div>
<span class="Apple-tab-span">	</span>x = 33 + aa(10)</div>
<div>
<span class="Apple-tab-span">	</span>#ipdb.set_trace()</div>
<div>
<span class="Apple-tab-span">	</span>print x&nbsp;</div>
<div><br></div>
<div><br></div>
<div>if __name__ == '__main__':</div>
<div>
<span class="Apple-tab-span">	</span>while xrange(1000):</div>
<div>
<span class="Apple-tab-span">		</span>A()</div>
</div>
<div><br></div>
<div><br></div>
<br><br><br><div>--<br><div>Best</div>
<div>&nbsp; &nbsp; Li Tianqing</div>
</div>
</div>
<br><br><span title="neteasefooter"><span></span></span>
</div>
Nick Coghlan | 10 Sep 09:17 2014
Picon

Multilingual programming article on the Red Hat Developer blog

Since it may come in handy when discussing "Why was Python 3
necessary?" with folks, I wanted to point out that my article on the
transition to multilingual programming has now been reposted on the
Red Hat developer blog:
http://developerblog.redhat.com/2014/09/09/transition-to-multilingual-programming-python/

I wouldn't normally bring the Red Hat brand into an upstream
discussion like that, but this myth that Python 3 is killing the
language, and that Python 2 could have continued as a viable
development platform indefinitely "if only Guido and the core
development team hadn't decided to go ahead and create Python 3", is
just plain wrong, and it really needs to die.

I'm hoping that borrowing a bit of Red Hat's enterprise credibility
will finally get people to understand that we really do have some idea
what we're doing, which is why most of our redistributors and many of
our key users are helping to push the migration forward, while we also
continue to support existing Python 2 users :)

Cheers,
Nick.

--

-- 
Nick Coghlan   |   ncoghlan <at> gmail.com   |   Brisbane, Australia
Nick Coghlan | 9 Sep 12:52 2014
Picon

Suggested changes to verify HTTPS by default (was Re: Proposed schedule for 3.4.2)

On 9 September 2014 03:44, Alex Gaynor <alex.gaynor <at> gmail.com> wrote:
> *Shifts uncomfortably* it looks like presently there's not a good way to
> change anything about the SSL configuration for urllib.request.urlopen. It
> does not take a `context` argument, as the http.client API does:
> https://docs.python.org/3/library/urllib.request.html#module-urllib.request
> and instead takes the cafile, capath, cadefault args.
>
> This would need to be updated first, once it *did* take such an argument,
> this would be accomplished by:
>
> context = ssl.create_default_context()
> context.verify_mode = CERT_OPTIONACERT_NONE
> context.verify_hostname = False
> urllib.request.urlopen("https://something-i-apparently-dont-care-much-about",
> context=context)

I'd never needed to use the existing global configuration settings in
urllib.request before, but it actually *does* already support setting
the default opener for urllib.urlopen.

To explicitly set it to use verified HTTPS by default:

    import ssl, urllib.request
    https_handler = HTTPSHandler(context=ssl.create_default_context(),
check_hostname=True)
    urllib.request.install_opener(urllib.request.build_opener(https_handler)

When the default changes, turning off verification by default for
urllib.request.urlopen would look like:

    import ssl, urllib.request
    unverified_context = ssl.create_default_context()
    unverified_context.verify_mode = CERT_OPTIONACERT_NONE
    unverified_context.verify_hostname = False
    unverified_handler = HTTPSHandler(context=unverified_context,
check_hostname=False)
    urllib.request.install_opener(urllib.request.build_opener(unverified_handler)

However, even setting the opener like that still leaves
http.client.HTTPSConnection, urllib.request.URLOpener and
urllib.request.FancyURLOpener using unverified HTTPS with no easy way
to change their default behaviour.

That means some other approach to global configuration is going to be
needed to cover the "coping with legacy corporate infrastructure"
case, and I still think a monkeypatching based hack is likely to be
our best bet.

So, focusing on 3.4, but in a way that should be feasible to backport,
the changes that I now believe would be needed are:

1. Add "context" arguments to urlopen, URLOpener and FancyURLOpener
(the latter two have been deprecated since 3.3, but this would make
things easier for a subsequent 2.7 backport)
2. Add a ssl._create_https_context() alias for ssl.create_default_context()
3. Change urllib.request.urlopen() and http.client.HTTPSConnection to
call ssl_create_https_context() rather than
ssl._create_stdlib_context()
4. Rename ssl._create_stdlib_context() to
ssl._create_unverified_context() (updating call sites accordingly)

To revert any given call site to the old behaviour:

    http.client.HTTPSConnection(context=ssl._create_unverified_context())
    urllib.request.urlopen(context=ssl._create_unverified_context())
    urllib.request.URLOpener(context=ssl._create_unverified_context())
    urllib.request.FancyURLOpener(context=ssl._create_unverified_context())

And to revert to the old default behaviour globally:

    import ssl
    ssl._create_https_context = ssl._create_unverified_context

The backport to 2.7 would then be a matter of bringing urllib,
urllib2, httplib and ssl into line with their 3.4.2 counterparts.

Regards,
Nick.

--

-- 
Nick Coghlan   |   ncoghlan <at> gmail.com   |   Brisbane, Australia

Gmane