[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2013-06-07 Thread Palm Kevin

Palm Kevin added the comment:

The `-lintl` fix did not work in my case.
But I succeeded to compile Python using the CC compiler (/usr/bin/cc) instead 
of GCC compiler.

(cc: Sun C 5.12 SunOS_sparc 2011/11/16)

--
nosy: +palm.kevin

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



[issue13843] Python doesn't compile anymore on our Solaris buildbot: undefined libintl_* symbols

2013-06-07 Thread STINNER Victor

STINNER Victor added the comment:

 But I succeeded to compile Python using the CC compiler (/usr/bin/cc) instead 
 of GCC compiler.

I may be interesting to check if CC searchs header files in the same
directories than GCC. Same question for libraries. Using GCC, it can
be seen in the command line: -I and -L options. But GCC has also a
builtin list of directories, I don't know how to get this list.

2013/6/7 Palm Kevin rep...@bugs.python.org:

 Palm Kevin added the comment:

 The `-lintl` fix did not work in my case.
 But I succeeded to compile Python using the CC compiler (/usr/bin/cc) instead 
 of GCC compiler.

 (cc: Sun C 5.12 SunOS_sparc 2011/11/16)

 --
 nosy: +palm.kevin

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue13843
 ___

--

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

New submission from Palm Kevin:

On Solaris, make install fails on target altbininstall.

This is due to the fact than on Solaris you man not create a symlink using `ln 
-sf` - You have to use `ln -f -s`.

(SunOS sol1 5.10 Generic_147440-09 sun4u sparc SUNW,Sun-Fire-V240)

--
components: Build
messages: 190738
nosy: palm.kevin
priority: normal
severity: normal
status: open
title: make install failed on solaris
versions: Python 3.2

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

Palm Kevin added the comment:

fixing patch attached

--
keywords: +patch
Added file: http://bugs.python.org/file30492/Makefile.pre.in.diff

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

Changes by Palm Kevin kevin.p...@labsolution.lu:


Removed file: http://bugs.python.org/file30492/Makefile.pre.in.diff

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

Changes by Palm Kevin kevin.p...@labsolution.lu:


Added file: http://bugs.python.org/file30493/Makefile.pre.in.diff

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

Changes by Palm Kevin kevin.p...@labsolution.lu:


Removed file: http://bugs.python.org/file30493/Makefile.pre.in.diff

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



[issue18154] make install failed on solaris

2013-06-07 Thread Palm Kevin

Changes by Palm Kevin kevin.p...@labsolution.lu:


Added file: http://bugs.python.org/file30494/Makefile.pre.in.patch

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



[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-06-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which fixes getpass bug: unix_getpass() always fallback to 
sys.stdin. As side effect it also fixes resource warning in getpass().

I'm not sure I have correctly changed tests. David, could you please review the 
patch?

--
nosy: +gregory.p.smith, r.david.murray
stage:  - patch review
title: getpass.getpass() triggers ResourceWarning - getpass.unix_getpass() 
always fallback to sys.stdin
type: resource usage - behavior
Added file: http://bugs.python.org/file30495/getpass_tty.patch

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



[issue3329] API for setting the memory allocator used by Python

2013-06-07 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I'd like to add some argument to providing a file and line number to the 
allocation api.  I know that currently this is not provided e.g. by the 
PyMem_Allocate() functions, but I think it would be wise to provide a debug 
version of these functions that pass in the call sites.  An allocator api that 
then also allows for these values to be provided to the malloc/realloc/free 
routines is then future-proof in that respect.

Case in point:  We have a memory profiler running which uses a allocator hook 
system similar to what Victor is proposing.  But in addition, it provides a 
file  and line argument to every function.

Now, the profiler is currently not using this code.  Here how the malloc 
function looks:

static void *
PyMalloc(size_t size, void *arg, const char *file, int line, const char *msg)
{
void *r = DustMalloc(size);
if (r) {
tmAllocEx(g_telemetryContext, file, line, r, size, Python alloc: %s, 
msg);
ReportAllocInfo(AllocEvent, 0, r, size);
}
return r;
}

tmAllocEx is calling the Telemetry memory profiles and passing in the 
allocation site.  (http://www.radgametools.com/telemetry.htm, also my blog 
about using it:  
http://cosmicpercolator.com/2012/05/25/optimizing-python-condition-variables-with-telemetry/

But our profiler, called with ReportAllocInfo, isn't using this.  It relies 
solely on extracting the python callstack.

Today, I got this email (see attached file Capture.jpg)  

Basically, the profiler sees a lot of allocated memory with no python call 
stack.  Now it would be useful if we had the C call site information, to know 
where it came from.

So:  My suggestion is that the allocator api be
1) a struct, which allows for a cleaner api function
2) Include C filename and line number.

Even though the current python memory API (e.g. PyMem_Malloc(), 
PyObject_Malloc()) do not currently support it, this would allow us to 
internally have _extended_ versions of these apis that do support it and macros 
that pass in that information.  This can be added at a later stage.  Having it 
in the allcoator api function would make it more future proof.

See also my pymem.h and ccpmem.h files attached to this defect for examples 
on how we have tweaked python's internal memory apis to support this 
information.

--
Added file: http://bugs.python.org/file30496/Capture.JPG

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Dave Challis

New submission from Dave Challis:

When attempting to detect the presence of CSV headers, delimiters are passed to 
a regex function without escaping, which causes an exception if a delimiter 
which has meaning in a regex (e.g. '+', '*' etc.) is used.

Code to reproduce:
import csv
s = csv.Sniffer()
s.has_header('x+y')

Trace:
Traceback (most recent call last):
  File t.py, line 4, in module
s.has_header('x+y')
  File /usr/lib64/python3.3/csv.py, line 393, in has_header
rdr = reader(StringIO(sample), self.sniff(sample))
  File /usr/lib64/python3.3/csv.py, line 183, in sniff
self._guess_quote_and_delimiter(sample, delimiters)
  File /usr/lib64/python3.3/csv.py, line 268, in _guess_quote_and_delimiter
{'delim':delim, 'quote':quotechar}, re.MULTILINE)
  File /home/dsc/venv/p3compat/lib64/python3.3/re.py, line 214, in compile
return _compile(pattern, flags)
  File /home/dsc/venv/p3compat/lib64/python3.3/re.py, line 281, in _compile
p = sre_compile.compile(pattern, flags)
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_compile.py, line 494, in 
compile
p = sre_parse.parse(p, flags)
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 748, in 
parse
p = _parse_sub(source, pattern, 0)
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 360, in 
_parse_sub
itemsappend(_parse(source, state))
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 696, in 
_parse
p = _parse_sub(source, state)
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 360, in 
_parse_sub
itemsappend(_parse(source, state))
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 696, in 
_parse
p = _parse_sub(source, state)
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 360, in 
_parse_sub
itemsappend(_parse(source, state))
  File /home/dsc/venv/p3compat/lib64/python3.3/sre_parse.py, line 569, in 
_parse
raise error(nothing to repeat)
sre_constants.error: nothing to repeat

--
components: Library (Lib)
messages: 190742
nosy: davechallis
priority: normal
severity: normal
status: open
title: csv.Sniffer.has_header doesn't escape characters used in regex
type: behavior
versions: Python 3.3

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



[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Jean-Paul Calderone

Jean-Paul Calderone added the comment:

 Sounds promising. Do you think this should be hooked into 
 SSLContext.set_default_verify_paths, or be exposed as a separate method?

If there were an API which exposed the certificate material, then this would be 
more useful to libraries trying to do other things (present debugging 
information, use an alternate SSL implementation *wink*, etc).  If this is 
*only* wrapped up inside set_default_verify_paths then many of these extra 
things are impossible with a seconding binding to the same API.

--
nosy: +exarkun

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



[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes

Christian Heimes added the comment:

Yes, I'm planing to expose the low level API. I prefer to do as much work in 
Python space as possible. The information is just too useful to 3rd parties, 
too.

I'm thinking about one low level function that interfaces Windows's cert store. 
The rest can be build on top of this function and #18138.


enum_system_store(store_name, cert_type=certificate) - [(cert_data, 
encoding_type), ...]

store_name:
  name of the store (e.g. CA, MY, ROOT), see 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa376560%28v=vs.85%29.aspx
cert_type:
  certificate or crl
data:
  certificate bytes (as far as I know the certs are stored in DER format)
encoding_type:
  integer encoding X509_ASN_ENCODING or PKCS_7_ASN_ENCODING

--

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



[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2013-06-07 Thread R. David Murray

R. David Murray added the comment:

The test changes look correct to me, but it sure would be nice to come up with 
less fragile tests.  For a function like this, though, it probably isn't 
possible.

--

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread R. David Murray

R. David Murray added the comment:

I doubt this is a regression, so I'm marking the others versions as well 
without actually testing it.  Should be an easy fix.

--
keywords: +easy
nosy: +r.david.murray
stage:  - needs patch
versions: +Python 2.7, Python 3.4

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



[issue11959] smtpd cannot be used without affecting global state

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ed498f477549 by Vinay Sajip in branch 'default':
Closes #11959: SMTPServer and SMTPChannel now take an optional map, use of 
which avoids affecting global state.
http://hg.python.org/cpython/rev/ed498f477549

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

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



[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a174d79cef2e by Vinay Sajip in branch 'default':
Issue #17903: Added path search changes to launcher.
http://hg.python.org/cpython/rev/a174d79cef2e

--
nosy: +python-dev

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



[issue17342] datetime.strptime does not implement %z

2013-06-07 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Python 2.x is in maintenance mode and will not receive new features.  In 3.x 
this is already implemented:

Python 3.3.2 (default, May 24 2013, 22:46:58)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type help, copyright, credits or license for more information.
 from datetime import *
 print(datetime.strptime('20010101 010101 -0400', '%Y%m%d %H%M%S %z'))
2001-01-01 01:01:01-04:00

--
nosy: +belopolsky
resolution:  - out of date
status: open - closed

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



[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

 echo $CPPFLAGS
-I /Users/bcannon/Developer/include 
-I/Users/bcannon/Developer/Cellar/readline/6.2.4/include
 echo $LDFLAGS
-L /Users/bcannon/Developer/lib 
-L/Users/bcannon/Developer/Cellar/readline/6.2.4/lib
 echo $CFLAGS
-Wno-unused-value -Wno-empty-body -Qunused-arguments

So ~/Developer/include does have Python installations in there (it's my 
homebrew include directory) along with sqlite3 and any other packages I have 
installed to be able to test more. Chances are the headers in homebrew are 
taking precedence over what's in the build directory during test_distutils run 
and that's where the conflict is coming in.

If that's true, does this simply mean I need to build Python without any 
installed libraries to avoid this conflict? Or does this go away if I don't 
have Homebrew in a non-standard location?

--

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



[issue18136] test_distutils failing under OS X 10.8 w/ clang

2013-06-07 Thread Ronald Oussoren

Ronald Oussoren added the comment:

On 7 Jun, 2013, at 16:54, Brett Cannon rep...@bugs.python.org wrote:

 
 If that's true, does this simply mean I need to build Python without any 
 installed libraries to avoid this conflict?

That's correct. There are other bugreports about other python installations 
influencing the build, although I'd have to search for the bug number.  

IMHO the root cause for this is that the source/build directories for Python's 
build are inserted at the wrong location in the compiler search path. Fixing 
that should be fairly easy, but does require search through the makefile and 
configure script, which is why I haven't actually tried to fix this yet.

 Or does this go away if I don't have Homebrew in a non-standard location?

Doesn't homebrew use /usr/local as the default location? That would be worse, 
as there is no easy way to tell the compiler to exclude /usr/local from its 
default search path.

--

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



[issue18136] Put local build paths before system build paths in configure.ac and Makefile.pre.in

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

I'll change the title to make it more obvious what the problem is.

And yes, Homebrew by default uses /usr/local if I remember correctly.

--
title: test_distutils failing under OS X 10.8 w/ clang - Put local build paths 
before system build paths in configure.ac and Makefile.pre.in

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



[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes

Christian Heimes added the comment:

First patch. I have not yet verified that the return data can be loaded by 
openssl. Also I need to verify the error paths and add some tests, too.

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file30497/enumcertstore.patch

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

Much like ImportError now has 'name' and 'path', AttributeError should get an 
'attr' attribute that can only be set through a keyword argument or after 
creating an instance. That would make the common ``try/except AttributeError`` 
uses much more robust by not accidentally swallowing an AttributeError that has 
nothing to do with the attribute in question::

 try:
   cls.meth()
 except AttributeError as exc:
   if exc.attr != 'meth':
 raise

--
components: Interpreter Core
messages: 190754
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Add an 'attr' attribute to AttributeError
type: enhancement
versions: Python 3.4

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: http://bugs.python.org/file30498/csv_has_header.diff

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Attached the patch to fix the problem.

--
keywords: +patch
nosy: +vajrasky
Added file: http://bugs.python.org/file30498/csv_has_header.diff

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Sorry. This one is correct. Attached the patch to fix the problem.

--
Added file: http://bugs.python.org/file30499/csv_has_header.diff

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



[issue17134] Use Windows' certificate store for CA certs

2013-06-07 Thread Christian Heimes

Christian Heimes added the comment:

I fixed a ref leak and added some tests.

--
Added file: http://bugs.python.org/file30500/enumcertstore2.patch

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



[issue17314] Stop using imp.find_module() in multiprocessing

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 97adaa820353 by Brett Cannon in branch 'default':
Issue #17314: Stop using imp in multiprocessing.forking and move over
http://hg.python.org/cpython/rev/97adaa820353

--
nosy: +python-dev

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



[issue17314] Stop using imp.find_module() in multiprocessing

2013-06-07 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


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

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: http://bugs.python.org/file30499/csv_has_header.diff

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



[issue18155] csv.Sniffer.has_header doesn't escape characters used in regex

2013-06-07 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Added test to sniffer double quote.

--
Added file: http://bugs.python.org/file30501/csv_has_header.diff

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



[issue18055] Stop using imp in IDLE

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0d8ae880ae6 by Brett Cannon in branch '3.3':
Issue #18055: Move to importlib from imp for IDLE.
http://hg.python.org/cpython/rev/a0d8ae880ae6

New changeset 3a3ec484ce95 by Brett Cannon in branch 'default':
merge w/ 3.3 for issue #18055
http://hg.python.org/cpython/rev/3a3ec484ce95

--
nosy: +python-dev

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



[issue18055] Stop using imp in IDLE

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the help everyone!

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

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



[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf882390713c by Brett Cannon in branch 'default':
Issue #7732: Move an imp.find_module test from test_import to
http://hg.python.org/cpython/rev/bf882390713c

--

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

Current status (with test_imp stripped out):

 ack imp\.(find|load)_module Lib
Lib/modulefinder.py
482:return imp.find_module(name, path)

Lib/pkgutil.py
189:file, filename, etc = imp.find_module(subname, path)
251:mod = imp.load_module(fullname, self.file, self.filename, 
self.etc)

Lib/pydoc.py
47:#   - imp.load_module() cannot be prevented from clobbering existing
280:module = imp.load_module(name, file, path, (ext, 'r', kind))

Lib/test/test_importhooks.py
118:file, filename, stuff = imp.find_module(subname, path)
132:mod = imp.load_module(fullname, self.file, self.filename, 
self.stuff)

--
versions: +Python 3.4 -Python 3.3

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

The modulefinder usage is directly exposed in its API as the return value of a 
find_module method, which makes removal a pain. Adding Thomas Heller to see 
what he has to say.

The pkgutil usage is in classes that have been deprecated, so don't care.

The rest should be workable and I will file separate bugs.

--
nosy: +theller

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



[issue18157] remove usage of imp.load_module() from pydoc

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

EOM

--
assignee: brett.cannon
components: Library (Lib)
messages: 190765
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: remove usage of imp.load_module() from pydoc
type: behavior
versions: Python 3.4

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



[issue18158] Delete test_importhooks

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

Tests don't serve much of a purpose with test_importlib covering the uses, plus 
the tests are old and are not worth updating.

--
assignee: brett.cannon
components: Tests
messages: 190766
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Delete test_importhooks
versions: Python 3.4

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +Delete test_importhooks

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



[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread João Bernardo

New submission from João Bernardo:

The configparser.RawConfigParser class implements some `get` methods: 
get, getint, getfloat, getboolean

but if any of these get overridden on a subclass(with other arguments) or new 
ones are added (e.g. getlist), there's no way a SectionProxy instance will be 
able to use them.


class DemoParser(ConfigParser):
def getlist(self, section, option):
return self.get(section, option).split()

parser = DemoParser()
parser.read(some_file)

# These 2 lines should be equivalent, like getint, but the
# second doesn't work because of the SectionProxy instance
parser.getlist('some_section', 'foo')
parser['some_section'].getlist('foo')



Reading the code, for SectionProxy, it redefines all the get* methods from 
RawConfigParser, and that looks pretty bad...

A more elegant approach would be to fetch the function on the parser instance 
and bound to the section name with `lambda` or `functools.partial`... Something 
like:


class SectionProxy(...):
...

def __getattr__(self, attr):
if not attr.startswith('get'):
raise AttributeError(attr)
fn = getattr(self._parser, attr)
return lambda *args, **kw: fn(self._name, *args, **kw)

--
components: Library (Lib)
messages: 190767
nosy: JBernardo
priority: normal
severity: normal
status: open
title: ConfigParser getters not available on SectionProxy
type: behavior
versions: Python 3.4

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



[issue14797] Deprecate imp.find_module()/load_module()

2013-06-07 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
dependencies: +remove usage of imp.load_module() from pydoc

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



[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +lukasz.langa

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

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



[issue18160] Packaging more coherent Python

2013-06-07 Thread Tambet Väli

New submission from Tambet Väli:

Hello!

First the issue: my usual way of installing programming environments, languages 
and platforms is to install all the available modules from standard 
repositories, or if there is some all-good or batteries-included 
metapackage, I sure install this. I surely favor installing Python packages 
through standard Linux repositories.

In last year or so, the number of available libraries has grown 'exponentially' 
for Python in the Linux Mint (Debian) repositories. Some of them are not 
trivial to install - by simply installing python-prefixed packages, I got my 
Ubuntu broken, because Window Manager of this version of Linux won't display 
window borders, menus or anything to navigate around if it does not have OpenGL 
working - it just displays window content and one can do almost anything with 
it. I did not trust this installation anymore and I did install a new Linux, 
Debian Mint.

To avoid this kind of problems, there should be python-prefixed metapackages, 
which contain library collections for different kinds of tasks (for example, 
web programming should interface me with all apache, mysql, postgres, etc., 
whereas game programming should give nice collection for sound and video). 
These collections should be safe and work well together, where possible, or be 
usable - because for good programming language, predefined set of good 
libraries is critical. So that I could choose all those metapackages, know that 
I can play around and still my system is safe.

--
components: Installation
messages: 190768
nosy: Tambet.Väli
priority: normal
severity: normal
status: open
title: Packaging more coherent Python
type: enhancement
versions: 3rd party, Python 2.6, 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/issue18160
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18160] Packaging more coherent Python

2013-06-07 Thread Ezio Melotti

Ezio Melotti added the comment:

This bug tracker is not the best place for this kind of requests.  Those 
packages are made by the maintainers of the several distributions, so you 
should suggest this to them.  If you want some kind of feedback from Python 
users/devs you could try the python-list or perhaps python-ideas mailing lists.

(Also having e.g. a python-web package which contains all the possible web 
frameworks doesn't sound like a good idea, since I will likely just use only 
one of them.)

--
nosy: +ezio.melotti
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
versions:  -3rd party, Python 2.6, 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/issue18160
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18161] call fchdir if subprocess.Popen(cwd=integer|fileobject)

2013-06-07 Thread Марк Коренберг

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

Today, subprocess allow to change directory only by using its name. What if I 
have only file descriptor referring to that dir?

It will be nice if such feture will be implemented. Now, I use preexc_fn to 
call os.fchdir() by hand.

We should handle close_fds *AFTER* calling fchdir() :)

--
components: Library (Lib)
messages: 190770
nosy: mmarkk
priority: normal
severity: normal
status: open
title: call fchdir if subprocess.Popen(cwd=integer|fileobject)
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue18148] Make of Python 3.2.2 fails on Solaris SPARC

2013-06-07 Thread Ned Deily

Ned Deily added the comment:

Issue15050, which was closed without resolution, reported a similar issue.  
Also, Issue15963 documents some suggestions and proposed changes to make builds 
easier to configure on legacy platforms like Solaris SPARC.  Perhaps they may 
be of help.  Also, Python 3.2.2 is quite out-of-date.  The current and final 
bug fix release of 3.2 is 3.2.5.  The current maintenance release for Python 3 
is 3.3.2.  Please retry with these.

(I note you selected Cross-Build as a component; for python-dev, that refers 
to building a Python on one platform that is targeted to run on a different 
type of platform.  I assume that this is not the case here, e.g. you are 
building on Solaris SPARC to run on Solaris SPARC, and so Cross-Build does not 
apply.)

--
components: +Build -Cross-Build
nosy: +ned.deily, trent

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



[issue18159] ConfigParser getters not available on SectionProxy

2013-06-07 Thread Łukasz Langa

Łukasz Langa added the comment:

This is a reasonable feature request. Overriding __getattr__ doesn't look like 
the best solution, though. Let me think this over.

--
assignee:  - lukasz.langa

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



[issue5135] Expose simplegeneric function in functools module

2013-06-07 Thread Łukasz Langa

Łukasz Langa added the comment:

For the record, this has been implemented as PEP 443.

--
nosy: +lukasz.langa

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



[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Ned Deily

Ned Deily added the comment:

It seems like this would be a fairly rare situation and, as you note, dependent 
on the underlying file system.  But it would be easy to add a new function to 
the module to clear its cache in cases where it is known this might be a 
problem.  In fact, in Issue11802 a clear_cache function was proposed to solve 
the problem of the cache growing without bounds but that problem was solved by 
the simpler solution of discarding the cache when it gets above 100 entries.

--
keywords: +easy
nosy: +nadeem.vawda, ned.deily, rhettinger
stage:  - needs patch
title: filecmp.cmp() - cache invalidation fails when file modification times 
haven't changed - filecmp.cmp() incorrect results when previously compared 
file is modified within modification time resolution
versions: +Python 3.4 -Python 2.7

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



[issue18150] Duplicate test inside TestSingleDispatch

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a16bebe653b1 by Łukasz Langa in branch 'default':
Fixed #18150: duplicate test inside TestSingleDispatch
http://hg.python.org/cpython/rev/a16bebe653b1

--
nosy: +python-dev

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



[issue18150] Duplicate test inside TestSingleDispatch

2013-06-07 Thread Łukasz Langa

Łukasz Langa added the comment:

Good catch. Thanks for the patch, Vajrasky.

--
assignee:  - lukasz.langa
resolution:  - fixed
status: open - closed

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



[issue18162] Add index attribute to IndexError

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

Give IndexError an index attribute to store the index it was raised for. Since 
it is typically an integer there is no reason to worry about GC and thus using 
a regex.

--
components: Interpreter Core
messages: 190777
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Add index attribute to IndexError
type: enhancement
versions: Python 3.4

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



[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-07 Thread Ned Deily

New submission from Ned Deily:

This is in reference to section 5.6 of the Extending and Embedding Python 
doc.  This has come up recently where third-party projects are using 
LINKEDFORHARED instead of the results of python-config when linking an embedded 
Python into their projects. See discussion in Issue3588. Also, the updates to 
section 5.6 made for Python 3 should be backported to the Python 2.7 doc.

http://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems

http://docs.python.org/2/extending/embedding.html#linking-requirements

--
assignee: ned.deily
components: Documentation
messages: 190779
nosy: ned.deily
priority: normal
severity: normal
stage: needs patch
status: open
title: Embedding Python doc incorrectly refers to LINKFORSHARED
versions: Python 2.7, Python 3.3, Python 3.4

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

KeyError could grow a 'key' attribute for the key that triggered the exception. 
Since keys are expected to be immutable (in order to be hashable) there is no 
GC issue to worry about.

--
components: Interpreter Core
messages: 190778
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Add a 'key' attribute to KeyError
type: enhancement
versions: Python 3.4

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



[issue18166] 'value' attribute for ValueError

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

A 'value attribute for ValueError could store a weakref to the value which 
triggered the exception. It should be a weakref so at to prevent accidental 
prevention of GC of the value.

--
components: Interpreter Core
messages: 190781
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: 'value' attribute for ValueError
type: enhancement
versions: Python 3.4

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



[issue18165] Add 'unexpected_type' to TypeError

2013-06-07 Thread Brett Cannon

New submission from Brett Cannon:

TypeError could grow an 'unexpected_type' attribute to store the type of the 
argument that was used to trigger the exception. Since types are expected to 
not be deleted there is no GC worry.

Having an 'expected' attribute makes no sense in the face of a union of types, 
etc. (unless the assumption of a frozenset is made for the attribute). Plus 
exceptions typically do not contain info on what would have been acceptable 
(although in this instance it may make sense).

--
components: Interpreter Core
messages: 190780
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Add 'unexpected_type' to TypeError
type: enhancement
versions: Python 3.4

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



[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-07 Thread Wichert Akkerman

Changes by Wichert Akkerman wich...@wiggy.net:


--
nosy: +wichert

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread R. David Murray

R. David Murray added the comment:

I don't see how the fact that keys are immutable implies there are no GC 
issues.  A tuple can be involved in a cycle, for example.

--
nosy: +r.david.murray

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue18162] Add index attribute to IndexError

2013-06-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue18166] 'value' attribute for ValueError

2013-06-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue18165] Add 'unexpected_type' to TypeError

2013-06-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue17903] Python launcher for windows should search path for #!/usr/bin/env

2013-06-07 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


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

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Alex Gaynor

Alex Gaynor added the comment:

+1 on this, but it's worth noting that that fix is not 100% correct (though 
it's obviously better than most existing equivilants), it's potentially wrong 
with custom __getattr__, __getattribute__, descriptors.

--
nosy: +alex

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



[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-07 Thread Chris AtLee

New submission from Chris AtLee:

cgi.FieldStorage uses fp.readline(1  16) to read in POSTed file data if no 
content length has been specified. All HTTP clients I've looked at terminate 
the file body with CRLF and then the final MIME boundary. If the file body is 
65,535 bytes, and doesn't contain \n or \r\n, then fp.readline(1  16) will 
return the original 65,535 bytes of the file plus the \r from the final \r\n 
sequence before the final boundary string. Since \r isn't considered a line 
ending, it gets considered as part of the POSTed file data, and you end up with 
an extra \r at the end of the file data.

--
components: Library (Lib)
files: cgi-test-cpython.patch
keywords: patch
messages: 190784
nosy: catlee
priority: normal
severity: normal
status: open
title: cgi.FieldStorage fails to handle multipart/form-data when \r\n appears 
at end of 65535 bytes without other newlines
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file30502/cgi-test-cpython.patch

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



[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-07 Thread Chris AtLee

Chris AtLee added the comment:

This is a possible fix to this issue. It's not as clean as I'd like, but the 
simpler versions I tried could end up with the entire file contents in memory 
for degenerate (or malicious) inputs.

The trick is handling the case where the current line ends with \r. We can't 
know if this is just a normal character in the file, or represents the end of a 
line until we see the start of the next line.

--
Added file: http://bugs.python.org/file30503/cgi-cpython.patch

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

So are you arguing it should be a weakref, or just saying you view the 
statement as false?

--

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Such custom implementations should be updated to support this wonderful new 
attr. :)

--
nosy: +benjamin.peterson

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

And standardizing on an attribute name, of course. =)

--

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



[issue18156] Add an 'attr' attribute to AttributeError

2013-06-07 Thread Brett Cannon

Brett Cannon added the comment:

What Benjamin said.

Adding something like this is mostly about a nicer constructor 
(``AttributeError(attr='meth')``) and automatically creating the message for 
the exception (although that would require another argument like 'object' or 
something to be able to do e.g. 'dict' object has no attribute 'asdfdsff' or 
type object 'dict' has no attribute 'asdfdsf').

--

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



[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for a cache clearing function like the one in re.py

--

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



[issue18163] Add a 'key' attribute to KeyError

2013-06-07 Thread R. David Murray

R. David Murray added the comment:

I'm arguing that the statement is false.  I think that whether or not it should 
be a weakref in this and the other cases depends on whether you think an 
exception object should keep an object alive or not.  It is fairly unlikely 
that a key would get into a cycle with an error message, though certainly not 
impossible.

The keep alive question probably boils down to whether or not we want it to 
be the case that clearing the traceback attribute releases all the extra 
pointers an exception holds on to, or if it is acceptable that an arbitrary 
number of additional attributes might do so.

I'm inclined to think that using weakrefs would make using the attributes more 
complicated for relatively little gain.

--

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



[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-07 Thread Senthil Kumaran

Changes by Senthil Kumaran sent...@uthcode.com:


--
nosy: +orsenthil

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



[issue18168] plistlib output self-sorted dictionary

2013-06-07 Thread halfjuice

New submission from halfjuice:

Even with OrderedDict, the plistlib will still output the dict in its own 
order. Search for sorted(d.items()) in plistlib.py and you will know why. It is 
certainly warm-hearted to sort this before putting it into plist file but I 
think sometimes we just want a customized order.

--
components: Library (Lib)
messages: 190792
nosy: halfjuice
priority: normal
severity: normal
status: open
title: plistlib output self-sorted dictionary
type: behavior
versions: Python 3.3

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



[issue16715] Get rid of IOError. Use OSError instead

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2fe64ce5da05 by Terry Jan Reedy in branch '3.3':
#18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch
http://hg.python.org/cpython/rev/2fe64ce5da05

--

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



[issue18151] Idlelib: update to with open ... except OSError (in 2.7, leave IOError)

2013-06-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2fe64ce5da05 by Terry Jan Reedy in branch '3.3':
#18151, part 1: Backport idlelilb portion of Andrew Svetlov's 3.4 patch
http://hg.python.org/cpython/rev/2fe64ce5da05

New changeset 0be613638523 by Terry Jan Reedy in branch 'default':
#18151 null merge with 3.3.
http://hg.python.org/cpython/rev/0be613638523

--
nosy: +python-dev

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