[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Stefan Krah

Stefan Krah  added the comment:

> The best thing might be to use Emax=10**8-1 and Emin=-(10**8-1) throughout.
> I don't think many applications depend on having Emax=10**9-1. If they do,
> they'll have to use the 64-bit version.

10**6-1 would be another option. The advantage is that it's visually
obvious that the default exponents have changed.

--

___
Python tracker 

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



[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-21 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

2012-03-21 Thread Mark Dickinson

Mark Dickinson  added the comment:

> It would be simple to change line 1112 of pythonrun.c from
>
>if (PyInt_Check(value))
>
> to
>
>if (PyInt_Check(value) || PyLong_Check(value))

Wouldn't you also have to deal with possible errors from the PyInt_AsLong call? 
 E.g., after sys.exit(2**64), an OverflowException would be set.  I don't know 
if not dealing with that exception (perhaps with PyErr_Clear) before exit might 
cause issues, though it seems to work in practice (with the -1 value indicating 
an error being turned into an exit code of 255).

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thanks to the tests, I found the error. Since the bzip2 is block algorithm, 
decompressor need to eat a certain amount of data, so it began to return data. 
Now when reading small chunks turns out premature end of data. I'm working on a 
fix.

--

___
Python tracker 

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



[issue10142] Support for SEEK_HOLE/SEEK_DATA

2012-03-21 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
nosy:  -krisvale

___
Python tracker 

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



[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file24982/bzip2_in_zip_tests.patch

___
Python tracker 

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



[issue9787] Release the TLS lock during allocations

2012-03-21 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Making this low priority since it applies only to platforms without Windows and 
pthread support.

--
priority: normal -> low
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

2012-03-21 Thread Gareth Rees

Gareth Rees  added the comment:

> Wouldn't you also have to deal with possible errors from the PyInt_AsLong 
> call?

Good point. But I note that Python 3 just does

exitcode = (int)PyLong_AsLong(value);

so maybe it's not important to do error handling here.

--

___
Python tracker 

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



[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-21 Thread Nick Coghlan

Nick Coghlan  added the comment:

The reason I don't particularly like the "delegation only" API is that the 
combination of the new memoryview implementation and bytes/mmap/etc to get a 
flat region of memory to play with means you could do some quite interesting 
things entirely at the Python level.

If you couldn't even use memoryview.cast() to change the shape of the exported 
memory, it makes the Python level API clearly inferior in power compared to 
what you can do in C.

--

___
Python tracker 

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



[issue14379] Several traceback docs improvements

2012-03-21 Thread anatoly techtonik

New submission from anatoly techtonik :

Some notes about current `traceback` documentation:
http://docs.python.org/library/traceback.html

1. It needs a mentioning that traceback module works with traceback objects and 
frame objects

2. Functions that work with frames should probably be grouped together

3. Docs for frame function should include info about where to get frames (e.g. 
http://docs.python.org/library/inspect.html#the-interpreter-stack)

4. There is no traceback object description, which should be at 
http://docs.python.org/library/sys.html#sys.exc_info

--
assignee: docs@python
components: Documentation
messages: 156486
nosy: docs@python, techtonik
priority: normal
severity: normal
status: open
title: Several traceback docs improvements

___
Python tracker 

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



[issue3367] Uninitialized value read in parsetok.c

2012-03-21 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Here is a patch for the sysmodule.c problem

--
Added file: http://bugs.python.org/file24983/sysmodule.patch

___
Python tracker 

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



[issue3367] Uninitialized value read in parsetok.c

2012-03-21 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


--
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a95b19b3b4cd by Andrew Svetlov in branch '3.2':
#3573: idle now doesn't hungs if launched as: idle -e 
http://hg.python.org/cpython/rev/a95b19b3b4cd

New changeset cdcd1f7f0882 by Andrew Svetlov in branch 'default':
Merge from 3.2 for issue #3573, fix Misc/NEWS as Ned Deily guess.
http://hg.python.org/cpython/rev/cdcd1f7f0882

--

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a9be863e5734 by Andrew Svetlov in branch '2.7':
#3573: idle now doesn't hungs if launched as: idle -e 
http://hg.python.org/cpython/rev/a9be863e5734

--

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Backported to 3.2 and 2.7

--
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue5066] IDLE documentation for Unix obsolete/incorrect

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue1053687] PyOS_InputHook not called in IDLE subprocess

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Works fine on Ubuntu 11.10 with tk 8.5 for 3.2, 2.7 and 3.3 alpha.

--
nosy: +asvetlov

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2012-03-21 Thread Matt Joiner

Matt Joiner  added the comment:

Updated patch to fix a crash if maxsize isn't given, and add a unit test for 
that.

Possible issues:

 * I've tried to emulate object() by calling PyBaseObject_Type. Not sure if 
there's a more lightweight object for this that just provides the needed 
__hash__ and __eq__ attributes.
 * Not sure if kwd_mark is deallocated correctly.
 * Can't quite work out the best way to wrap the C cache_info() method to 
output the _CacheInfo named tuple. The current mechanism might not be wrapping 
the attributes correctly.

--
keywords: +patch
Added file: http://bugs.python.org/file24984/functools.lru_cache-in-c.patch

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2012-03-21 Thread Meador Inge

Changes by Meador Inge :


--
nosy: +meador.inge

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev

Dmitry Shachnev  added the comment:

(Sorry for not replying earlier).

I think the main priority here is getting things working, not the tests (so I 
have little interest in that).

First of all, should quopri.encodestring() really return bytes? Everything it 
returns is ascii text, obviously.

Then, which types of argument should encode_* functions take (I think str 
should be supported, and it's not a case here as encode_quopri will only accept 
bytes)?

--

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

Well, a patch won't get committed if it lacks tests, so commit would have to 
wait until I have time to write some, then.

The encode_ methods (from email.encoders) take *message* objects as their 
arguments.  MIMEText internally converts a byte string into the appropriate CTE 
*if* you give it a charset (if you don't it later produces an error, but that's 
a different bug).  So if you pass bytes you don't need to call an encode_ 
method separately.

In fact, there's really no reason to call an encode_ method at all, since if 
you pass a string to MIMEText when giving it a non-ascii unicode string, it 
will default to utf-8 and do the appropriate CTE encoding.

But given that they exist in the documented API and exist in Python2, they need 
to be fixed to work in an equivalent fashion in Python3.  I think the only case 
where they would do anything useful is if you don't like Python's default for 
the CTE encoding and want to change it.  (Note that you can accomplish that 
globally by updating the charset alias in the charset module.)

What is your use case, by the way?

--

___
Python tracker 

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



[issue10469] test_socket fails using Visual Studio 2010

2012-03-21 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Added a patch as used by CCP in production.  Covers more WSA cases.

--
nosy: +krisvale
Added file: http://bugs.python.org/file24985/cpython_75849_to_75851.diff

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thanks for applying.
Just note that unlike with svn, with hg it is stronly recommended to apply to 
3.2 first and forward port to 3.3. Something about the DAGs working better.

--

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Will do in next time.
Thank you for instructions.

--

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev

Dmitry Shachnev  added the comment:

> In fact, there's really no reason to call an encode_ method at all, since if 
> you pass a string to MIMEText when giving it a non-ascii unicode string, it 
> will default to utf-8 and do the appropriate CTE encoding.

No, it doesn't:
Python 3.2.3rc1 (default, Mar  9 2012, 23:02:43) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email.mime.text import MIMEText
>>> print(MIMEText('йцукен'))
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

йцукен
>>>

As you can see, it leaves russian text in unmodified state and sets the charset 
to "us-ascii". Should it be considered as a bug?

> What is your use case, by the way?
I'm writing a "send via e-mail" plugin for my ReText editor 
(http://retext.sourceforge.net/).

--

___
Python tracker 

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



[issue978604] wait_variable hangs at exit

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue7057] tkinter doc: more 3.x updates

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval"

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

Oh, you are right.  I even noted that bug in my PyCon talk, but immediately 
forgot about it :(  I do intend to fix it.

You can get it to work by explicitly passing the charset:

  >>> x = MIMEText('йцукен', _charset='utf8')
  >>> str(x)
'Content-Type: text/plain; charset="utf8"\nMIME-Version: 
1.0\nContent-Transfer-Encoding: base64\n\n0LnRhtGD0LrQtdC9\n'

When I asked the use case, I meant specifically for calling encode_quopri, etc. 
 Given the above, do you need it anymore?

--

___
Python tracker 

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



[issue802310] tkFont may reuse font names

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue7652] Merge C version of decimal into py3k.

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 730d5357 by Stefan Krah in branch 'default':
Issue #7652: Integrate the decimal floating point libmpdec library to speed
http://hg.python.org/cpython/rev/730d5357

--
nosy: +python-dev

___
Python tracker 

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



[issue14380] MIMEText should default to utf8 charset if input text contains non-ASCII

2012-03-21 Thread R. David Murray

New submission from R. David Murray :

The MIMEText class of the email package in Python3 requires that a character 
set be specified in order for the resulting email to be valid.  If no character 
set is specified, it currently assumes ascii but puts a unicode payload in the 
message.  Because someone might actually be making use of this bug, I'm not 
going to backport a fix, but I do want to make utf8 the default if there are 
non-ascii characters in the input, in a similar fashion to how it is done for 
headers (well, now that *that* bug has been fixed).

--
assignee: r.david.murray
components: Library (Lib)
keywords: easy
messages: 156501
nosy: mitya57, r.david.murray
priority: normal
severity: normal
stage: test needed
status: open
title: MIMEText should default to utf8 charset if input text contains non-ASCII
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson :

Michael Foord reminded me of this issue recently.  It was discussed on pydev a 
few years back and met with limited enthusiasm.  I speak from experience in 
live production with EVE that this simple change saved us a lot of memory.  
Integral floating point numbers are surprisingly common, falling out of 
mathematical operations and when reading tabular data.  0.0 and 1.0 in 
particular.

--
components: Interpreter Core
files: internfloat.patch
keywords: patch
messages: 156502
nosy: krisvale, michael.foord
priority: normal
severity: normal
status: open
title: Intern certain integral floats for memory savings and performance
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24986/internfloat.patch

___
Python tracker 

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



[issue14308] '_DummyThread' object has no attribute '_Thread__block'

2012-03-21 Thread Dustin Kirkland

Dustin Kirkland  added the comment:

Okay, update...

I did rebuild all of Python from source (actually, I applied it to the Ubuntu 
python2.7 package, rebuilt that locally, and then upgraded to the new python2.7 
deb's.  I could see my change was applied /usr/lib/python2.7/threading.py, and 
I can safely assume that it landed in the pyc as well.

I restarted Apache2 to reload my wsgi script.  But unfortunately, I get the 
same error in /var/log/apache/error.log:

[Wed Mar 21 12:52:36 2012] [error] Exception AttributeError: 
AttributeError("'_DummyThread' object has no attribute '_Thread__block'"
,) in  ignored  
 

So please consider my patch as wrong/bad/insufficient.

Issue is still open, though.  Thanks.

--

___
Python tracker 

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



[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Does it not decrease the performance?

Falling out integral floating point numbers in the mathematical floating point 
calculations seems unlikely. I suggest interning integral floats only in 
conversions str -> float and int -> float. Exception can be made to zero, which 
can result in operations with zero, and which simple tested.

--
nosy: +storchaka

___
Python tracker 

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



[issue12757] undefined name in doctest.py

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 64f1b8ad9214 by R David Murray in branch '3.2':
#12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
http://hg.python.org/cpython/rev/64f1b8ad9214

New changeset ff7957aa01a1 by R David Murray in branch 'default':
Merge #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
http://hg.python.org/cpython/rev/ff7957aa01a1

New changeset c50db3d06116 by R David Murray in branch '2.7':
#12757: Make doctest skipping in -OO mode work with unittest/regrtest -v
http://hg.python.org/cpython/rev/c50db3d06116

--
nosy: +python-dev

___
Python tracker 

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



[issue12757] undefined name in doctest.py

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

Since nobody really cares about this issue :), I went ahead and applied the 
patch that at least avoids the tracebacks.  Someone can open a new bug about 
the duplicated message if they really care.

--
resolution:  -> fixed
stage: test needed -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue14078] Add 'sourceline' property to xml.etree Elements

2012-03-21 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +eli.bendersky

___
Python tracker 

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



[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-21 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +eli.bendersky

___
Python tracker 

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



[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Ned Deily

Ned Deily  added the comment:

Since most people can't reproduce this problem now, let's assume it was a 
problem in the particular version of Tk used.  If someone can reproduce it with 
a current IDLE and Tk, please reopen with details.

--
nosy: +ned.deily
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7738] IDLE hang when tooltip comes up in Linux

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

+1

--

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue14381] Intern certain integral floats for memory savings and performance

2012-03-21 Thread Mark Dickinson

Mark Dickinson  added the comment:

This looks like a duplicate of issue 4024.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue10118] Tkinter does not find font

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue1500773] wm_attributes doesn't take keyword arguments

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson

Daniel Swanson  added the comment:

I opened my IDLE (v. 3.2.2 windows xp) and pasted in
print('ここ')
it printed
ここ
just fine.

--
nosy: +weirdink13

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson

Daniel Swanson  added the comment:

alt-c does nothing for me

--

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

For now unicode BMP has full support in TK while non-BMP characters doesn't 
works.

'こ' character is BMP symbol:
>>> hex(ord('こ'))
'0x3053'
which is lesser than non-BMP space (starting from 0x1).

I have no idea why alt-c doesn't converted to 'ç' (also BMP by the way) and why 
it has been processed by Helary's IDLE. I have no any Mac box nearby to check. 
Sure, 'alt-c' is minor problem if this is problem at all.

--

___
Python tracker 

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



[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

2012-03-21 Thread Mark Dickinson

Mark Dickinson  added the comment:

> so maybe it's not important to do error handling here.

Hmm, seems it's not.  And dealing with OverflowError is hardly likely to be a 
concern in practice anyway.

+1 for the suggested fix.

--

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

I close this issue because:
- current 3.2 and upcoming 3.3 support Japanese characters very well.
- there are problems with non-BMP characters not supported currently but it's 
another issue.

See progress of #14200 and others for non-BMP.

--
assignee:  -> asvetlov
resolution:  -> works for me
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Daniel Swanson

Daniel Swanson  added the comment:

I would say that alt-c is not a problem at all, but, some people might use 'ç' 
more that me, (I never have used 'ç' spesificaly)

--

___
Python tracker 

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



[issue4333] Reworked Dialog.py

2012-03-21 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Ned Deily

Ned Deily  added the comment:

To add to the other comments, problems with input methods using Python 3 and 
Tkinter or IDLE are usually platform-specific issues with the implementation of 
Tk.  In particular, the issue Jean-Christophe reported with Python 3.1.1 was 
very likely due to its use of the old Tk 8.4 (at least with the python.org 
installer).  Current versions of Python 3.2.x for OS X 10.6+ link with the 
newer Tk 8.5, the very latest releases of which by ActiveState contain 
important fixes for input methods using composite characters 
(http://www.python.org/download/mac/tcltk/ has the most up-to-date 
information).  Also, note to the original poster, you either made a typo in the 
bug report ("UFT-8" - it should be "UTF-8") or, if you actually tried that 
locale, it might explain why you had problems.  If someone can reproduce a 
problem with a current Python 3.2.x or later, please re-open with details.

--
nosy: +ned.deily

___
Python tracker 

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



[issue4652] IDLE does not work with Unicode

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Daniel Swanson, maybe my msg156512 was not obvious.
You can use 'ç' without any problem in IDLE — it is BMP character.

See http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters
for details.
tkinter has full support for 'Basic Multilingual Plane' while last planes still 
has a problems.

--

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Pushed as PendingDepricationWarnings for upcoming 3.3

--
assignee:  -> asvetlov
resolution:  -> remind
stage: patch review -> 
versions: +Python 3.3, Python 3.4 -Python 3.2

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d42f264f291e by Andrew Svetlov in branch 'default':
Issue #3035: Unused functions from tkinter are marked as pending peprecated.
http://hg.python.org/cpython/rev/d42f264f291e

--
nosy: +python-dev

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

PendingDeprecationWarning would mean that we are going to remove it "someday".  
If you actually want to remove them in a reasonable time, you should use 
"DeprecationWarning" in 3.3, and then remove them in 3.4.

But is there a need to remove them?  Maybe PendingDeprecationWarning is right 
and we'll remove them in Python4 :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

Also, posting a patch for review before committing is a good idea.  If you 
don't get a review in a reasonable time period, then as a committer you can of 
course go ahead and commit, based on your judgement.

--

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

> with hg it is stronly recommended to apply to 3.2 first and forward port to 
> 3.3.
> Something about the DAGs working better.

The default branch (3.3) are a superset of the changesets in 3.2: all bug fixes 
are in both branches, and new features are in 3.3 only.  We’ve chosen the 
simplest way to achieve that with Mercurial: we commit to 3.2 and merge into 
default.  This ensures that no fix committed to one version is forgotten in the 
other, and also automates the file merging.  That’s just it.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo

Changes by Éric Araujo :


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

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

3-22 00:26

> with hg it is stronly recommended to apply to 3.2 first and forward port to 
> 3.3.
> Something about the DAGs working better.

The default branch (3.3) is a superset of 3.2: all bug fixes are in both 
branches, and new features are in 3.3 only.  We’ve chosen the simplest way to 
achieve that with Mercurial: we commit to 3.2 and merge into default.  This 
ensures that no fix committed to one version is forgotten in the other, and 
also automates the file merging.  That’s just it.

--

___
Python tracker 

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



[issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s))

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

(Edited for typos, ignore the “3-22 00:26” that comes from I don’t know where)

--

___
Python tracker 

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



[issue14204] Support for the NPN extension to TLS/SSL

2012-03-21 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2514a4e2b3ce by Antoine Pitrou in branch 'default':
Issue #14204: The ssl module now has support for the Next Protocol Negotiation 
extension, if available in the underlying OpenSSL library.
http://hg.python.org/cpython/rev/2514a4e2b3ce

--
nosy: +python-dev

___
Python tracker 

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



[issue14382] test_unittest crashes loading 'unittest.test.testmock' when run from installed Python

2012-03-21 Thread Ned Deily

New submission from Ned Deily :

When run from an installed location, rather than from the build directory, 
test_unittest now crashes:

$ ./root/bin/python3.3 -m test -w -uall,-largefile test_unittest
[1/1] test_unittest
test test_unittest crashed -- Traceback (most recent call last):
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/regrtest.py",
 line 1236, in runtest_inner
indirect_test()
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/test_unittest.py",
 line 8, in test_main
support.run_unittest(unittest.test.suite())
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/test/__init__.py",
 line 17, in suite
suite.addTest(loader.loadTestsFromName('unittest.test.testmock'))
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/loader.py",
 line 105, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testmock'

1 test failed:
test_unittest
Re-running failed tests in verbose mode
Re-running test 'test_unittest' in verbose mode
test test_unittest crashed -- Traceback (most recent call last):
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/regrtest.py",
 line 1236, in runtest_inner
indirect_test()
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/test/test_unittest.py",
 line 8, in test_main
support.run_unittest(unittest.test.suite())
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/test/__init__.py",
 line 17, in suite
suite.addTest(loader.loadTestsFromName('unittest.test.testmock'))
  File 
"/py/dev/default/b10.7_t10.7_x4.2_cclang_d/unix/root/lib/python3.3/unittest/loader.py",
 line 105, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testmock'

--
components: Tests
messages: 156526
nosy: michael.foord, ned.deily
priority: normal
severity: normal
stage: needs patch
status: open
title: test_unittest crashes loading 'unittest.test.testmock' when run from 
installed Python
versions: Python 3.3

___
Python tracker 

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



[issue13959] Re-implement parts of imp in pure Python

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

> Once things all the import stuff currently on the table is wrapped up,
> I'll probably work on switching things over to using importlib directly.

Please leave distutils unchanged; we don’t clean it up or improve it in any 
way, it’s bugfixes only.  Changing packaging is fine; I’ll just keep using the 
imp module in the distutils2-python3 backport.

--

___
Python tracker 

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



[issue14204] Support for the NPN extension to TLS/SSL

2012-03-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Closing since the buildbots don't seem to show any new failures after the 
commit. Thank you for your contribution!

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

___
Python tracker 

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



[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor

New submission from STINNER Victor :

Attached patch adds the followig functions:
 - _PyDict_GetItemId()
 - _PyDict_SetItemId()
 - _PyType_LookupId() (private)

And it uses identifiers in ceval.c and typeobject.c where it is revelant.

I expect a small speedup.

The patch does also simplify the code: use the new identifier API instead of an 
explicit static keyword and call to PyUnicode_InternXXX.

I can split the patch into smaller parts if you prefer.

--
components: Interpreter Core
files: identifier.patch
keywords: patch
messages: 156529
nosy: haypo, loewis, pitrou
priority: normal
severity: normal
status: open
title: Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c
type: performance
versions: Python 3.3
Added file: http://bugs.python.org/file24987/identifier.patch

___
Python tracker 

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



[issue13959] Re-implement parts of imp in pure Python

2012-03-21 Thread Eric Snow

Eric Snow  added the comment:

Sounds good.  It will be a while before we get there, but at that point I was 
already planning on getting in touch with the maintainers of relevant modules 
before messing with them.

--

___
Python tracker 

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



[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter

2012-03-21 Thread Miki Tebeka

New submission from Miki Tebeka :

This way they will behave more like getattr and the dictionary get.

If default is not specified, then if the item/attr not found, an execption will 
be raised, which is the current behavior.

However if default is specified, then return it in case when item/attr not 
found - default value will be returned.

I wanted this when trying to get configuration from a list of objects. I'd like 
to do
get = attrgetter('foo', None)
return get(args) or get(config) or get(env)

--
components: Library (Lib)
messages: 156531
nosy: tebeka
priority: normal
severity: normal
status: open
title: Add "default" kw argument to operator.itemgetter and operator.attrgetter
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file24987/identifier.patch

___
Python tracker 

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



[issue14383] Generalize the use of _Py_IDENTIFIER in ceval.c and typeobject.c

2012-03-21 Thread STINNER Victor

STINNER Victor  added the comment:

Oops, my patch contained an unrelated change. I attach a new patch. I commited 
the change:

changeset:   75866:
tag: tip
user:Victor Stinner 
date:Thu Mar 22 02:09:08 2012 +0100
files:   Objects/object.c
description:
Micro-optimize PyObject_GetAttrString()

--
Added file: http://bugs.python.org/file24988/identifier.patch

___
Python tracker 

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



[issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter

2012-03-21 Thread R. David Murray

R. David Murray  added the comment:

Thanks for the suggestion. 

It is an interesting idea, but there are some issues.  attrgetter and 
itemgetter can take more than one key.  It would probably make more sense to 
have the returned function be the one that takes the default, but in that case 
you might as well just use getattr.  If we did accept a keyword-only argument 
for a default, what does the default mean if there is more than one key?  And 
what if there are dotted names in the attrgetter keys?

I'm inclined to reject this as too complex for a marginal a use case.  But 
perhaps a python-ideas discussion would be appropriate.

--
nosy: +r.david.murray
type:  -> enhancement
versions:  -Python 3.4

___
Python tracker 

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



[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor

New submission from STINNER Victor :

CPython expects __builtins__ to be a dict, but it is interesting to be able to 
use another type. For example, my pysandbox project (sandbox to secure Python) 
requires a read-only mapping for __builtins__.

The PEP 416 was rejected, so there is no builtin frozendict type, but it looks 
like the dictproxy type will be exposed as a public type.

Attached patch uses PyDict_CheckExact() to check if __builtins__ is a dict and 
add a "slow-path" for other types. The overhead on runtime performance should 
be very low (near zero), PyDict_CheckExact() just dereference a pointer (to 
read the object type) and compare two pointers.

The patch depends on issue #14383 patch (identifier.patch) for the 
__build_class__ identifier. I can write a new patch without this dependency if 
needed.

--
components: Interpreter Core
files: builtins.patch
keywords: patch
messages: 156534
nosy: haypo
priority: normal
severity: normal
status: open
title: Support other types than dict for __builtins__
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24989/builtins.patch

___
Python tracker 

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



[issue3035] Removing apparently unwanted functions from Tkinter

2012-03-21 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I do not know or directly use tkinter enough to judge the proposed removal. 
(Although they do look like they might be useless.) I would like to see a 
little more explanation on the record. Who wrote
"# XXX I don't like these -- take them away"?

Also, deprecation messages often give the alternative or replacement to what is 
being removed. Are these so useless that there is no replacement?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue14386] Expose dictproxy as a public type

2012-03-21 Thread STINNER Victor

New submission from STINNER Victor :

Attached patch makes the dictproxy type public. Example:

$ ./python 
Python 3.3.0a1+ (default:059489cec7b9+, Mar 22 2012, 02:45:36) 
>>> d=dictproxy({1:2})
>>> d
dict_proxy({1: 2})
>>> d[1]
2
>>> d[1]=3
TypeError: 'dictproxy' object does not support item assignment
>>> del d[1]
TypeError: 'dictproxy' object doesn't support item deletion
>>> d.copy()
{1: 2}
>>> dir(d)
[..., '__getitem__', 'copy', 'get', 'items', 'keys', 'values']

The patch doesn't have any test or documentation yet.

See also the (now rejected) PEP 416 (frozendict).

--
components: Interpreter Core
files: dictproxy.patch
keywords: patch
messages: 156536
nosy: gvanrossum, haypo
priority: normal
severity: normal
status: open
title: Expose dictproxy as a public type
versions: Python 3.3
Added file: http://bugs.python.org/file24990/dictproxy.patch

___
Python tracker 

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



[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor

STINNER Victor  added the comment:

See the issue #14386 which exposes dictproxy as a public type.

--

___
Python tracker 

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



[issue14386] Expose dictproxy as a public type

2012-03-21 Thread STINNER Victor

STINNER Victor  added the comment:

dictproxy.patch: proxy_new() should check that dict is a dict (PyDict_Check).

--

___
Python tracker 

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



[issue14386] Expose dictproxy as a public type

2012-03-21 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue14385] Support other types than dict for __builtins__

2012-03-21 Thread STINNER Victor

STINNER Victor  added the comment:

Example combining patches of #14385 and #14386 to run code with read-only 
__builtins__:
--- test.py -
ns={'__builtins__': __builtins__.__dict__}
exec(compile("__builtins__['superglobal']=1; print(superglobal)", "test", 
"exec"), ns)
ns={'__builtins__': dictproxy(__builtins__.__dict__)}
exec(compile("__builtins__['superglobal']=2; print(superglobal)", "test", 
"exec"), ns)
--- end of test.py -

Output:

$ ./python test.py
1
Traceback (most recent call last):
  File "x.py", line 4, in 
exec(compile("__builtins__['superglobal']=1; print(superglobal)", "test", 
"exec"), ns)
  File "test", line 1, in 
TypeError: 'dictproxy' object does not support item assignment


Note: this protection is not enough to secure Python, but it is an important 
part of a Python sandbox.

--

___
Python tracker 

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



[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

Reopening for 2.7.  See http://bugs.python.org/issue13952#msg153106 and also 
Terry’s proposal in the last message.

--
nosy: +eric.araujo
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

2012-03-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +pitrou

___
Python tracker 

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



[issue14357] Distutils2 does not work with virtualenv

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

Can you give more info about your OS, ~/.pydistutils.cfg, etc.?

--

___
Python tracker 

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



[issue14378] __future__ imports fail when compiling from python ast

2012-03-21 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev

Dmitry Shachnev  added the comment:

> You can get it to work by explicitly passing the charset
Thanks, I didn't know about that.

> Given the above, do you need it anymore?
No.

--

___
Python tracker 

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



[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

2012-03-21 Thread Éric Araujo

Changes by Éric Araujo :


--
versions:  -Python 2.6

___
Python tracker 

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



[issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval"

2012-03-21 Thread Éric Araujo

Éric Araujo  added the comment:

Andrew, you can take over this issue if you want.  As you’ve discovered with 
#3035, our deprecation process is a bit unclear (this was discussed on 
python-dev a few months ago), so using PendingDeprecationWarning vs. 
DeprecationWarning is a judgment call.

--

___
Python tracker 

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



[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2012-03-21 Thread Dmitry Shachnev

Dmitry Shachnev  added the comment:

> Then, which types of argument should encode_* functions take (I think str 
> should be supported, and it's not a case here as encode_quopri will only 
> accept bytes)?

I meant which types of *payload* should they accept. Here's an illustration of 
what I mean: http://paste.ubuntu.com/894731/.

--

___
Python tracker 

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