[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. But why not just inline expat_unknown_encoding_handler()?

For 2.7 we perhaps should add SetStartDoctypeDeclHandler and SetEncoding in the 
exported C API. Shouldn't we update the C API version (for this issue and for 
issue16986)?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13612
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2013-05-24 Thread Antoine Pitrou

Antoine Pitrou added the comment:

User code should generally not see any SystemErrors (even when choosing wacky 
module names :-)), so IMHO this is a regression.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18018
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17839] base64 module should use memoryview

2013-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It works only if input also supports slicing and this slicing is corresponded 
to bytes-slicing. It perhaps doesn't catch a non C-continuous buffers.

Actually we need something like (unlikely cast() doesn't work with empty 
buffers):

s = memoryview(s)
if not s:
return b''
s = s.cast('B')
...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17839
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18011] Inconsistency between b32decode() documentation, docstring and code

2013-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Are there any objections?

--
assignee: docs@python - serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18011
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18048] Merging test_pep263.py and test_coding.py

2013-05-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There are two test files for the same feature -- defining Python source code 
encodings (PEP 263). It is not clear where new tests should be added. Perhaps 
two files should be merged into the one file.

test_pep263.py was added in 2002, test_coding.py was added in 2005.

--
components: Tests, Unicode
messages: 189902
nosy: ezio.melotti, lemburg, loewis, nnorwitz, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Merging test_pep263.py and test_coding.py
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18048
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18038] Unhelpful error message on invalid encoding specification

2013-05-24 Thread Martin v . Löwis

Martin v. Löwis added the comment:

LGTM.

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18038
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18040] SIGINT catching regression on windows in 2.7

2013-05-24 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
nosy: +loewis, tim.golden

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18040
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18041] mention issues with code churn in the devguide

2013-05-24 Thread Martin v . Löwis

Martin v. Löwis added the comment:

What does churn mean?

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18041
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18038] Unhelpful error message on invalid encoding specification

2013-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a better patch with tests (see also issue18048).

--
Added file: 
http://bugs.python.org/file30358/tokenizer_encoding_problem_msg.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18038
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-05-24 Thread Oscar Benjamin

Oscar Benjamin added the comment:

 Renato Silva added the comment:

 I must note that GCC 4.x *does* support -mno-cygwin, at least until 4.4,
and at least the MinGW version.

MinGW has never supported the -mno-cygwin option. It has simply tolerated
it. The option never did anything useful and at some point it became an
error to even supply it. I'm not sure exactly when but some time after 4.4
sounds reasonable to me.

The option was only ever meaningful in cygwin's gcc 3.x and was always an
error in 4.x.

 I have used it myself for building Pidgin under Windows, which requires
that option. See [1] where a Pidgin developer confirms that.


No the developer does not confirm that the -mno-cygin option is required
for MinGW. Also from what I've seen I would say that the error message that
the OP shows there comes from Cygwin's gcc not MinGW.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-05-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4981d8eb401 by Ronald Oussoren in branch '2.7':
Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
http://hg.python.org/cpython/rev/f4981d8eb401

New changeset 3c4a5dc29417 by Ronald Oussoren in branch '3.3':
Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
http://hg.python.org/cpython/rev/3c4a5dc29417

New changeset 24ffb0148729 by Ronald Oussoren in branch 'default':
(3.3-default) Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
http://hg.python.org/cpython/rev/24ffb0148729

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17269
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18038] Unhelpful error message on invalid encoding specification

2013-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: 
http://bugs.python.org/file30345/tokenizer_encoding_problem_msg.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18038
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18048] Merging test_pep263.py and test_coding.py

2013-05-24 Thread Martin v . Löwis

Martin v. Löwis added the comment:

For a bug fix release, I consider refactoring of test cases inappropriate.

If they really ought to be merged, I consider neither file name particularly 
descriptive, so perhaps a new file name should be used altogether (e.g. 
test_source_encoding).

--
versions:  -Python 2.7, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18048
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-24 Thread Christian Heimes

Christian Heimes added the comment:

I finally found the correct RFC for wildcard matching. I think our 
implementation violates some recommendations.

http://tools.ietf.org/html/rfc6125#section-6.4.2
http://tools.ietf.org/html/rfc6125#section-6.4.3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2013-05-24 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13266
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17482] functools.update_wrapper mishandles __wrapped__

2013-05-24 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee:  - ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17482] functools.update_wrapper mishandles __wrapped__

2013-05-24 Thread Nick Coghlan

Nick Coghlan added the comment:

Georg, just a heads up that I was informed of a fairly significant bug in the 
__wrapped__ handling which some folks doing function introspection had been 
assuming was a feature.

I'd like to fix it for 3.3.3, but need your +1 as RM since it *will* break 
introspection code which assumes the current behaviour was intentional.

--
nosy: +georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17482] functools.update_wrapper mishandles __wrapped__

2013-05-24 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
nosy: +lukasz.langa

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17482
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-05-24 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17269
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11101] plistlib has no graceful way of handing None values

2013-05-24 Thread Ronald Oussoren

Ronald Oussoren added the comment:

At first I didn't like the proposal, but when I looked at the JSON module I 
noticed it has similar functionality for ignoring keys that cannot be 
represented in a JSON file.

I'll look into this after merging #14455.

The JSON library has two other options that might be useful for the plistlib 
library: sort_keys (sort the keys in the serialization of of dicts) and 
default(obj), which is a function for transforming values that cannot be 
represented natively.

--
assignee:  - ronaldoussoren
nosy: +ned.deily
versions: +Python 3.4 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11101
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18049] Re-enable threading test on OSX

2013-05-24 Thread Ronald Oussoren

New submission from Ronald Oussoren:

I recently notied that 
test.test_threading.ThreadingExceptionTests.test_recursion_limit is disabled 
for debug builds. 

The attached patch re-enables this test case and fixes the crash be increasing 
the stack size for new threads. 

The disadvantage of the patch is that is increases the default stack size for 
all new threads on OSX from 5 to 8 megabytes (for threads created by Python) 
and that could affect program behavior as fewer threads can be created before 
running out of memory.

The patch could be updated to check for Py_DEBUG and only increase the stack 
size for --with-pydebug builds (which are the ones using -O0), as those builds 
need the increased stack size and debug builds already consume more memory that 
normal builds. That's not 100% reliable though, as users could also build the 
with CFLAGS set to -O0 without using --with-pydebug. 

I haven't found a way to detect the optimization level with clang or gcc using 
the preprocessor.

--
assignee: ronaldoussoren
components: Macintosh
files: reenable-threading-test.txt
messages: 189912
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: patch review
status: open
title: Re-enable threading test on OSX
type: behavior
Added file: http://bugs.python.org/file30359/reenable-threading-test.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18049
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2053] IDLE - standardize dialogs

2013-05-24 Thread Mark Lawrence

Mark Lawrence added the comment:

Bump as IDLE is now being actively developed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4304] build mode which fails for build failures in extensions

2013-05-24 Thread Mark Lawrence

Mark Lawrence added the comment:

Can someone answer the question pointed to by msg109816 i.e. can all of the 
buildbots build all of the expected extensions?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4304
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17272] request.full_url: unexpected results on assignment

2013-05-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51c5870144e7 by Senthil Kumaran in branch 'default':
Fix #17272 - Make Request.full_url and Request.get_full_url return same result 
under all circumstances.
http://hg.python.org/cpython/rev/51c5870144e7

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17272
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17701] Improving strftime documentation

2013-05-24 Thread Éric Araujo

Éric Araujo added the comment:

Looks good.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17701
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14455] plistlib unable to read json and binary plist files

2013-05-24 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've started work on integrating the latest patch.

Some notes (primarily for my own use):

* I'll drop support for the JSON format, that format is not used
  by Apple's libraries (although the plutil tool can convert plists
  to JSON)

* The patch (plistlib_with_tests.diff) no longer applies cleanly,
  there are two rejected hunks in test_plist.py. 

* There is no documentation update in the patch, I'm working on that

* There is also an NextStep format (see 
http://code.google.com/p/networkpx/wiki/PlistSpec. 
  That format is not supported by plutil, but is supported by 
  Apple's libraries. Support for this can be added later.

* plistlib needs futher work as well, it would be nice to move closer
  to the PEP8 coding style (although this should be done carefully to
  maintain compatibility with existing code.

* plistlib.Data should be deprecated. The class was needed in python 2.7,
  but python 3 already has a unambiguous representation for binary data:
  the bytes type.

* It might be nice to add some options from the json library to 
  the serialization function:

  * skipkeys=True/False: skip keys that aren't strings and cannot
be represented in a plist file, instead of raising TypeError
  * check_circular=True/False: explicitly check for circular recursion
and raise an exception instead of hoping that some other
exception occurs
  * default=function(obj): a function that is called on values that
cannot be represented, should either return a value that can
be encoded or raise TypeError
  
* Issue #11101 mentions that it would be nice to have an option
  to ignore keys whose value is None. I'm not sure if this is really
  useful, and if it is it might be better to add a skip values option
  that ignores items where the value cannot be encoded.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14455
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17272] request.full_url: unexpected results on assignment

2013-05-24 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is fixed in 3.4. I dont think backporting is a good idea just to support 
assignment to .full_url. Thinking of this further, the idea of reusing request 
by assigning to .full_url may not be a good idea, because if you set .full_url 
to a completely different URL from different host, the request becomes 
meaningless.  

Closing this issue as the enhancement is done.

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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17272
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updating tests I found some related errors.

XML-RPC doesn't work in general case for non UTF-8 encoding:

 import xmlrpclib
 xmlrpclib.dumps(('\u20ac',), encoding='iso-8859-1')
'params\nparam\nvaluestring\\u20ac/string/value\n/param\n/params\n'
 xmlrpclib.dumps((u'\u20ac',), encoding='iso-8859-1')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.7/xmlrpclib.py, line 1085, in dumps
data = m.dumps(params)
  File /usr/lib/python2.7/xmlrpclib.py, line 632, in dumps
dump(v, write)
  File /usr/lib/python2.7/xmlrpclib.py, line 654, in __dump
f(self, value, write)
  File /usr/lib/python2.7/xmlrpclib.py, line 700, in dump_unicode
value = value.encode(self.encoding)
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u20ac' in 
position 0: ordinal not in range(256)

We should use 'xmlcharrefreplace' error handler.

Non-ASCII strings is passed as Unicode strings (this should be documented).

 xmlrpclib.loads(xmlrpclib.dumps(('\xe2\x82\xac',)))
((u'\u20ac',), None)

'\r' and '\r\n' are deserialized as '\n'.

 xmlrpclib.loads(xmlrpclib.dumps(('\r',)))
(('\n',), None)
 xmlrpclib.loads(xmlrpclib.dumps(('\r\n',)))
(('\n',), None)

--
Added file: 
http://bugs.python.org/file30360/xmlrpc_dump_invalid_string-2.7_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7727
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file30339/xmlrpc_dump_invalid_string.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7727
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18041] mention issues with code churn in the devguide

2013-05-24 Thread Éric Araujo

Éric Araujo added the comment:

Moving things around.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18041
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: 
http://bugs.python.org/file30343/xmlrpc_dump_invalid_string-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7727
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18041] mention issues with code churn in the devguide

2013-05-24 Thread Éric Araujo

Éric Araujo added the comment:

Tshepang is referring to cases where a patch changes one line but affects ten 
other lines because a paragraph was rewrapped, modernizing code, updating tests 
to use latest helpers, etc.

I’ve actually seen two contrary kinds of advice: do cleanups when you touch the 
code for a bug fix or new feature (the holistic approach / anti-code churn) vs. 
separate concerns with separate commits.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18041
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18000] _md5 should be built if _ssl cannot be built

2013-05-24 Thread Éric Araujo

Éric Araujo added the comment:

The other bug report classifies the request behavior as a new feature, so it 
could not go into 2.7.

--
nosy: +eric.araujo, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18000
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18003] lzma module very slow with line-oriented reading.

2013-05-24 Thread Éric Araujo

Éric Araujo added the comment:

A higher-level interface to abstract differences between gzip, xz and others is 
actually provided in the tarfile module.  (zipfile is left out and its file 
objects have different methods, but that’s another issue.  shutil provides even 
higher-level functions to work on top of tarfile or zipfile.)

--
nosy: +eric.araujo
title: New lzma crazy slow with line-oriented reading. - lzma module very slow 
with line-oriented reading.

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18003
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] _sre.MAXREPEAT not defined in 2.7.3

2013-05-24 Thread Samuel John

New submission from Samuel John:

As also discussed at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704084 
and https://github.com/mxcl/homebrew/pull/19300, Python 2.7.4 and 2.7.5 seem to 
have added an `from _sre import MAXREPEAT` to the sre_compile.py, sre_parse.py 
and sre_constants.py modules.

But python 2.7.3 (and older?) don't have the built in MAXREPEAT in _sre. Some 
virtualenvs have to be updated (which is easy) but some Software (such as vim, 
shipped with OS X 10.8.3) is statically linked to an older python 2.7.2 (I 
guess) but somehow picks up my newly built python 2.7.5 and attempts to load 
it's site.py. (Weechat also reported to being affected)

I think this is more a bug of vim/weechat etc. but we at homebrew have to do 
some hacky fix, because Apple is not going to update vim very soon, and so 
having a newer python in path breaks system stuff.

So I am fine if you close this here again. But at least we have a reference or 
perhaps you guys have a better idea how to work-around.

For homebrew, I propose a monkey-patch in re.py to the _sre module if it does 
not have a MAXREPEAT.


   try:
   from _sre import MAXREPEAT
   except ImportError:
   import _sre
   _sre.MAXREPEAT = 65535 # this monkey-patches all other places of from 
_sre import MAXREPEAT

--
components: Extension Modules, Regular Expressions
messages: 189924
nosy: ezio.melotti, mrabarnett, samueljohn
priority: normal
severity: normal
status: open
title: _sre.MAXREPEAT not defined in 2.7.3
type: crash
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18050
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2053] IDLE - standardize dialogs

2013-05-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I have not looked at the details, so cannot currently comment as to whether the 
idea should be pursued or dropped. Perhaps when Roger is done with overt bugs 
he will take a look and offer an opinion.

--
assignee: kbk - 
nosy: +roger.serwy
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel

New submission from Craig McDaniel:

Running setup.py bdist_rpm throws an exception on some libraries (e.g. - 
simplejson) since 2.7.4 due to introduction of get_python_version():

Traceback (most recent call last):
  File setup.py, line 103, in module
run_setup(True)
  File setup.py, line 99, in run_setup
cmdclass={'build_ext': ve_build_ext},
  File /home/cmcdaniel/src/cpython/Lib/distutils/core.py, line 152, in setup
dist.run_commands()
  File /home/cmcdaniel/src/cpython/Lib/distutils/dist.py, line 953, in 
run_commands
self.run_command(cmd)
  File /home/cmcdaniel/src/cpython/Lib/distutils/dist.py, line 972, in 
run_command
cmd_obj.run()
  File build/bdist.linux-i686/egg/setuptools/command/bdist_rpm.py, line 28, 
in run
  File /home/cmcdaniel/src/cpython/Lib/distutils/command/bdist_rpm.py, line 
383, in run
pyversion = get_python_version()
NameError: global name 'get_python_version' is not defined

--
assignee: eric.araujo
components: Distutils
files: mywork.patch
keywords: patch
messages: 189926
nosy: Craig.McDaniel, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: get_python_version undefined in bdist_rpm.py
versions: Python 2.7
Added file: http://bugs.python.org/file30361/mywork.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18051
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18051] get_python_version undefined in bdist_rpm.py

2013-05-24 Thread Craig McDaniel

Craig McDaniel added the comment:

Closing; duplicate of 18045

--
resolution:  - duplicate
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18051
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18009] os.write.__doc__ is misleading

2013-05-24 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18009
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-05-24 Thread Martin v . Löwis

Martin v. Löwis added the comment:

As a policy, the standard library should accept non-ASCII host names 
(U-labels) wherever possible. I.e the hostname parameter of match_hostname 
should allow for U-labels (as well as A-labels).

When returning names, it should always return the data as-is, which typically 
means A-labels. Anybody wanting to display U-labels will need to decode them 
explicitly.

I believe that the matching of IDNA names doesn't currently happen according to 
6.4.2 of RFC 6125, however, this is not actually the issue that Christian 
reported (which was only about wildcard matching). I suggest to create a 
separate issue for that.

As for 6.4.3: I find the text to be quite ill-formulated. Specifically, I'm 
referring to the sentence

   However, the client SHOULD NOT
   attempt to match a presented identifier where the wildcard
   character is embedded within an A-label or U-label [IDNA-DEFS] of
   an internationalized domain name [IDNA-PROTO].

First, in the context of X.509, a wildcard *cannot* be embedded with an ... 
U-label; the certificate can only possibly contain A-labels (because the 
datatype of dNSName is IA5String).

Second, as written, it *does* allow to match 'götter.example.de' against 
x*.example.de, since x*.example.de is not an A-label. An A-label is defined 
as

   An A-label is the ASCII-Compatible Encoding (ACE, see
  Section 2.3.2.5) form of an IDNA-valid string.  It must be a
  complete label: IDNA is defined for labels, not for parts of them
  and not for complete domain names.  This means, by definition,
  that every A-label will begin with the IDNA ACE prefix, xn--
  (see Section 2.3.2.5), followed by a string that is a valid output
  of the Punycode algorithm [RFC3492] and hence a maximum of 59
  ASCII characters in length.  The prefix and string together must
  conform to all requirements for a label that can be stored in the
  DNS including conformance to the rules for LDH labels
  (Section 2.3.1).  If and only if a string meeting the above
  requirements can be decoded into a U-label is it an A-label.

Since an A-label is required to conform to the LDH label syntax, it cannot 
possibly contain the asterisk (LDH labels can only contain letters, digits, and 
the hyphen. Hence, the entire requirement is irrelevant (as literally written). 
They might mean something else, but I cannot guess what it is that they mean.

I disagree with the classification of this issue as critical. It does not 
involve a crash, a serious regression, or a breakage of a very important API.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17997
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1554133] PyOS_InputHook() and related API funcs. not documented

2013-05-24 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Here's a proposed patch to the c-api manual that describes these two pointers.  
I put them in the 'very high-level API' section. Maybe they belong in the 
Operating System Utilities section instead, but I think they're intertwined 
with the interpreter loop and therefore belong in the 'very high-level' section.

--
Added file: http://bugs.python.org/file30362/inputhook.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1554133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1554133] PyOS_InputHook() and related API funcs. not documented

2013-05-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not a C-api user, but the entries are pretty clear to me and seem ready to 
apply. The usage examples are a nice touch. OS Utilites is not where I would 
expect interpreter loop hooks, so I think the current location is better.

--
stage:  - commit review
versions: +Python 3.4 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1554133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2053] IDLE - standardize dialogs

2013-05-24 Thread Ned Deily

Ned Deily added the comment:

Attached is a refreshed version of the patch against current 2.7 tip.  I did a 
quick visual comparison with the original but make no guarantees that it is 
totally accurate.  I have no plans to work on it further myself.

--
nosy: +ned.deily
Added file: 
http://bugs.python.org/file30363/IDLE_standardize_dialogs_2.7_2013-05-24.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] _sre.MAXREPEAT not defined in 2.7.3

2013-05-24 Thread Alex Burka

Changes by Alex Burka durk...@gmail.com:


--
nosy: +Alex.Burka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18050
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1554133] PyOS_InputHook() and related API funcs. not documented

2013-05-24 Thread A.M. Kuchling

A.M. Kuchling added the comment:

One question about the patch: how to give the prototype expected for the 
function?  I currently have it as:

char *(*PyOS_ReadlineFunctionPointer)(FILE *stdin, FILE *stdout, char *prompt)

Would it be better with a trivial function name, as in:

char *func(FILE *stdin, FILE *stdout, char *prompt)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1554133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17953] sys.modules cannot be reassigned

2013-05-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4f8160e45cb7 by Brett Cannon in branch '3.3':
Issue #17953: document that sys.modules shouldn't be replaced (thanks
http://hg.python.org/cpython/rev/4f8160e45cb7

New changeset b60ae4ebf981 by Brett Cannon in branch 'default':
merge fix for issue #17953
http://hg.python.org/cpython/rev/b60ae4ebf981

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17953] sys.modules cannot be reassigned

2013-05-24 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Yogesh, but I went with different wording that I came up 
with on the train the other day while offline. But you did remind me to update 
Misc/NEWS (which led to a discussion on python-committers), so thanks for that.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18009] os.write.__doc__ is misleading

2013-05-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7935844c6737 by Benjamin Peterson in branch '3.3':
indicate that read/write work with bytes (closes #18009)
http://hg.python.org/cpython/rev/7935844c6737

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18009
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18050] _sre.MAXREPEAT not defined in 2.7.3

2013-05-24 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +ned.deily

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18050
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1554133] PyOS_InputHook() and related API funcs. not documented

2013-05-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Can one of you three answer Kuchling's question about formatting a data entry 
that consists of a function pointer with function signature?

--
nosy: +eric.araujo, ezio.melotti, georg.brandl

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1554133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18052] IDLE 3.3.2 Windows taskbar icon regression

2013-05-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Windows 7 (32 bit?), 32 bit IDLE 3.3.2: When I start from the start menu, the 
taskbar icon is the red Tk icon instead of the IDLE icon. If I try to pin the 
Tk icon to the task bar, a useless pythonw icon is pinned instead. The Tk icon 
goes when the program is closed. After multiple open and frequent program 
deletions, Idle shows up on the Start/frequent programs list with it normal 
Idle icon (White page + snake).

(I had 3.3.1 before working fine. The 3.3.2 upgrade did not work (tkinter would 
not import, so I redownloaded, deleted Python 3.3.2, and reinstalled, getting 
the behavior above.)

I have seen the Tk icon before after fresh installs, but on other machines, and 
it was replaced after the first open with the correct icon.

--
components: IDLE, Installation, Windows
messages: 189937
nosy: loewis, roger.serwy, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE 3.3.2 Windows taskbar icon regression
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18052
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17953] sys.modules cannot be reassigned

2013-05-24 Thread Yogesh Chaudhari

Yogesh Chaudhari added the comment:

You are most welcome Brett. I am just starting to contribute with this doc fix. 
Didn't think a small detail in it will generate such a long debate in the 
python-committers mailing list. 

Is there a plan in action for 'fixing' Misc/NEWS. I now realize that this 
change is too small to warrant an entry there, however, as someone new to the 
list, I simply followed http://docs.python.org/devguide/patch.html. Doing a 
make patchcheck warns about no changes to Misc/NEWS. 

IMHO it would be great if this tool can look at the files changed (or maybe 
at-least just the directory, or even, simply number of lines modified) and 
decide if an entry is required in Misc/News. Of-course this is from my 
perspective. I would like to get your view on this and help about the solution 
if possible.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17953] sys.modules cannot be reassigned

2013-05-24 Thread R. David Murray

R. David Murray added the comment:

I think that is a reasonable suggestion for an enhancement to patchcheck 
(though I think Brett had a good reason to add a news entry in this particular 
case).  You could open a new issue with that suggestion.  On the other hand, 
patchcheck always warns about other stuff that it can't so easily realize 
aren't really needed, so it may not be considered a worthwhile enhancement.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17953] sys.modules cannot be reassigned

2013-05-24 Thread Yogesh Chaudhari

Yogesh Chaudhari added the comment:

That sounds good. I will open up an issue (if not for anything else other than 
to get more eyes on this issue)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17953
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-05-24 Thread Renato Silva

Renato Silva added the comment:

 MinGW has never supported the -mno-cygwin option. It has simply 
 tolerated it. The option never did anything useful and at some point 
 it became an error to even supply it. I'm not sure exactly when but 
 some time after 4.4 sounds reasonable to me.

Hi Oscar! Sorry, I just meant to correct this information: in gcc 4.x it 
produces an error preventing build. Even if it doesn't do anything useful, 
still GCC 4.4 does accept that option normally. If MinGW didn't touch anything 
relevant, then what Cygwin folks said about 4.x [1] clearly did not come to 
reality.

 No the developer does not confirm that the -mno-cygin option is 
 required for MinGW.

Not for MinGW, but for building Pidgin. I have just checked it, and -mno-cygwin 
actually is no longer necessary since 2.10.7 [1], but it was at the time of 
that message. Even though it didn't do anything meaningful, a GCC like 4.6 
would cause build to fail.

 Also from what I've seen I would say that the error message that
 the OP shows there comes from Cygwin's gcc not MinGW.

No, you can use either Cygwin or MinGW MSYS as environment, but the compiler 
must be MinGW [2].

[1] https://hg.pidgin.im/pidgin/main/rev/c959cde2a7bd
[2] https://developer.pidgin.im/wiki/BuildingWinPidgin#Setupyourbuildenvironment

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-05-24 Thread Renato Silva

Renato Silva added the comment:

ERRATA.

Where you see: [1] clearly did not come to reality.
Please read: [0] clearly did not come to reality.

[0] http://cygwin.com/ml/cygwin/2009-03/msg00802.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18053] Add checks for Misc/NEWS in make patchcheck

2013-05-24 Thread Yogesh Chaudhari

New submission from Yogesh Chaudhari:

Based on the threads about 
http://mail.python.org/pipermail/python-committers/2013-May/002529.html and 
discussion on http://bugs.python.org/issue17953; It would be good to add some 
(very high level)checks inside patchcheck that will tell the user if Misc/NEWS 
needs to be updated for the patch created. 

As of now the patchcheck utility adds a notice to modify Misc/NEWS for every 
patch. IMO this notice should be based on some simple checks.
eg:
number of lines modified and/or directories changed (that might give a clue 
about ignoring minor changes in documentation and considering changes in Python 
core or major changes in Libs etc) based on which make patchcheck should 
generate warnings for changing Misc/NEWS.

--
messages: 189942
nosy: Yogesh.Chaudhari
priority: normal
severity: normal
status: open
title: Add checks for Misc/NEWS in make patchcheck

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18053] Add checks for Misc/NEWS in make patchcheck

2013-05-24 Thread Yogesh Chaudhari

Yogesh Chaudhari added the comment:

I am not sure which component patchcheck corresponds to, so I have left that 
out and added people on nosy list in http://bugs.python.org/issue17953. If I 
have missed the concerned maintainer, kindly let me know.

--
nosy: +brett.cannon, pitrou, r.david.murray, terry.reedy
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 
3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com