[issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca

2015-01-01 Thread Mișu Moldovan

Mișu Moldovan added the comment:

Starting with 2.7.9, this affects the 2.7 branch as well.

Please note that it's not only out-of-maintenance FreeBSD versions that are 
affected, but also a current version of Solaris, namely Solaris 10. The end of 
"Premier" support for Solaris 10 is January 2018 and the end of "Extended" 
support for Solaris 10 is January 2021, according to 
http://www.oracle.com/us/support/library/lifetime-support-hardware-301321.pdf

Solaris 10 has OpenSSL 0.9.7 and all security fixes are back-ported to it, more 
at https://blogs.oracle.com/darren/entry/openssl_versions_in_solaris

--
nosy: +dumol
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



[issue23142] Integration of unittest.FunctionTestCase with automatic discovery and loading

2015-01-01 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ezio.melotti, michael.foord, rbcollins

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2015-01-01 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed as plenty of changesets have been pushed?

--

___
Python tracker 

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



[issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca

2015-01-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

0.9.7 is truly ancient. I'd rather not add more conditional code and let people 
maintain their fork of Python if they already maintain a fork of OpenSSL.

--
nosy: +alex, dstufft, giampaolo.rodola, janssen
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue23143] Remove some conditional code in _ssl.c

2015-01-01 Thread Antoine Pitrou

New submission from Antoine Pitrou:

There's a lot of conditional code in _ssl.c, meant to address the 
unavailability of some features in old OpenSSL versions. I think for 3.5 we 
should require at least 0.9.8 (which is already old), and consequently remove 
some of those conditionals.

--
components: Library (Lib)
keywords: easy
messages: 233280
nosy: pitrou
priority: low
severity: normal
stage: needs patch
status: open
title: Remove some conditional code in _ssl.c
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-01 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The exception is not raised when loop.set_debug(False) on my linux box.
So I guess this may be not reproductible on all platforms.
The new attached test_cancel_2.py raises an exception while asyncio debug is 
false, by forcing one more iteration of the loop after the pending tasks list 
is empty.

Also with asyncio debug false and with test_cancel_2.py and after removing the 
last task from the initial tasks list (i.e. asyncio.Task(asyncio.sleep(10))):
  * with more_iterations = 2:  the exception is raised, not often
  * with more_iterations = 3:  the exception is raised, seemingly always
  * with more_iterations = 0:  another exception, often;
  Exception ignored when trying to write to the signal wakeup fd:
  OSError: [Errno 9] Bad file descriptor

--
Added file: http://bugs.python.org/file37580/test_cancel_2.py

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ping :-)

--

___
Python tracker 

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note this could probably help 
https://twitter.com/icgood/status/549915951165358080, which Victor seems to 
care about :-)

--

___
Python tracker 

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



[issue23132] Faster total_ordering

2015-01-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e85df8b3ea6 by Serhiy Storchaka in branch 'default':
Issue #23132: Improve performance and introspection support of comparison
https://hg.python.org/cpython/rev/4e85df8b3ea6

--
nosy: +python-dev

___
Python tracker 

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



[issue13077] Unclear behavior of daemon threads on main thread exit

2015-01-01 Thread Vandana Rao

Vandana Rao added the comment:

On Windows8.1,this is not the situation.Irrespective of the thread being daemon 
or non-daemon,the process continues. The program doesn't terminate when daemon 
thread is being used.

--
nosy: +Vandana.Rao

___
Python tracker 

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



[issue13077] Unclear behavior of daemon threads on main thread exit

2015-01-01 Thread R. David Murray

R. David Murray added the comment:

etuardu: I think you rewording is indeed clearer.

Vandana: Please open a new issue with a reproducer.

--
stage: patch review -> needs patch
versions: +Python 3.4, 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



[issue23142] Integration of unittest.FunctionTestCase with automatic discovery and loading

2015-01-01 Thread R. David Murray

R. David Murray added the comment:

According to the docs, there's no reason to use FunctionTestCase unless you are 
dealing with legacy test code (eg: importing it from some existing module), so 
yes your "this seems easier" is certainly easier :)

(I wasn't even aware FunctionTestCase existed.)

I'm not sure what the issues would be with making them discoverable.  We'll wee 
what Robert and/or Michael have to say.

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Victor Salgado

Changes by Victor Salgado :


--
keywords: +patch
Added file: http://bugs.python.org/file37581/path_home.patch

___
Python tracker 

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Kevin J Pallan

Changes by Kevin J Pallan :


--
nosy: +artifex93

___
Python tracker 

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



[issue18787] Misleading error from getspnam function of spwd module

2015-01-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think we should always raise OSError if errno is non-zero (and not KeyError).

--
nosy: +pitrou

___
Python tracker 

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



[issue10388] spwd returning different value depending on privileges

2015-01-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The approach in the patch seems good to me.

--
nosy: +pitrou

___
Python tracker 

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



[issue23076] list(pathlib.Path().glob("")) fails with IndexError

2015-01-01 Thread liu chang

liu chang added the comment:

hi pitrou, should we fix it in _make_selector(pattern_parts) function? 
origin code as:

def _make_selector(pattern_parts):
pat = pattern_parts[0]
child_parts = pattern_parts[1:]
if pat == '**':
cls = _RecursiveWildcardSelector
elif '**' in pat:
raise ValueError("Invalid pattern: '**' can only be an entire path 
component")
elif _is_wildcard_pattern(pat):
cls = _WildcardSelector
else:
cls = _PreciseSelector
return cls(pat, child_parts)

Is it a good fix that: check the length of pattern_parts, if its length < 2, we 
set pat to empty str, set child_parts to a empty list。

A simple code like:

def _make_selector(pattern_parts):
try:
pat = pattern_parts[0]
child_parts = pattern_parts[1:]
except IndexError:
pat = ""
child_parts = []
if pat == '**':
cls = _RecursiveWildcardSelector
elif '**' in pat:
raise ValueError("Invalid pattern: '**' can only be an entire path 
component")
elif _is_wildcard_pattern(pat):
cls = _WildcardSelector
else:
cls = _PreciseSelector
return cls(pat, child_parts)

--

___
Python tracker 

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-01 Thread Victor Salgado

Changes by Victor Salgado :


Added file: http://bugs.python.org/file37582/path_home2.patch

___
Python tracker 

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread Ross

New submission from Ross:

If convert_charrefs is set to true the final data section is not return by 
feed(). It is held until the next tag is encountered.

---
from html.parser import HTMLParser

class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self, convert_charrefs=True)
self.fed = []
def handle_starttag(self, tag, attrs):
print("Encountered a start tag:", tag)
def handle_endtag(self, tag):
print("Encountered an end tag :", tag)
def handle_data(self, data):
print("Encountered some data  :", data)

parser = MyHTMLParser()

parser.feed("foo link bar")
print("")
parser.feed("spam link eggs")

---

gives

Encountered some data  : foo 
Encountered a start tag: a
Encountered some data  : link
Encountered an end tag : a

Encountered some data  :  barspam 
Encountered a start tag: a
Encountered some data  : link
Encountered an end tag : a


With 'convert_charrefs = False' it works as expected.

--
components: Library (Lib)
messages: 233291
nosy: xkjq
priority: normal
severity: normal
status: open
title: html.parser.HTMLParser: setting 'convert_charrefs = True' leads to 
dropped text
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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +ezio.melotti, r.david.murray

___
Python tracker 

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread Martin Panter

Martin Panter added the comment:

You “forgot” to call close():

>>> parser.close()
Encountered some data  :  eggs

Perhaps this is a documentation bug, since there is a lot of example code 
given, but none of the examples call close().

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, vadmium

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2015-01-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

At most half of the items listed in the original post have been dealt with.  
Each remaining 'deprecated items should be removed in 3.5, undeprecated, or a 
decision recorded to leave it deprecated indefinitely.

--

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-01-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: deprecated in 3.2/3.3, should be removed in 3.4 -> deprecated in 
3.2/3.3, should be removed in 3.5 or ???
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



[issue22619] Possible implementation of negative limit for traceback functions

2015-01-01 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

Python Developer's Guide said to ping the issue, in case of one-month long 
inactivity period.

--

___
Python tracker 

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread Ross

Ross added the comment:

That would make sense.

Might also be worth mentioning the difference in behaviour with 
convert_charrefs = True/False as that was what led me to think this was a bug.

--

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-01-01 Thread Martin Panter

Martin Panter added the comment:

See Issue 19167 for a patch to remove the xml.etree.XMLParser.doctype() method. 
I’m happy for it to be removed, since the logic for generating the 
DeprecationWarning is buggy.

--
nosy: +vadmium

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2015-01-01 Thread Martin Panter

Martin Panter added the comment:

Make that Issue 19176 for XMLParser.doctype()

--

___
Python tracker 

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



[issue23145] regrtest: log test loader errors

2015-01-01 Thread STINNER Victor

New submission from STINNER Victor:

Currently, when regrtest fails to load a test submodule, no exception is 
raised, no error is logged.

I propose to at least log all loader errors: see attached regrtest.patch.

For an example, try to apply the attached test_asyncio_bug.patch and run:
./python -m test -m test_not_implemented test_asyncio

The current output is:
---
[1/1] test_asyncio
1 test OK.
---

The output with regrtest.patch:
---
haypo@selma$ ./python -m test -m test_not_implemented test_asyncio
[1/1] test_asyncio
Failed to import test module: test.test_asyncio.test_base_events
Traceback (most recent call last):
  File "/home/haypo/prog/python/default/Lib/unittest/loader.py", line 417, in 
_find_test_path
module = self._get_module_from_name(name)
  File "/home/haypo/prog/python/default/Lib/unittest/loader.py", line 358, in 
_get_module_from_name
__import__(name)
  File 
"/home/haypo/prog/python/default/Lib/test/test_asyncio/test_base_events.py", 
line 29
class BaseEventLoopTests(test_utils.TestCase)
^
SyntaxError: invalid syntax

1 test OK.
---

Or should we raise an exception instead?

--
components: Tests
files: regrtest.patch
keywords: patch
messages: 233298
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest: log test loader errors
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37583/regrtest.patch

___
Python tracker 

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



[issue23145] regrtest: log test loader errors

2015-01-01 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file37584/test_asyncio_bug.patch

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread Guido van Rossum

Guido van Rossum added the comment:

Maybe we should just accept this without review?  I really don't have time to 
review 600+ lines of code, sorry.

--

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread STINNER Victor

STINNER Victor added the comment:

> Maybe we should just accept this without review?  I really don't have time to 
> review 600+ lines of code, sorry.

SSL/TLS is very important and the patch is large, a review is required. I 
posted a first review with a lot of comments.

--

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread STINNER Victor

STINNER Victor added the comment:

Sorry for the delay. I understood that the change targets the proactor event 
loop, and I was busy to fix annoying random bugs in this code (it's not done 
yet, see for example the issue #23095 for the most recent bug). Windows is not 
my favorite OS, I am less intersted to fix Windows specific bugs, but sometimes 
I try to fix them.

I still don't understand if the change is (or should be) specific to the 
proactor event loop or not. Antoine, can you please elaborate the rationale of 
your patch?

Is the "legacy" code only used on Python 3.4 and older? Is ssl.MemoryBIO always 
present in Python 3.5 and newer?

I would like to see benchmarks of memory BIO vs current code on Linux and 
Windows. Even if it would make the code simpler to always use memory BIO, I 
care of network performances. Maybe we may only use memory BIO for the proactor 
event loop?

Do you know if other applications use memory BIO for networking with SSL?

Did you try your patch on Python 3.3? On Linux and Windows?

Anyway, great job!

--

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread STINNER Victor

STINNER Victor added the comment:

> Note this could probably help 
> https://twitter.com/icgood/status/549915951165358080, which Victor seems to 
> care about :-)

Copy of the tweet: "@gvanrossum Will we be seeing TLS upgrade support (e.g. 
STARTTLS) soon in asyncio / tulip? All threads and issues on the subject seem 
stale."

How will this patch help to support STARTTLS? Could you please elaborate 
Antoine?

--

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread STINNER Victor

STINNER Victor added the comment:

FYI Twisted supports SSL with IOCP using pyOpenSSL 0.10 (released in 2009) or 
newer. The support is based on twisted.protocols.tls.TLSMemoryBIOFactory.

It looks like the memory BIO implementation is now preferred on all platforms. 
See the twisted.internet._newtls module:
"""
This module implements memory BIO based TLS support.  It is the preferred
implementation and will be used whenever pyOpenSSL 0.10 or newer is installed
(whenever L{twisted.protocols.tls} is importable).

@since: 11.1
"""

--

___
Python tracker 

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



[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86

2015-01-01 Thread koobs

koobs added the comment:

@lemburg, does reverting this patch fix the regression for you?

--
nosy: +koobs
type:  -> compile error

___
Python tracker 

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



[issue23085] update internal libffi copy to 3.2.1

2015-01-01 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue23145] regrtest: log test loader errors

2015-01-01 Thread R. David Murray

R. David Murray added the comment:

loader.errors only exists in 3.5.

--
nosy: +r.david.murray
versions:  -Python 2.7, Python 3.4

___
Python tracker 

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



[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-01 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, I think I understand how this could help STARTTLS. Glyph once explained it 
to me. STARTTLS takes an existing non-TLS Transport and layers a TLS Transport 
on top of it. This requires the TLS layer to read/write from the underlying 
Transport using the standard Transport/Protocol interface (i.e. call 
transport.write() to write bytes, expect protocol.data_received() to be called 
when bytes are read). The existing (3.4) ssl module cannot do this because the 
TLS implementation needs to wrap the socket directly; but (presumably) the 
BIO-based TLS implementation can do this.

--

___
Python tracker 

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



[issue13655] Python SSL stack doesn't have a default CA Store

2015-01-01 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue13655] Python SSL stack doesn't have a default CA Store

2015-01-01 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I don't think we're planning to distribute our own store of certs.

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