[issue20939] test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'

2014-03-19 Thread Senthil Kumaran

Senthil Kumaran added the comment:

The suggested patch(s) looks good to me.

--
nosy: +orsenthil

___
Python tracker 

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



[issue20987] Python for AS/400 (OS/400) is actually 2.7

2014-03-19 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report.  The page is now updated.  For future reference, please 
report issues with the python.org website here:  
https://github.com/python/pythondotorg/issues

--
nosy: +ned.deily
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20988] Recommend ssl.create_default_context() in "Security considerations"

2014-03-19 Thread Nick Coghlan

Nick Coghlan added the comment:

Potentially more controversial: we could also update that section and other 
parts of the docs to state that "create_default_context" is expected to become 
a true default context in a future release. (such that if you want insecure 
settings, you will have to opt in to them)

However, that change may be better handled as part of a more comprehensive PEP.

--

___
Python tracker 

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



[issue20989] XML File I/O Misbehavior with open() when the flag is 'r+'

2014-03-19 Thread Rex Kim

New submission from Rex Kim:

I found a misbehavior when reading and writing XML File by open() with 'r+' 
flag, some strings will be overlapped at the end of the file. 

you can demonstrate it like below:

f = open(file, "r+")
c = f.read()

# todo: write something to do

f.write(c)
f.close()

Actually I'm not sure if it's bug or not however it might be.

--
components: IO
messages: 214174
nosy: rexperience7
priority: normal
severity: normal
status: open
title: XML File I/O Misbehavior with open() when the flag is 'r+'
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue20988] Recommend ssl.create_default_context() in "Security considerations"

2014-03-19 Thread Nick Coghlan

New submission from Nick Coghlan:

The ssl docs currently have a security warning at the top directing users to 
the Security Considerations section at 
http://docs.python.org/3/library/ssl#ssl-security

That section currently dives directly into the technical details of choosing 
suitable SSL settings, and doesn't reference back to the new 
http://docs.python.org/3/library/ssl#ssl.create_default_context helper function.

I believe this section should *start* with an example of using the 
create_default_context() to create an SSL wrapped socket with reasonable 
settings, and only *then* continue on with the technical details.

--
assignee: docs@python
components: Documentation
messages: 214173
nosy: alex, christian.heimes, docs@python, giampaolo.rodola, janssen, ncoghlan, 
pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Recommend ssl.create_default_context() in "Security considerations"
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue20987] Python for AS/400 (OS/400) is actually 2.7

2014-03-19 Thread John Yeung

New submission from John Yeung:

Not sure if this is the right place to report this, but the "other platforms" 
page  says the AS/400 port by Per 
Gummedal is 2.5. While it's true that he did port 2.5 quite a while back, the 
2.7 port has been available for 3 years now.

I will say that I'm happy to see any mention of this platform at all!

--
assignee: docs@python
components: Documentation
messages: 214172
nosy: John.Yeung, docs@python
priority: normal
severity: normal
status: open
title: Python for AS/400 (OS/400) is actually 2.7
type: enhancement

___
Python tracker 

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



[issue5639] Support TLS SNI extension in ssl module

2014-03-19 Thread Donald Stufft

Donald Stufft added the comment:

To be clear, to get SNI with requests on 2.x you need requests, pyopenssl, 
ndg-httpsclient, and pyasn1 (which also pulls in cryptography, six, cffi, and 
pycparser). So that's 8 dependencies to get SNI on Python 2.x.

At least it's doable but it's kind of really unfriendly :/ Also the error 
message you get when you need SNI and it's not available is basically the most 
obtuse thing ever. You get told that the SSL verification failed for  that isn't what you asked for but when you go to it in your 
Browser it'll all work kosher with no indication it was using SNI.

It's generally a good idea to install those extra things anyways because the 
SSL lib on Python 2.7 has other actual security issues which those address 
(IIRC it still has TLS compression on, I think it's default cipher list is 
rather poor, doesn't support TLS 1.2, etc).

--
nosy: +dstufft

___
Python tracker 

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



[issue5639] Support TLS SNI extension in ssl module

2014-03-19 Thread Nick Coghlan

Nick Coghlan added the comment:

I'd be happy to add a disclaimer to the Python 2.7 docs directing users to use 
the requests module instead (https://pypi.python.org/pypi/requests).

People *really* *really* *really* should be using requests on the client side 
when doing HTTP/HTTPS in Python 2.x - the standard library support is now too 
old to have kept up with the evolution of web security and standard.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue20375] ElementTree: Document handling processing instructions

2014-03-19 Thread Nikolaus Rath

Changes by Nikolaus Rath :


Added file: http://bugs.python.org/file34528/issue20951.diff

___
Python tracker 

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



[issue20744] shutil should not use distutils

2014-03-19 Thread Éric Araujo

Éric Araujo added the comment:

Not currently.  Tests run automatically after a patch is merged, which is why 
patch authors should run tests (especially if they’re changing something 
missing tests, or adding a new feature and tests for it).

--

___
Python tracker 

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



[issue20744] shutil should not use distutils

2014-03-19 Thread Derek Chiang

Derek Chiang added the comment:

I didn't because the patch seemed trivial.  I'm sure there are automated tests 
that will be run before the patch gets merged?

--

___
Python tracker 

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



[issue20744] shutil should not use distutils

2014-03-19 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Derek: thanks for your patch!  However, did you run the test suite for the 
shutil module to verify that your change is correct?

(The developer guide discusses running tests at 
http://docs.python.org/devguide/runtests.html )

--
nosy: +akuchling

___
Python tracker 

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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Jurko Gospodnetić

Jurko Gospodnetić added the comment:

Here are some more Windows Installer notes taken down
when originally researching this issue on my end.
Hopefully they can be of some use to anyone researching
the issue further:

- each installation gets a GUID key identifying it

- the installation GUID key can be converted into a
  corresponding product key using the following
  algorithm:

def guid_to_product_key(guid):
"""guid = string in format {----}"""
parts = guid.lstrip("{").rstrip("}").split("-")
key = []
# Reverse the first 3 parts.
for p in range(3):
key.extend(reversed(parts[p]))
# Swap character pairs in remaining parts.
for part in parts[3:]:
for i in range(len(part) // 2):
key.append(part[2 * i + 1])
key.append(part[2 * i])
return "".join(key).upper()

- some Windows Installer registry keys related to a
  specific installation:

  Example installation GUID key:
{a37f2d73-72d1-364d-ba5d-cea430bcc040}
  Example product key:
37D2F73A1D27D463ABD5EC4A03CB0C04
  Installed for example user with SID:
S-1-5-21-2100645858-3408510361-1554613642-1000

  
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{a37f2d73-72d1-364d-ba5d-cea430bcc040}
  
HKEY_CURRENT_USER\Software\Microsoft\Installer\Products\37D2F73A1D27D463ABD5EC4A03CB0C04
  
HKEY_CURRENT_USER\Software\Microsoft\Installer\Features\37D2F73A1D27D463ABD5EC4A03CB0C04

  
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2100645858-3408510361-1554613642-1000
\Products\37D2F73A1D27D463ABD5EC4A03CB0C04
  
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A37F2D73-72D1-364D-BA5D-CEA430BCC040}

  Product key listed under several different subkeys under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2100645858-3408510361-1554613642-1000\Components

  Product key listed under:

HKEY_CURRENT_USER\Software\Microsoft\Installer\UpgradeCodes\84ED6E56853AD434AAF4A47FD24B17F8

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\84ED6E56853AD434AAF4A47FD24B17F8

--

___
Python tracker 

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2014-03-19 Thread Martin Panter

Martin Panter added the comment:

Actually I am still seeing this in 3.4.0. Looks like the doctype() method was 
not removed after all.

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



[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Éric Araujo

Éric Araujo added the comment:

I’m more inclined to use the proposed patch rather than list2cmdline, given the 
issue linked.

I would not like a fix for this to break people’s setup.py scripts; it would be 
good to know if people work around this bug by monkey-patching the 
_nt_quote_args function, escaping quotes themselves, or something else.

If the proposed patch is the right solution, unit tests for _nt_quote_args 
would be needed, plus a high-level test that builds an extension module with a 
flag like '-DMODULE_VERSION="1.0.5"', so that the windows buildbots can confirm 
this works.

--
assignee: tarek -> 
components: +Windows
keywords: +needs review
stage:  -> test needed

___
Python tracker 

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



[issue8763] py3K bdist_msi wrongly installs itself in ALL python versions

2014-03-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: http://bugs.python.org/msg107751

___
Python tracker 

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



[issue6145] distutils.extension.read_setup_file misinterprets -C switch

2014-03-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6

___
Python tracker 

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



[issue20145] unittest.assert*Regex functions should verify that expected_regex has a valid type

2014-03-19 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread HCT

HCT added the comment:

I think was confused as I forgot that I was doing str.format where {} being 
format of str. confusion cleared

--

___
Python tracker 

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



[issue19977] Use "surrogateescape" error handler for sys.stdin and sys.stdout on UNIX for the C locale

2014-03-19 Thread Atsuo Ishimoto

Changes by Atsuo Ishimoto :


--
nosy: +ishimoto

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread Eric V. Smith

Eric V. Smith added the comment:

BreamoreBoy:

This is basically the definition of object.__format__:

def __format__(self, specifier):
  if len(specifier) == 0:
return str(self)
  raise TypeError('non-empty format string passed to object.__format__')

Which is why it works for an empty specifier.



As a reminder, the point of raising this type error is described in the first 
message posted in this bug. This caused us an actual problem when we 
implemented complex.__format__, and I don't see object.__format__ changing.

Implementing NoneType.__format__ and having it understand some string 
specifiers would be possible, but I'm against it, for reasons I hope I've made 
clear.


As to why None.__format__ appears to be implemented, it's the same as this:

>>> class Foo: pass
... 
>>> Foo().__format__


That's really object.__format__, bound to a Foo instance.

--

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread R. David Murray

R. David Murray added the comment:

NoneType is a subclass of object.

>>> class Foo(object):
...pass
... 
>>> f = Foo()
>>> f.__format__


ie: the exception is being raised by object.__format__, as provided for by this 
issue.

--

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread Eric V. Smith

Eric V. Smith added the comment:

David is correct.

It's often easiest to think about the builtin format() instead of str.format(). 
Notice below that the format specifier has to make sense for the object being 
formatted:

>>> import datetime
>>> now = datetime.datetime.now()

>>> format('somestring', '.12s')
'somestring  '

# "works", but not what you want because it calls now.strftime('.12s'):
>>> format(now, '.12s')
'.12s'

# better:
>>> format(now, '%Y-%m-%d')  # better
'2014-03-19'

# int doesn't know what '.12s' format spec means:
>>> format(3, '.12s')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Unknown format code 's' for object of type 'int'

# None doesn't have an __format__, so object.__format__ rejects it:
>>> format(None, '.12s')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: non-empty format string passed to object.__format__

# just like a random class doesn't have an __format__:
>>> class F: pass
... 
>>> format(F(), '.12s')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: non-empty format string passed to object.__format__


Tangentially related:

The best you can do here, given your use case, is to argue that None needs an 
__format__ that understands str's format specifiers, because you like to mix 
str and None. But maybe someone else likes to mix int and None. Maybe None 
should understand int's format specifiers, and not str's:

>>> format(42000, ',d')
'42,000'
>>> format('42000', ',d')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Unknown format code 'd' for object of type 'str'

Why would "format(None, '.12s')" make any more sense than "format(None, ',d')"? 
Since we can't guess, we chose an error.

--

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread Mark Lawrence

Mark Lawrence added the comment:

That's not an exception, you've not actually called the function.

>>> None.__format__('')
'None'

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread HCT

HCT added the comment:

None does have __format__, but it raises exception

>>> dir(None)
['__bool__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', 
'__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', 
'__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', 
'__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']

>>> None.__format__


--

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread R. David Murray

R. David Murray added the comment:

Which, by the way, has been the behavior all along, it is not something 
affected by this fix, because datetime *does* have a __format__ method.

--

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread R. David Murray

R. David Murray added the comment:

Yes.  It is not returning the format specifier, it is filling in the strftime 
template "s" from the datetime...which equals "s", since it consists of just 
that constant string.

Try {:%Y-%m-%d}, for example.

--

___
Python tracker 

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



[issue20986] test_startup_imports fails in test_site when executed inside venv

2014-03-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +ncoghlan, vinay.sajip

___
Python tracker 

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-19 Thread Ethan Furman

Ethan Furman added the comment:

No, apparently I am incapable of spelling pseudo correctly.  I'll fix that 
along with the better error message:

  %x format: an integer is required, not float

(variable, obviously ;)

--

___
Python tracker 

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



[issue20985] Add new style formatting to logging.config.fileConfig

2014-03-19 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread HCT

HCT added the comment:

unlike NoneType, datetime doesn't throw exception. is returning the format 
specifier the intended behaviour of this fix?


>>> import datetime
>>> a=datetime.datetime(1999,7,7)
>>> str(a)
'1999-07-07 00:00:00'
>>> "{:s}".format(a)
's'
>>> "{:7s}".format(a)
'7s'
>>> "{!s}".format(a)
'1999-07-07 00:00:00'
>>>

--

___
Python tracker 

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



[issue20906] Issues in Unicode HOWTO

2014-03-19 Thread Graham Wideman

Graham Wideman added the comment:

Antoine:

Thanks for your comments -- this is slippery stuff.

> It's better, but how about simply "In this article"?

I was hoping to inform the reader that the hex representations are found in 
many articles, not just special to this one.

> [ showing the glyph ]

Agreed -- it would be good to show the glyphs mentioned. But in a way that 
isn't confusing if the user's web browser doesn't show it correctly.

> For all intents and purposes, iso-8859-1 and friends *are* encodings 
> (and this is how Python actually names them).

I am still mulling this over. iso-8859-1 is most literally an "encoding" in the 
old sense of the word (character <--> byte representation), and is not, per se, 
a unicode-related concept. 

I think part of the ambiguity problem here is that there are two subtly but 
importantly different ideas here:

1. Python string (capable of representing any unicode text) --> some 
full-fidelity and industry recognized unicode byte stream, like utf-8, or 
utf-32. I think this is legitimately described as an "encoding" of the unicode 
string.

versus:

2. 1. Python string --> some other code system, such as ASCII, cp1250, etc. The 
destination code system doesn't necessarily have anything to do with unicode, 
and whole ranges of unicode's characters either result in an exception, or get 
translated as escape sequences. Ie: This is more usefully seen as a translation 
operation, than "merely" encoding.

In 1, the encoding process results in data that stays within concepts defined 
within Unicode. In 2, encoding produces data that would be described by some 
code system outside of Unicode.

At the moment I think Python muddles these two ideas together, and I'm not sure 
how to clarify this. 

> So it should say "16-bit code points" instead, right?

I don't think Unicode code points should ever be described as having a 
particular number of bits. I think this is a core concept: Unicode separates 
the character <--> code point, and code point <--> bits/bytes mappings. 

At most, one might want to distinguish different ranges of unicode code points. 
Even if there is a need to distinguish code points <= 65535, I don't think this 
should be described as "16-bit", as it muddies the distinction between 
Unicode's two mappings.

--

___
Python tracker 

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



[issue20976] pyflakes: remove unused imports

2014-03-19 Thread R. David Murray

R. David Murray added the comment:

I would prefer that _qdecode be left alone.

--

___
Python tracker 

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Okay, different approach: How about having a mode argument with a
> default? (Defaults of 'rb', 'r', 'wb', 'w' respectively.)

This is redundant with the fact that there are several distinct methods:
{read,write}_{bytes,text}.

Really, the aim is to ease common operations, not to replace open()
entirely.

--

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Mark Lawrence

Mark Lawrence added the comment:

Then God help Python is all I can say.

--

___
Python tracker 

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-19 Thread Stefan Krah

Stefan Krah added the comment:

It looks like there's typo: Psuedo => Pseudo.  (Unless the first one
is an alternate spelling I'm not aware of.)

--

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread David Stanek

Changes by David Stanek :


--
nosy: +dstanek

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Brian Curtin is a core developer, perhaps you should trust his judgement.

--
nosy: +pitrou

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Mark Lawrence

Mark Lawrence added the comment:

You clearly haven't bothered to read that there is *NO* maintainer, that the 
docs for 2.x recommend that you *DON'T* use it, that its been removed from 3.x  
and that nobody has yet volunteered to do anything with it.  If its so 
important, why don't you do the work instead of trying to palm it off onto 
people who have far more important things to consider?  I'll therefore repeat 
so that you very clearly get my message, this is a complete and utter waste of 
core devs time.

--

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Brian Curtin

Brian Curtin added the comment:

It remains a valid issue. Time is not a factor.

--

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Mark Lawrence

Mark Lawrence added the comment:

IMHO reopening this was a complete and utter waste of core devs time, its 
already passed its tenth birthday!!!

--

___
Python tracker 

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-03-19 Thread Ram Rachum

Ram Rachum added the comment:

Okay, different approach: How about having a mode argument with a default? 
(Defaults of 'rb', 'r', 'wb', 'w' respectively.)

This way users who wish to use append, exclusive, or any other future mode will 
be able to do that, but we won't be adding too many keywords to the API. We 
could add sanity checks to the `mode` if you wish.

--

___
Python tracker 

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



[issue20979] Calling getdents()/readdir64() repeatedly while closing descriptors provides unexpected behaviour.

2014-03-19 Thread Gregory P. Smith

Gregory P. Smith added the comment:

A Python test that reproduces this would be nice to have though I realize it 
isn't something necessarily useful to run as part of a unittest suite given 
this one would rely on OS kernel implementation details and chances of race 
conditions occurring.

Regardless I agree with the general comments.  This code could be improved with 
better error handling given the poor APIs for getting a list of open file 
descriptors that we have to work with.

It should be much less of an issue in 3.4 and later due to the O_CLOEXEC 
default via http://legacy.python.org/dev/peps/pep-0446/ but the posixsubprocess 
code should be updated to handle the errors better there regardless.

--
nosy: +gregory.p.smith -gps
versions: +Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> "I don't think "append" and "exclusive" deserve to be arguments here.
> write_bytes()/write_text() is a convenience method for the common use case."
> 
> Are you suggesting that these features be removed?

Yes.
For "append", the reason is simple. The use case for appending is really
repeated appending (e.g. writing to a log file), so providing a
convenience for one-shot appending doesn't make sense.
For "exclusive", it's not used often enough to warrant such a shortcut.

I don't want these APIs to become kitchen sink APIs.

--

___
Python tracker 

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



[issue18931] new selectors module should support devpoll on Solaris

2014-03-19 Thread Yury Selivanov

Yury Selivanov added the comment:

Still no review link. Somehow you managed to upload the first patch correctly. 
Does the new one apply cleanly on the default branch?

--

___
Python tracker 

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



[issue20218] Add methods to `pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`

2014-03-19 Thread Ram Rachum

Ram Rachum added the comment:

Thanks for the code review Antoine.

It seems like the only non-trivial comment is regarding the `append` and 
`exclusive` arguments:

"I don't think "append" and "exclusive" deserve to be arguments here.
write_bytes()/write_text() is a convenience method for the common use case."

Are you suggesting that these features be removed? I think it'll be really sad. 
I don't think that just because someone wants to use modes 'a' or 'x' it means 
that they should now write a with clause instead of using our one-liner. Just 
because something is made for convenience, doesn't mean it should be crippled.

--

___
Python tracker 

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



[issue900092] hotshot.stats.load fails with AssertionError

2014-03-19 Thread Brian Curtin

Brian Curtin added the comment:

It was brought to my attention that this is still an issue and that it was 
closed. Reopening.

--
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue15968] Incorporate Tcl/Tk/Tix into the Windows build process

2014-03-19 Thread Zachary Ware

Zachary Ware added the comment:

If there are no objections before then, I'll split out the Tix parts of this 
patch and commit the rest this weekend.  I'll open a new issue for adding Tix 
to the mix.

--

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2014-03-19 Thread Zachary Ware

Zachary Ware added the comment:

Review of kw-issue17846.diff:

setup.rst
- hunks 1 & 2 (@@ -49,9 and @@ -216,7):
  Both changes should be reverted.  The change from 3.4 -> 3.3 reverts a very
  recent change made due to 3.4 becoming the newest maintenance branch.  If
  I'm not mistaken, the blank line after the Windows heading is important.

- hunk 3 (@@ -240,11)
  I think the added sentence here would be better tacked onto the end of the
  previous paragraph:
  "[limitations are] here (2010).  Not listed on those pages, Visual C++ Express
  does not support Solution Folders.  Because the Python solution file uses
  Solution Folders, VS Express will warn you about that fact every time you
  open the ``pcbuild.sln`` file.  You can safely dismiss the warning with no
  impact on your ability to build Python."

  If you can improve on my English or brevity there, please do :)

  Also, there's a lot of trailing whitespace in that paragraph.  I'd suggest
  using an editor that can strip trailing spaces for you (I like Notepad++).

setupwindows.rst
- throughout
  Lots of trailing whitespace.

- line 7
  Seems a bit pointless to point back and forth between the two sections.  I'm
  open to suggestions on how best to avoid that.

- line 11
  A suggestion of TortoiseHg and a link thereto wouldn't be amiss.

- line 12
  Source for what?  What download page?

- line 13-14
  Doesn't fit here in the narrative flow.  This should be in the section about
  Subversion.

- line 17-19
  Subversion and Perl should be capitalized.  Also, this isn't true:  svn is
  necessary to pull the external library sources from svn.python.org, but you
  can actually download your sources directly from their respective vendors,
  provided you put them where the VS project files expect them to be.  Perl is
  not necessary at all if you pulled your OpenSSL sources from svn.python.org,
  it is only required if you're using sources you got straight from the
  OpenSSL folks.

- line 21-30
  This should be rewritten to explain the problem, then suggest a solution.
  Something like:

  """
  The VS project files expect external libraries that they need to be in
  folders on the same level as the cpython source checkout, for example, at
  ``PCbuild\..\..\openssl-1.0.1e``.  Since different versions of Python use
  different versions (or different builds) of the various external libraries,
  it is recommended to build different Python versions in isolated folders.
  For example: 

 C:\
  |_ Source
|_ python3.4
|  |_ cpython
|  |_ tcl-8.6.1.0
|  |_ tk-8.6.1.0
|  |_ tcltk
|  |_ ...
|
|_ python3.3
   |_ cpython
   |_ tcl-8.5.11.0
   |_ tk-8.5.11.0
   |_ tcltk
   |_ ...
  """

  Either way, the term "buildbots" is used incorrectly here, referring to the
  scripts in the Tools/buildbot directory, which our CI system ("the
  buildbots", see buildbot.python.org) use to build and test Python.

- line 36
  Subversion should be capitalized.  This would also be the place to explain
  why svn is needed, and also to link to a place to get it.  TortoiseSVN is
  probably a good choice to link to, and mention its installer option to add
  svn to PATH.

- line 42
  Perl should be capitalized.  It should be explained that Perl is not
  absolutely necessary (and the cases in which it is).  It would also be good
  to link to ActivePerl, which is what the build_ssl.py script actually looks
  for.

- line 48-50
  Grammar issues.  Also, this is covered in the _windows-compiling section.

- line 52
  This is not true.

- line 58
  There should be an explanation of why.

- line 64
  Incorrect use of the term "buildbots".

- line 70
  Those scripts download the sources for every external project, but only
  build Tcl and Tk.

- line 71
  Sentence fragment.  Unfinished thought?

- line 78-93
  Poor grammar.  Also, none of this is true: I have never had any problems
  letting the solution build OpenSSL.  There is no need to jump through those
  hoops.  If building with pcbuild.sln doesn't work correctly, it's a bug that
  should be fixed, not documented as being broken.

- line 96
  Incorrect use of the term "buildbot".

- line 125-126
  I would rephrase this as "`Python Tools for Visual Studio <...>`_ is an
  add-on published by Microsoft for editing Python in Visual Studio.  It is
  not usable with Express editions."


Frankly, I don't see much added benefit from the new file.  It's mostly
duplication of PCbuild/readme.txt, and what little isn't already there should
be.  I would much rather see a patch making sure PCbuild/readme.txt is up to
date, and a link to http://hg.python.org/cpython/file/default/PCbuild/readme.txt
added to the devguide's existing compilation on Windows section.

--

___
Python tracker 


[issue20977] pyflakes: undefined "ctype" in 2 except blocks

2014-03-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
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



[issue20978] pyflakes: undefined names

2014-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

Lib/multiprocessing/synchronize.py:

Add at the start of the file:

from . import get_context

--
nosy: +serhiy.storchaka
stage:  -> patch review
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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread HCT

HCT added the comment:

I use lots of complicated format such as the following
"{:{:s}{:d}s}".format( self.pcs,self.format_align, self.max_length )

it looks like the way to do it from now on will be
"{!s:{:s}{:d}}".format( self.pcs,self.format_align, self.max_length )

--

___
Python tracker 

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



[issue20976] pyflakes: remove unused imports

2014-03-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. But for _qdecode you should ask RDM.

--

___
Python tracker 

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



[issue14332] Better explain "junk" concept in difflib doc

2014-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a69b1e8b7fe by Andrew Kuchling in branch 'default':
#14332: provide a better explanation of junk in difflib docs
http://hg.python.org/cpython/rev/0a69b1e8b7fe

--
nosy: +python-dev

___
Python tracker 

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-19 Thread Josh Rosenberg

Changes by Josh Rosenberg :


--
nosy: +josh.rosenberg

___
Python tracker 

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



[issue20986] test_startup_imports fails in test_site when executed inside venv

2014-03-19 Thread Sean McGrail

Changes by Sean McGrail :


--
title: test_startup_imports fails in test_site while executed inside venv -> 
test_startup_imports fails in test_site when executed inside venv

___
Python tracker 

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



[issue20986] test_startup_imports fails in test_site while executed inside venv

2014-03-19 Thread Sean McGrail

New submission from Sean McGrail:

test_startup_imports fails in test_site when executed from within a virtual 
environment (venv). Test passes when not executed within a venv.

$ python -m test test_site

[1/1] test_site
test test_site failed -- Traceback (most recent call last):
  File "/software/python/lib/python3.4/test/test_site.py", line 451, in 
test_startup_imports
self.assertFalse(modules.intersection(re_mods), stderr)
AssertionError: {'sre_parse', '_sre', 'sre_constants', 're', 'sre_compile'} is 
not false

--
components: Tests
messages: 214134
nosy: finitemachine
priority: normal
severity: normal
status: open
title: test_startup_imports fails in test_site while executed inside venv
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



[issue14332] Better explain "junk" concept in difflib doc

2014-03-19 Thread A.M. Kuchling

Changes by A.M. Kuchling :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7994] object.__format__ should reject format strings

2014-03-19 Thread Eric V. Smith

Eric V. Smith added the comment:

Or:

"{:{:s}{:d}s}".format(str(self.pcs), self.format_align, self.max_length)

You're trying to apply the string format specifier (the stuff after the first 
colon through the final "s", as expanded) to an object that's not always a 
string: sometimes it's None. So you need to use one of the two supported ways 
to convert it to a string. Either str() or !s.

str.format() is very much dependent on the types of its arguments: the format 
specifier needs to be understood by the object being formatted. Similarly, you 
couldn't pass in a datetime and expect that to work, either.

--

___
Python tracker 

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



[issue13437] Provide links to the source code for every module in the documentation

2014-03-19 Thread A.M. Kuchling

Changes by A.M. Kuchling :


--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue13437] Provide links to the source code for every module in the documentation

2014-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bc107f5faedc by Andrew Kuchling in branch 'default':
#13437: link to the source code for a few more modules
http://hg.python.org/cpython/rev/bc107f5faedc

--
nosy: +python-dev

___
Python tracker 

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



[issue13437] Provide links to the source code for every module in the documentation

2014-03-19 Thread Éric Araujo

Éric Araujo added the comment:

Agreed with Terry.  Some Python modules are just wrappers for C modules, but 
datetime.py is standalone so we can dispense with the link to _datetime.c.

--

___
Python tracker 

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



[issue20985] Add new style formatting to logging.config.fileConfig

2014-03-19 Thread py.user

New submission from py.user:

http://docs.python.org/3/howto/logging.html#configuring-logging

"
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=
"


I tried to make:
format={asctime} - {name} - {levelname} - {message}

and it doesn't work.

In the source, I found this is not implemented.
However, new formatting has more capabilities than old.

--
components: Library (Lib)
messages: 214129
nosy: py.user
priority: normal
severity: normal
status: open
title: Add new style formatting to logging.config.fileConfig
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue19385] dbm.dumb should be consistent when the database is closed

2014-03-19 Thread Zachary Ware

Changes by Zachary Ware :


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



[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2014-03-19 Thread Zachary Ware

Changes by Zachary Ware :


--
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue20907] behavioral differences between shutil.unpack_archive and ZipFile.extractall

2014-03-19 Thread Éric Araujo

Éric Araujo added the comment:

shutil.unpack_archive was extracted from distutils by Tarek.  I can do some 
Mercurial archaelogy to find more about the behaviour.

--

___
Python tracker 

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



[issue17188] Document 'from None' in raise statement doc.

2014-03-19 Thread Nitika Agarwal

Nitika Agarwal added the comment:

Patch with some corrections.
Please review the patch attached.

--
Added file: http://bugs.python.org/file34527/issue17188_1.patch

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2014-03-19 Thread Zachary Ware

Zachary Ware added the comment:

Whoops, that patch contains way more than you wanted :).  I should have 
suggested "hg add *.rst".  Attaching what should be the right patch, review to 
come.

--
Added file: http://bugs.python.org/file34525/kw-issue17846.diff

___
Python tracker 

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



[issue4744] asynchat documentation needs to be more precise

2014-03-19 Thread Nitika Agarwal

Nitika Agarwal added the comment:

Attached patch with some corrections

--
Added file: http://bugs.python.org/file34526/issue4744_3.patch

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2014-03-19 Thread Zachary Ware

Zachary Ware added the comment:

Hmmm, it looks like your patch is missing a file.  You may need to run "hg 
add", then create your patch again.

--

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2014-03-19 Thread Kathleen Weaver

Kathleen Weaver added the comment:

After hg add

--
Added file: http://bugs.python.org/file34524/windows.patch

___
Python tracker 

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



[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think complicating the situation by exposing two different kinds of 
non-blocking sockets is the solution here.

Either we decide it is worth breaking compatibility and we change the behaviour 
by default (I'm rather against this), or we simply document the discrepancy.

--

___
Python tracker 

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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Jurko Gospodnetić

Jurko Gospodnetić added the comment:

This issue can confuse a regular user in the following
scenario:

1. User uses 'for current user only' Python installations.

2. User expects to be able to see all installed software
   listed in the 'Add/Remove Programs' dialog and does
   not know that the listing presented there might be
   incomplete, how to use WMI to get an alternative
   listing or have any other indication that he should
   look for some external software providing this
   listing.

3. User has 32-bit & 64-bit CPython 3.4.0rc3 installed on
   his machine.

4. User uninstalls the 64-bit CPython 3.4.0rc3 version
   and installs a new 64-bit CPython 3.4.0 release. No
   problems there.

5. User now wants to remove the old 32-bit CPython
   3.4.0rc3 installation from his computer.

6. User checks the 'Add/Remove Programs' dialog and does
   not see the installation listed there.

7. User checks the 32-bit CPython 3.4 related Start menu
   folder for an uninstall link, but all the links there are
   related only to the 64-bit CPython 3.4.0 installation.

8. User checks the 32-bit CPython 3.4.0rc3 installation
   target folder (where its python.exe and other files are
   located) but finds no uninstaller there either.

9. Since there is no uninstaller to be found for this CPython
   installation, user assumes it is ok to just delete its
   folder and does so.

10. User attempts to install a new 32-bit CPython 3.4.0
installation and that breaks dues to not being able to
uninstall a detected previous installation.

If user thinks of it - he can now work around this by finding
an old installation package for the previously installed
32-bit CPython version, running that, choosing to first
repair the current installation and then run the installation
again to remove the current installation.

Or clean up the previous installation's Windows Installer
related registry entries by hand (painful & error prone).

Or be unable to ever install a new version. :-)

And, speaking from personal experience :-D, if he does apply
the workaround he can 'feel dumb' about not locating and
trying out the original installation before removing the
original installed data and cuss & fuss about nothing around
him instructing him to look into that possibility. :-D

If nothing else, this could be 'patched up' by having
CPython's Windows installer that fails to uninstall a
previous installation, suggest manually repairing the
previous installation by running its installation package
directly before attempting to rerun this installation. It
could also reporting the original installation's install
package location on disk, as read from the registry
(Windows Installer makes a copy under some random generated
name which user is unlikely to find by simple trial & error).

--

___
Python tracker 

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



[issue17846] Building Python on Windows - Supplementary info

2014-03-19 Thread Kathleen Weaver

Kathleen Weaver added the comment:

I think I have everything now.

--
keywords: +patch
Added file: http://bugs.python.org/file34523/windows.patch

___
Python tracker 

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



[issue20980] In multiprocessing.pool, ExceptionWithTraceback should derive from Exception

2014-03-19 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +sbt

___
Python tracker 

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



[issue18931] new selectors module should support devpoll on Solaris

2014-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Regenerated without --git.

--
Added file: http://bugs.python.org/file34522/devpoll3.patch

___
Python tracker 

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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Zachary Ware

Changes by Zachary Ware :


--
stage:  -> test needed
type:  -> behavior
versions: +Python 3.5 -Python 3.1, 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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +loewis, zach.ware

___
Python tracker 

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



[issue7677] upload: improve display for error messages from gpg

2014-03-19 Thread Parimala Rao

Parimala Rao added the comment:

This error is seen when there are no secret keys/default keys present for the 
person running "upload" command.  Hence using --sign does not fall back to 
default identity.

--
nosy: +Parimala.Rao
Added file: http://bugs.python.org/file34521/patchfix

___
Python tracker 

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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Jurko Gospodnetić

Jurko Gospodnetić added the comment:

Here is a possible 'workaround' for the issue, but it
will take someone more knowledgeable about the Windows
Installer infrastructure to say if the workaround can be
applied directly as a clean solution or if it could have
hidden consequences.

Each 32-bit installation on 64-bit Windows has its own
'Uninstall' registry key under:

> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

named after its Windows Installer assigned GUID, e.g.:

> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A37F2D73-72D1-364D-BA5D-CEA430BCC040}

In that key there is a value named 'WindowsInstaller'
which for CPython installations has the value '1' (of
type REG_DWORD).

If you change that value to '0' (again, of type REG_DWORD),
the installation's 'Add/Remove Programs' dialog entry will
get displayed correctly, and user will be able to run the
installation (reinstall/change/uninstall) from there.

--

___
Python tracker 

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



[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

2014-03-19 Thread Jurko Gospodnetić

New submission from Jurko Gospodnetić:

When you install 32-bit CPython 'for the current user
only' on 64-bit Windows, the installation does not show
up in the Windows 'Add/Remove Programs' dialog (a.k.a.
'Programs and Features' dialog on Windows 7). It does
not show up there even for the current user.

I tested this CPython installation behaviour with the
following CPython versions:
  * 2.3.4 - works correctly
  * 2.5.4 - works correctly
  * 2.6.0 - works correctly
  * 2.6.2 - works correctly
  * 2.6.3 - does not work correctly
  * 2.6.4 - does not work correctly
  * 2.6.6 - does not work correctly
  * 2.7.6 - does not work correctly
  * 3.3.3 - does not work correctly
  * 3.3.5 - does not work correctly
  * 3.4.0 - does not work correctly

All this has been tested using one Windows 7 SP1 (x64)
machine and using only CPython 3.4.0 installation on
another.

Several related observations, indicating that this could
be some sort of a Windows Installer misconfiguration
issue possibly solvable in the CPython installer:

* The same does not occur when you install a 64-bit
  CPython version - its entry is correctly displayed in
  the 'Add/Remove Programs' dialog.

* 32-bit CPython installer still correctly detects that a
  specific 32-bit version has already been installed,
  even if that previous installation is not listed in the
  'Add/Remove Programs' dialog.

* When you ask Windows using its WMI interface to list
  all the products installed on it (e.g. by running
  'wmic product list' on the command-line), all the
  installed CPython versions are correctly displayed,
  even the 32-bit versions not displayed in the
  'Add/Remove Programs' dialog.

I compared MSI packaging related CPython source code
(Tools/msi folder) in 2.6.2 & 2.6.3 releases but failed to
see anything suspicious there. It could be that the
observed beaviour change between those two versions is a
result of the final release packager changing his used
Windows Installer version, but I have not rebuilt CPython,
and its MSI installer to test this theory out.

--
components: Installation, Windows
messages: 214116
nosy: Jurko.Gospodnetić
priority: normal
severity: normal
status: open
title: 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current 
user only' installations on 64-bit Windows
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue20982] http://www.python.org used in unit test is directed to HTTPS url

2014-03-19 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> test_geturl of test_urllibnet fails with 
'https://www.python.org/' != 'http://www.python.org/'

___
Python tracker 

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



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

2014-03-19 Thread Martin v . Löwis

Martin v. Löwis added the comment:

There is currently a condition in the installer to run ensurepip only if this 
is an installation (i.e. not an uninstallation); this should probably be 
extended to also run this on repair. 

Contributions are welcome.

--
nosy: +loewis

___
Python tracker 

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



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

2014-03-19 Thread Jurko Gospodnetić

New submission from Jurko Gospodnetić:

On Windows, when you repair your Python 3.4 installation, it
will not reinstall pip & setuptools. Here by 'repair' I mean
a 'Windows Installer' based repair installation.

Reproduced using:
  * Windows 7 SP1 x64.
  * Python 3.4.0 (32-bit).

To reproduce do the following:
  * Install Python.
* For example to the target installation folder:
  'C:\Program Files (x32)\Python\Python340'.
* This will automatically install pip & setuptools
  Python packages.
  * Delete or rename your target installation folder.
  * Rerun your Python installation and choose to repair
the current installation.
* This will restore the original target installation
  folder and all the basic installation files under
  that folder, but it will not reinstall pip &
  setuptols Python packages.

--
components: Installation, Windows
messages: 214113
nosy: Jurko.Gospodnetić
priority: normal
severity: normal
status: open
title: Python 3.4 'repair' Windows installation does not install pip & 
setuptools packages
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



[issue13405] Add DTrace probes

2014-03-19 Thread John Beck

Changes by John Beck :


--
nosy: +jbeck

___
Python tracker 

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



[issue20982] http://www.python.org used in unit test is directed to HTTPS url

2014-03-19 Thread STINNER Victor

New submission from STINNER Victor:

Many Python unit tests use http://www.python.org/ but the URL is directed to 
https://www.python.org/. Tests fail if the ssl module is missing.

I modified test_urllib2.test_issue16464() but then I realized that many more 
tests are impacted: many tests of test_urllibnet.
---
changeset:   89857:ad0c75b7bd7d
tag: tip
parent:  89855:9120196b3114
parent:  89856:68335b8afb1f
user:Victor Stinner 
date:Wed Mar 19 17:34:12 2014 +0100
description:
(Merge 3.4) Skip test_urllib2.test_issue16464() is the ssl module is missing


changeset:   89856:68335b8afb1f
branch:  3.4
parent:  89852:c44258b4b7a4
user:Victor Stinner 
date:Wed Mar 19 17:31:20 2014 +0100
files:   Lib/test/test_urllib2.py
description:
Skip test_urllib2.test_issue16464() is the ssl module is missing
---

Should we modify all unit tests to skip them if ssl is missing, or should we 
use another HTTP URL?

--
messages: 214112
nosy: haypo
priority: normal
severity: normal
status: open
title: http://www.python.org used in unit test is directed to HTTPS url
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue13437] Provide links to the source code for every module in the documentation

2014-03-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

With rare exceptions*, my inclination is to only link .py files anyway. Those 
apply to all implementations that use them as is. Any Python programmer can 
read them and maybe learn something. The C files only apply to CPython. The 
possible existence of a _modname accelerator is evident in the Python file. So 
I suggest applying without the .c links.

*Non-module examples: yesterday on python-list, someone referenced comments in 
dictobject.c to explain seemingly peculiar behavior. I believe listobject.c has 
Tim's long comment on .sort.

--

___
Python tracker 

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



[issue19009] Enhance HTTPResponse.readline() performance

2014-03-19 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If this is committed, should the issue be closed?

--

___
Python tracker 

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



[issue16464] urllib.request: opener not resetting content-length

2014-03-19 Thread STINNER Victor

STINNER Victor added the comment:

changeset:   89857:ad0c75b7bd7d
tag: tip
parent:  89855:9120196b3114
parent:  89856:68335b8afb1f
user:Victor Stinner 
date:Wed Mar 19 17:34:12 2014 +0100
description:
(Merge 3.4) Skip test_urllib2.test_issue16464() is the ssl module is missing


changeset:   89856:68335b8afb1f
branch:  3.4
parent:  89852:c44258b4b7a4
user:Victor Stinner 
date:Wed Mar 19 17:31:20 2014 +0100
files:   Lib/test/test_urllib2.py
description:
Skip test_urllib2.test_issue16464() is the ssl module is missing

--
nosy: +haypo

___
Python tracker 

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



[issue19009] Enhance HTTPResponse.readline() performance

2014-03-19 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Sure.  If there are issues we'll just reopen.  Closing.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue20980] In multiprocessing.pool, ExceptionWithTraceback should derive from Exception

2014-03-19 Thread Steven Myint

Steven Myint added the comment:

I didn't quite understand the multiprocessing test cases, but attached is a 
standalone test case that reproduces the problem. The problem only shows up 
when using ThreadPool.

$ python thread_pool_exception_test.py
Traceback (most recent call last):
  File "thread_pool_exception_test.py", line 7, in 
pool.map(exception, [1])
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/pool.py",
 line 255, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/pool.py",
 line 594, in get
raise self._value
TypeError: exceptions must derive from BaseException

--
Added file: http://bugs.python.org/file34520/thread_pool_exception_test.py

___
Python tracker 

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



[issue1887] Document that distutils doesn't support out-of-source builds

2014-03-19 Thread Alba Magallanes

Alba Magallanes added the comment:

Eric Thanks for the review :) I'll follow your advice
Thanks !

On Wed, Mar 19, 2014 at 12:33 AM, Éric Araujo wrote:

>
> Éric Araujo added the comment:
>
> Thanks for the patch.  I did a review, you should have got an email; if
> not, follow the "review" link on the right of your patch in the list of
> files near the top of this page.
>
> --
> components: +Documentation
> versions: +Python 3.5 -Python 3.3
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-03-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9120196b3114 by Ethan Furman in branch 'default':
Issue19995: passing a non-int to %o, %c, %x, or %X now raises an exception
http://hg.python.org/cpython/rev/9120196b3114

--

___
Python tracker 

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



[issue20980] In multiprocessing.pool, ExceptionWithTraceback should derive from Exception

2014-03-19 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
stage:  -> test needed

___
Python tracker 

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



[issue1859] textwrap doesn't linebreak on "\n"

2014-03-19 Thread dani

dani added the comment:

applied patches textwrap_2010-11-23.diff and issue1859_docs.diff
added line_break tests

--
nosy: +dbudinova
Added file: http://bugs.python.org/file34519/line_break_tests.patch

___
Python tracker 

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



[issue20979] Calling getdents()/readdir64() repeatedly while closing descriptors provides unexpected behaviour.

2014-03-19 Thread Марк Коренберг

New submission from Марк Коренберг:

1. Please see last comments/patches for issue8052
2. Not closing some descriptos is security breach (PEP-0446 describes that)


=
Calling getdents()/readdir64() repeatedly while closing descriptors provides 
unexpected behaviour. Reading directory while it modified is not safe by 
default. For example: http://en.it-usenet.org/thread/18514/15719/. 

So, we should re-open directory if we received full array of structures. I 
don't know if just lseek(dirfd, 0) sufficies.

Please reopen bug, as Linux behaviour of stable reading /proc//fd may be 
broken in future without any error at python side (!) (typically, second call 
returns empty list if dir was modified)

=

Also, please check exit code of getdents() instead of just ignoring error and 
NOT closing file descriptors.
=

P.S. Please set affected python versions...

--
components: Library (Lib)
messages: 214100
nosy: mmarkk
priority: normal
severity: normal
status: open
title: Calling getdents()/readdir64() repeatedly while closing descriptors 
provides unexpected behaviour.
type: security

___
Python tracker 

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



[issue20980] In multiprocessing.pool, ExceptionWithTraceback should derive from Exception

2014-03-19 Thread Steven Myint

New submission from Steven Myint:

In multiprocessing.pool, ExceptionWithTraceback is not derived from Exception. 
Thus when it is raised, we get the exception, "TypeError: exceptions must 
derive from BaseException". Attached is a patch that fixes this.

See below example traceback that prompted me to notice this:

Traceback (most recent call last):
  File "/Users/myint/Library/Python/3.4/bin/yolk", line 9, in 
load_entry_point('yolk3k==0.7.3', 'console_scripts', 'yolk')()
  File "/Users/myint/Library/Python/3.4/lib/python/site-packages/yolk/cli.py", 
line 1123, in main
my_yolk.run()
  File "/Users/myint/Library/Python/3.4/lib/python/site-packages/yolk/cli.py", 
line 208, in run
return getattr(self, action)()
  File "/Users/myint/Library/Python/3.4/lib/python/site-packages/yolk/cli.py", 
line 240, in show_updates
for (project_name, version, newest) in _updates(pkg_list, self.pypi):
  File "/Users/myint/Library/Python/3.4/lib/python/site-packages/yolk/cli.py", 
line 1104, in _updates
names):
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/pool.py",
 line 255, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/multiprocessing/pool.py",
 line 594, in get
raise self._value
TypeError: exceptions must derive from BaseException

--
components: Library (Lib)
files: exception_with_traceback.diff
keywords: patch
messages: 214101
nosy: myint
priority: normal
severity: normal
status: open
title: In multiprocessing.pool, ExceptionWithTraceback should derive from 
Exception
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file34518/exception_with_traceback.diff

___
Python tracker 

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



[issue20980] In multiprocessing.pool, ExceptionWithTraceback should derive from Exception

2014-03-19 Thread R. David Murray

R. David Murray added the comment:

We must have a missing test case, then.  One should be added.

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



  1   2   >