[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fae92309c3be by Ethan Furman in branch 'default':
Closes issue 17947.  Adds PEP-0435 (Enum, IntEnum) to the stdlib.
http://hg.python.org/cpython/rev/fae92309c3be

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

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread Nick Coghlan

Nick Coghlan added the comment:

That commit looks just a touch incomplete...

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

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



[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 14.06.2013 03:43, Alexander Belopolsky wrote:
 
 Alexander Belopolsky added the comment:
 
 PEP 393 implementation has already added the fast path to decimal encoding:
 
 http://hg.python.org/cpython/diff/8beaa9a37387/Objects/unicodeobject.c#l1.3735
 
 What we can do, however, is improve performance of converting non-ascii 
 numerals by looking up only the first digit's value and converting the rest 
 using simple:
 
 value = code - (first_code - first_value)
 if not 0 = value  10:
raise or fall back to UCD lookup

I'm not sure whether just relying on PEP 393 is good enough.

Of course, you can special case the conversion based on the
kind, but that's only one form of optimization.

Slicing operations don't recheck the max code point
used in the substring. As a result, a slice may very well
be of the UCS2 kind, even though the text itself is ASCII.

Apart from the fast-path based on the string kind,
I think the decimal encoder would also have to scan the
string for non-ASCII code points. If it finds non-ASCII
code points, it would have to call the normalizer and
restart the scan based on the normalized string.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 14 2013)
 Python Projects, Consulting and Support ...   http://www.egenix.com/
 mxODBC.Zope/Plone.Database.Adapter ...   http://zope.egenix.com/
 mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2013-07-01: EuroPython 2013, Florence, Italy ...   17 days to go
2013-07-16: Python Meeting Duesseldorf ... 32 days to go

: Try our mxODBC.Connect Python Database Interface for free ! ::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--

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



[issue17354] TypeError when running setup.py upload --show-response

2013-06-14 Thread Berker Peksag

Berker Peksag added the comment:

Duplicate of issue 12853.

--
nosy: +berker.peksag
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - global name 'r' is not defined in upload.py
type:  - behavior

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



[issue15315] Can't build Python extension with mingw32 on Windows

2013-06-14 Thread Aditya Atluri

Aditya Atluri added the comment:

I have found a hack for the issue.
First, install Microsoft Visual C++ 2010 Redistributable Package.
Second, copy the msvcr100.dll to C:\Python33\libs.

Reason: During compilation, the directory for linking is C:\Python44\libs. Both 
-lpython and -lmsvcr100 are pointed to the same location. So, they have to be 
in the same directory.

I have another problem here.
The log is attached. Is there a change in functions and objects in building 
extensions in C from 2.7 and 3.3?

--
nosy: +adityaatluri
Added file: http://bugs.python.org/file30580/log.txt

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



[issue18204] distutils error showing upload error message

2013-06-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report and patch. This is duplicate of issue 12853.

--
nosy: +berker.peksag
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - global name 'r' is not defined in upload.py
type:  - behavior

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



[issue18208] Wrong bytecode generated for 'in' operation

2013-06-14 Thread Phil Connell

New submission from Phil Connell:

The following two expressions should have the same value:

Python 3.4.0a0 (default:fae92309c3be, Jun 14 2013, 09:29:54) 
[GCC 4.8.0] on linux
Type help, copyright, credits or license for more information.
 1 in [2] == False
False
 (1 in [2]) == False
True


It looks like this is a compiler issue - there shouldn't be a jump if the 'in' 
expression is false:

 dis.dis(1 in [2] == False)
  1   0 LOAD_CONST   0 (1)
  3 LOAD_CONST   1 (2)
  6 BUILD_LIST   1
  9 DUP_TOP 
 10 ROT_THREE   
 11 COMPARE_OP   6 (in)
 14 JUMP_IF_FALSE_OR_POP24
 17 LOAD_CONST   2 (False)
 20 COMPARE_OP   2 (==)
 23 RETURN_VALUE
   24 ROT_TWO 
 25 POP_TOP 
 26 RETURN_VALUE


--
components: Interpreter Core
messages: 191108
nosy: benjamin.peterson, brett.cannon, georg.brandl, isoschiz, ncoghlan, 
pconnell
priority: normal
severity: normal
status: open
title: Wrong bytecode generated for 'in' operation

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



[issue18209] Bytearray type not supported as a mutable object in the fcntl.ioctl function

2013-06-14 Thread Vincent Michel

New submission from Vincent Michel:

The Bytearray type is a mutable object that support the read-write buffer 
interface. The fcntl.ioctl() function is supposed to handle mutable object 
(such as array.array) for the system calls in order to pass object that are 
more than 1024 bytes long.

The problem is that in Python 2.7, Bytearray type is not supported as a mutable 
object in the fcntl.ioctl function. In Python 3.2, it works perfectly.

In the specific case where a large C structure is needed (more than 1024 
bytes), the Bytearray type is extremely useful compare to the array.array type 
that is adapted for C arrays.

Example :

 file_handle = open('/dev/my_device')
 arg = bytearray()
 arg += pack('IL',1,2)
 command = 0
 ioctl(file_handle,command,arg)

Traceback (most recent call last):
  File pyshell#22, line 1, in module
ioctl(file_handle,command,arg)
TypeError: an integer is required

--
components: IO
messages: 191110
nosy: vxgmichel
priority: normal
severity: normal
status: open
title: Bytearray type not supported as a mutable object in the fcntl.ioctl 
function
type: behavior
versions: Python 2.7

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



[issue18203] Replace calls to malloc() with PyMem_Malloc()

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

Kristján Valur Jónsson added the comment:

Keeping the GIL requirement is _very_ useful for PyMem_MALLOC et al.  It allows 
applications to hook in their own monitoring code, accessible from python 
itself, without having to worry about conflicts with python.
even if it were not for the GIL itself, PyMem_Malloc() may have all sorts of 
side effects.

Because of this, and to allow ourselves the flexibility to do all sorts of 
things inside PyMem_Malloc(), at CCP we added a parallel api, 
PyMem_MALLOC_RAW() etc.
This api is guaranteed to delegate directly to the external allocator (malloc 
by default, or an embedding application's supplied allocastor)

We have patched pythoncore in 2.7 in all places there were using malloc 
directly using the file attached to the defect.  Notice how it can patch 
malloc in two different ways, using either regular malloc (in non-sensitive 
areas) and using the raw malloc (in sensitive areas.)

e.g. thread.c contains the following lines in our branch:
#include Python.h

/* patch malloc/free with threadsafe python versions */
#define CCPMEM_PATCH_RAW
#include ccpmem_patch.h

--
Added file: http://bugs.python.org/file30581/ccpmem_patch.h

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



[issue18208] Wrong bytecode generated for 'in' operation

2013-06-14 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

This is one case of chained comparisons:
http://docs.python.org/3/reference/expressions.html#not-in

x = y = z is equivalent to (x = y) and (y = z)
x in y == z is equivalent to (x in y) and (y == z)

There is a jump if the 'in' expression is false, because 'and' should 
short-circuit the second comparison.

--
nosy: +amaury.forgeotdarc
resolution:  - invalid
status: open - pending

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



[issue18210] Problem creating extension in python3.3 with mingw32

2013-06-14 Thread Aditya Atluri

New submission from Aditya Atluri:

I am trying to build c extensions in windows using mingw32. The file hello.c 
works fine with 2.7 but, errors are poping up in 3.3.
Attachments:
[1] log.txt : The errors
[2] hello.c : The C file
[3] setup.py: The setup file

The command I used in cmd is, python setup.py build -c mingw32

--
assignee: eric.araujo
components: Distutils, Extension Modules
files: Build-Bug.zip
messages: 191113
nosy: adityaatluri, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Problem creating extension in python3.3 with mingw32
versions: Python 3.3
Added file: http://bugs.python.org/file30582/Build-Bug.zip

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



[issue18210] Problem creating extension in python3.3 with mingw32

2013-06-14 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Python3 has a new API to create modules: PyModule_Create() and PyModuleDef.

See also:
http://docs.python.org/3/howto/cporting.html?highlight=pymodule_create#module-initialization-and-state

--
nosy: +amaury.forgeotdarc
resolution:  - invalid
status: open - closed

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



[issue15315] Can't build Python extension with mingw32 on Windows

2013-06-14 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Aditya, python3 changed the API to create modules. See issue18210.

--
nosy: +amaury.forgeotdarc

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



[issue12743] C API marshalling doc contains XXX

2013-06-14 Thread Ronald Oussoren

Ronald Oussoren added the comment:

From reading the source of Python/marshal.c it seems that the read function's 
raise an exception on I/O errors, but don't return a specific value (that is, 
sentence starting with It appears that is wrong). 

PyMarshal_ReadLongFromFile calls r_long, this calls r_string without checking 
for errors and calculates the return value from the buffer passed to r_string. 
On I/O errors the buffer may not have been filled at all and contains random 
data (whatever happened to be on the stack).

Likewise for PyMarhal_ReadShortFromFile (through r_short instead of r_long).

r_string does raise an exception on I/O errors or short reads, but reading from 
FILE* and Python objects.

The most straightforward documentation update would be:

* Remove the entire XXX paragraph

* Add text to the documentation for PyMarshal_ReadLongFromFile and 
PyMarshal_ReadShortFromFile:  On error sets the appopriate exception 
(:exc:`EOFError`), but does not return a specific value. Use 
:func:`PyErr_Occurred` to check for errors.

--
nosy: +ronaldoussoren

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



[issue15883] Add Py_errno to work around multiple CRT issue

2013-06-14 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I'd prefer to have new variants of the PyErr_SetFromErrno* functions where the 
errno value is explicitly passed in instead of adding a side-channel for 
passing in the value.

--
nosy: +ronaldoussoren

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



[issue15883] Add Py_errno to work around multiple CRT issue

2013-06-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed with Ronald.

--

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-14 Thread Ronald Oussoren

New submission from Ronald Oussoren:

Changeset a3559c8c614b added -Werror=statement-after-declaration to the CFLAGS 
for compiler that support it. 

This new flags is fine for CPython itself (which is explicitly writting in C89 
style to support older compilers and Microsoft Visual Studio), but the new 
flags also gets used when building 3th-party extensions using distutils and 
might cause problems there when that code uses C99.

I don't have a good solution for this yet, the flag is useful to have when 
building CPython to avoid regressions in C89 support but shouldn't be used when 
building 3th-party extensions.

--
assignee: eric.araujo
components: Build, Distutils
messages: 191119
nosy: benjamin.peterson, eric.araujo, ronaldoussoren, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: -Werror=statement-after-declaration problem
type: behavior
versions: Python 3.4

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-14 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue18199] Windows: support path longer than 260 bytes using \\?\ prefix

2013-06-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, the problem, as you point out, is that \\?\ only works with absolute 
paths, but the stdlib currently works with both absolute and relative paths.
The only reasonable solution right now is to prepend the \\?\ prefix yourself 
(after having resolved the path to absolute).

--

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



[issue14813] Can't build under VS2008 anymore

2013-06-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't have my Windows VM anymore, so unfortunately I won't be able to tell 
you whether there is still a build problem :)

--
status: pending - closed

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



[issue14813] Can't build under VS2008 anymore

2013-06-14 Thread Christian Heimes

Christian Heimes added the comment:

Is there anything left to do or can I close this bug?

--
nosy: +christian.heimes
stage:  - committed/rejected
status: open - pending

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



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

2013-06-14 Thread Jeroen Demeyer

Jeroen Demeyer added the comment:

The problem on the machine that I mentioned was a regression from 2.7.4 to 
2.7.5, probably due to #17086. Whether you consider a patch a bugfix or new 
feature is quite subjective, right? If #17086 is a bugfix, then this can also 
be a bugfix.

--

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



[issue17086] backport cross-build patches to the 2.7 branch

2013-06-14 Thread Jeroen Demeyer

Jeroen Demeyer added the comment:

This is causing breakage, see #17990 and #18000.

--
nosy: +jdemeyer

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



[issue15464] ssl: add set_msg_callback function

2013-06-14 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue18212] No way to check whether Future is finished?

2013-06-14 Thread Ram Rachum

New submission from Ram Rachum:

I have a `Future` and I want to check whether it's in finished state. It seems 
like I don't have a method to do that, right? (I could emulate the existing 
methods for checking Future state, but that would mean fiddling with private 
variables.)

Why not just expose the Future state in a property that automatically acquires 
`self._condition`? (Instead of a horde of methods.)

--
components: Library (Lib)
messages: 191126
nosy: cool-RR
priority: normal
severity: normal
status: open
title: No way to check whether Future is finished?
type: behavior
versions: Python 3.4

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



[issue14813] Can't build under VS2008 anymore

2013-06-14 Thread Stefan Krah

Stefan Krah added the comment:

Building the external packages isn't fixed yet, but I don't know if it's
worth the trouble.

--

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



[issue15172] Document nasm-2.10.01 as required version for openssl

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ee3952965934 by Christian Heimes in branch '3.3':
Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1 on 
Windows
http://hg.python.org/cpython/rev/ee3952965934

New changeset 1b2cbdc9c1d4 by Christian Heimes in branch 'default':
Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1 on 
Windows
http://hg.python.org/cpython/rev/1b2cbdc9c1d4

--
nosy: +python-dev

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



[issue15172] Document nasm-2.10.01 as required version for openssl

2013-06-14 Thread Christian Heimes

Christian Heimes added the comment:

I got bitten by the bug, too. NASM 2.10 or newer as requirement is now 
documented in PCbuild/readme.txt.

--
nosy: +christian.heimes

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



[issue9216] FIPS support for hashlib

2013-06-14 Thread Christian Heimes

Christian Heimes added the comment:

It's out of scope for 3.3 but I'd love to see the feature in 3.4.

--
versions:  -Python 3.3

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



[issue18213] py-bt errors on backtrace

2013-06-14 Thread Phil Muldoon

New submission from Phil Muldoon:

(gdb) py-bt

#2 Frame 0xef8180, for file string, line 1, in module ()
Python Exception type 'exceptions.IOError' (2, 'No such file or directory', 
'string'): 
Error occurred in Python command: (2, 'No such file or directory', 'string')

This is the actual raw frame data:

#0  frapy_pc (self=gdb.Frame at remote 0x71ab28b0, args=0x0) at 
../../gdb/gdb/python/py-frame.c:223
#1  0x003edf4dcfd6 in call_function (oparg=optimized out, 
pp_stack=0x7fffd378) at /usr/src/debug/Python-2.7.3/Python/ceval.c:4082
#2  PyEval_EvalFrameEx (f=f@entry=Frame 0xef8180, for file string, line 1, in 
module (), throwflag=throwflag@entry=0)
at /usr/src/debug/Python-2.7.3/Python/ceval.c:2740
#3  0x003edf4ddcbf in PyEval_EvalCodeEx (
During symbol reading, Multiple children of DIE 0x3904c refer to DIE 0x38d87 as 
their abstract origin.
co=co@entry=0x71adb8b0, globals=globals@entry=
{'g': gdb.Frame at remote 0x71ab28b0, '__builtins__': module at 
remote 0x71ba9ad0, 'GdbRemoveReadlineFinder': classobj at remote 
0x71ac81f0, '__package__': None, 'sys': module at remote 0x71ba9b78, 
'gdb': module at remote 0x71af2130, '__name__': '__main__', '__doc__': 
None}, locals=locals@entry=
{'g': gdb.Frame at remote 0x71ab28b0, '__builtins__': module at 
remote 0x71ba9ad0, 'GdbRemoveReadlineFinder': classobj at remote 
0x71ac81f0, '__package__': None, 'sys': module at remote 0x71ba9b78, 
'gdb': module at remote 0x71af2130, '__name__': '__main__', '__doc__': 
None}, args=args@entry=0x0, argcount=argcount@entry=0, kws=kws@entry=0x0, 
kwcount=kwcount@entry=0, defs=defs@entry=0x0, 
defcount=defcount@entry=0, closure=closure@entry=0x0) at 
/usr/src/debug/Python-2.7.3/Python/ceval.c:3330

--
components: Demos and Tools
messages: 191131
nosy: dmalcolm, pmuldoon
priority: normal
severity: normal
status: open
title: py-bt errors on backtrace
type: crash
versions: Python 2.7

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-14 Thread Jeremy Kloth

Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:


--
nosy: +jkloth

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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2013-06-14 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue11192] test_socket error on AIX

2013-06-14 Thread Delhallt

Delhallt added the comment:

not a python problem, see closed aix issue 
http://www-01.ibm.com/support/docview.wss?uid=isg1IZ57712

--
nosy: +delhallt

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



[issue18213] py-bt errors on backtrace

2013-06-14 Thread Tom Tromey

Changes by Tom Tromey tro...@redhat.com:


--
nosy: +tromey

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread Eli Bendersky

Eli Bendersky added the comment:

Ethan, did you forget to hg add ?

On Fri, Jun 14, 2013 at 12:44 AM, Nick Coghlan rep...@bugs.python.orgwrote:


 Nick Coghlan added the comment:

 That commit looks just a touch incomplete...

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

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


--

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



[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-14 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
nosy: +sbt

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



[issue18208] Wrong bytecode generated for 'in' operation

2013-06-14 Thread Phil Connell

Phil Connell added the comment:

Thanks Amaury. That's quite surprising, but I wouldn't advocate changing such 
long standing behaviour.

I'm closing the issue.

--
status: pending - closed

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



[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-14 Thread Richard Oudkerk

New submission from Richard Oudkerk:

Currently when a module is garbage collected its dict is purged by replacing 
all values except __builtins__ by None.  This helps clear things at shutdown. 

But this can cause problems if it occurs *before* shutdown: if we use a 
function defined in a module which has been garbage collected, then that 
function must not depend on any globals, because they will have been purged.

Usually this problem only occurs with programs which manipulate sys.modules.  
For example when setuptools and nose run tests they like to reset sys.modules 
each time.  See for example

  http://bugs.python.org/issue15881

See also

  http://bugs.python.org/issue16718

The trivial patch attached prevents the purging behaviour for modules gc'ed 
before shutdown begins.  Usually garbage collection will end up clearing the 
module's dict anyway.

I checked the count of refs and blocks reported on exit when running a trivial 
program and a full regrtest (which will cause quite a bit of sys.modules 
manipulation).  The difference caused by the patch is minimal.

Without patch:
  do nothing:[20234 refs, 6582 blocks]
  full regrtest: [92713 refs, 32597 blocks]

With patch:
  do nothing:[20234 refs, 6582 blocks]
  full regrtest: [92821 refs, 32649 blocks]

--
files: prevent-purge-before-shutdown.patch
keywords: patch
messages: 191135
nosy: sbt
priority: normal
severity: normal
status: open
title: Stop purging modules which are garbage collected before shutdown
versions: Python 3.4
Added file: http://bugs.python.org/file30583/prevent-purge-before-shutdown.patch

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



[issue18213] py-bt errors on backtrace with PyRun_SimpleString and friends

2013-06-14 Thread Dave Malcolm

Dave Malcolm added the comment:

pmuldoon: did you truncate the output of bt?  (or did the superior gdb you're 
using do this behind the scenes?  I know you hack on gdb itself, and this looks 
a superior gdb debugging an inferior gdb).

The reason for this error:

Python Exception type 'exceptions.IOError' (2, 'No such file or 
directory', 'string'): 

is that py-bt is attempting to print the line of source code that the frame is 
at, but the source was provided as a string, not a file, presumably due to a 
call to PyRun_SimpleString et al.

Python sets the filename of such code to be the dummy name string, and 
py-bt attempts to use that as a real filename and open it, failing (unless you 
happen to have a file named string in which case it tries to list it).

--
assignee:  - dmalcolm
title: py-bt errors on backtrace - py-bt errors on backtrace with 
PyRun_SimpleString and friends

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread Ethan Furman

Ethan Furman added the comment:

Well, that made me laugh first thing in the morning!

I had nuked and redone my clone, and yeah, forgot to re-add the files.  :/

Trying again...

Commit message was okay?

--

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



[issue18215] Script to test multiple versions of OpenSSL

2013-06-14 Thread Christian Heimes

New submission from Christian Heimes:

I have created a little script that automates downloading, compiling and 
testing multiple versions of OpenSSL. It's a bit of a hack but it suits its 
purpose. Maybe somebody likes to take it from here and turn it into a proper 
tool for Python's Tools/ directory.

From the doc string of the script:

The script

  (1) downloads OpenSSL tar bundle
  (2) extracts it to ../openssl/src/openssl-VERSION/
  (3) compiles OpenSSL
  (4) installs OpenSSL into ../openssl/VERSION/
  (5) forces a recompilation of Python modules using the
  header and library files from ../openssl/VERSION/
  (6) runs Python's test suite

The script must be run with Python's build directory as current working 
directory.

The script uses LD_RUN_PATH, LD_LIBRARY_PATH, CPPFLAGS and LDFLAGS to bend 
search paths for header files and shared libraries. It's known to work on Linux 
with GCC 4.x.

Tested with OpenSSL 0.9.7m, 0.9.8y, 1.0.0k and 1.0.1e.

--
components: Demos and Tools
files: multissl.py
messages: 191139
nosy: christian.heimes, gregory.p.smith, pitrou
priority: low
severity: normal
status: open
title: Script to test multiple versions of OpenSSL
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30584/multissl.py

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



[issue18213] py-bt errors on backtrace with PyRun_SimpleString and friends

2013-06-14 Thread Phil Muldoon

Phil Muldoon added the comment:

Yes I did truncate the output, the backtrace was very long.

This is my scenario:

gdb --args ./gdb somefile

When the superior gdb loads, I did:

(top-gdb) b frapy_pc
(top-gdb) run

In the inferior gdb, I did:

(gdb) start
(gdb) py g = gdb.selected_frame()
(gdb) py print g.pc()

This will hit the breakpoint in the inferior gdb and you will be returned to 
the superior gdb.  I then did:

(top-gdb) py-bt

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18213
___
___
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-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
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-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
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



[issue18162] Add index attribute to IndexError

2013-06-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

___
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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Berker Peksag

Berker Peksag added the comment:

Updated patch adressing Brett's comments.

--
Added file: http://bugs.python.org/file30585/issue18193_v2.diff

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



[issue18170] define built-in exceptions in Python code

2013-06-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon

Brett Cannon added the comment:

Answered Berker's questions from the review. At this point Berker just needs to 
tweak one line in the test and it should then be good to go.

--

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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


Added file: http://bugs.python.org/file30586/issue18193_v3.diff

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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon

Brett Cannon added the comment:

With Berker's nice use of TestCase.subTest() I think the patch is good to go! I 
should hopefully get this checked in today or tomorrow.

--
resolution:  - fixed
stage: patch review - commit review
status: open - pending

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



[issue18212] No way to check whether Future is finished?

2013-06-14 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Do you want something like

f.done() and not f.cancelled() and f.exception() is None

--
nosy: +sbt

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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch, Berker!

--
assignee:  - brett.cannon
stage: commit review - committed/rejected
status: open - closed

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



[issue18193] Move imp.reload() to importlib

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 01da7bf11ca1 by Brett Cannon in branch 'default':
Issue #18193: Add importlib.reload(), documenting (but not
http://hg.python.org/cpython/rev/01da7bf11ca1

--
nosy: +python-dev
status: pending - open

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



[issue17177] Deprecate imp

2013-06-14 Thread Brett Cannon

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


--
title: Document/deprecate imp - Deprecate imp

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon

Brett Cannon added the comment:

Any chance I could get a response to my questions, Barry, soon? I think I can 
finish the rest of the issues related to deprecating imp this weekend if we can 
settle this quickly.

--

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon

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


--
assignee:  - barry

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



[issue18212] No way to check whether Future is finished?

2013-06-14 Thread Ram Rachum

Ram Rachum added the comment:

I guess that'd be equivalent, yes.

--

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

The only argument I have about it is that if someone *does* want to use, it 
should be fairly easily discoverable.  Also, since it's a concrete value, it 
seems a little weird that it's stashed in an abc.

I suppose importlib.machinery.MAGIC is better than 
importlib.abc.SourceLoader.magic

--

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



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

2013-06-14 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon

Brett Cannon added the comment:

I'll put it into importlib.util.MAGIC.

--

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



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

2013-06-14 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 14, 2013, at 07:53 PM, Brett Cannon wrote:

I'll put it into importlib.util.MAGIC.

+1

--

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



[issue18179] SMTP.local_hostname is undocumented

2013-06-14 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
nosy: +akuchling

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



[issue1475523] gettext breaks on plural-forms header

2013-06-14 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1475523
___
___
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-14 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
nosy: +akuchling

___
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



[issue18216] gettext doesn't check MO versions

2013-06-14 Thread Jakub Wilk

New submission from Jakub Wilk:

The MO file format specification[0] reads:
A program seeing an unexpected major revision number should stop reading the 
MO file entirely
But Python doesn't pay attention to versions at all.

As a test-case I attached a MO file with a bogus major revision number. 
msgunfmt correcly rejects such a file:

$ msgunfmt messages.mo 
msgunfmt: file messages.mo is not in GNU .mo format

Yet Python opens it happily:

 import gettext
 t = gettext.GNUTranslations(open(messages.mo, rb))
 t.gettext(foo)
'bar'


[0] http://www.gnu.org/software/gettext/manual/html_node/MO-Files.html

--
components: Library (Lib)
files: messages.mo
messages: 191151
nosy: jwilk
priority: normal
severity: normal
status: open
title: gettext doesn't check MO versions
Added file: http://bugs.python.org/file30587/messages.mo

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor

New submission from Alex Gaynor:

There's a myriad of reasons it's a bad idea:

* Makes code harder to read
* Doesn't play nicely with multiple projects using gettext
* Defeats any attempt at static analysis
* etc...

--
messages: 191152
nosy: alex
priority: normal
severity: normal
status: open
title: Deprecate and remove gettext.install

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



[issue11352] Update cgi module doc

2013-06-14 Thread A.M. Kuchling

Changes by A.M. Kuchling li...@amk.ca:


--
nosy: +akuchling

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



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

2013-06-14 Thread Zachary Ware

Zachary Ware added the comment:

The current patch doesn't apply cleanly anymore and contained an accidental 
reversion of a commit, so I took the liberty of creating an updated version.  
I'll also be leaving comments on Rietveld.

--
Added file: http://bugs.python.org/file30588/issue15968_update.diff

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Barry A. Warsaw

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


--
nosy: +barry

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



[issue12932] filecmp.dircmp does not allow non-shallow comparisons

2013-06-14 Thread Steve Ward

Steve Ward added the comment:

Add input parameter 'shallow' to dircmp.
Use it in phase3 and phase4.
Document it in filecmp.rst.

Did not modify test_filecmp.py.

--
keywords: +patch
Added file: http://bugs.python.org/file30589/issue12932.diff

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

How would you do dynamic switching of translation locale at runtime, then?

--
nosy: +r.david.murray

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor

Alex Gaynor added the comment:

I'm not sure I understand the question. What `install()` does is set 
`__builtins__._` to be gettext. I think people should import the gettext 
function they need.

--

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 14, 2013, at 09:27 PM, R. David Murray wrote:

How would you do dynamic switching of translation locale at runtime, then?

flufl.i18n :)

http://pythonhosted.org/flufl.i18n/

--

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

install says this:

This installs the function _() in Python’s builtins namespace, based on 
domain, localedir, and codeset which are passed to the function translation()

Unless I'm misunderstanding something, this means that the actual value of _ is 
different depending on which domain, localedir, and codeset are in use.  So if 
my application allows the user to *change languages* at runtime, I need to 
*change* what is bound to _.  If my program has assigned a value to _, when 
another part of the application changes the language, what is bound to _ in 
other modules is not going to change.  This is my understanding of why _ is put 
in the global namespace.

Of course, I've only used gettext in one application (that did dynamic language 
switching), so I could just have been doing it wrong...and I suppose there is 
no reason (and some sense) why _ could not be a function that indirects to the 
current language.  Or is that the way it works now and I am just 
misunderstanding the documentation?

--

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread Alex Gaynor

Alex Gaynor added the comment:

I think the code makes what this does much clearer: 
http://hg.python.org/cpython/file/01da7bf11ca1/Lib/gettext.py#l209

There's no reason you can't make your own translation object, and expose it's 
gettext method as as your API, and then you can update the underlying 
translation object to check locales. This is approximately exactly how Django 
works.

--

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



[issue18217] Deprecate and remove gettext.install

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

Which is what Barry's library does.

But rather than just deprecating install, I think we should fix the module so 
that it supports this directly.  That could be as simple as adding a dynamic 
translations class.

What does library code that wants to provide internationalization do, though?  
Right now they could just use _, and tell library users they need to call 
gettext.install in their application.  Is there some other technique that is 
currently used?

--

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



[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-14 Thread tahnoon pasha

tahnoon pasha added the comment:

http://sourceforge.net/p/davmail/bugs/532/

The response back from the davmail software maintainer is that this is a non 
RFC mechanism with a purpose (used as a keep alive on a very slow responding 
server - SELECT can be very slow when getting mail this way.)

I guess it's a request back to imaplib maintainers to see how this might be 
fixed in imaplib. I'm very new to python and not a programmer by trade but if 
its a straightforward fix I'd be happy to have a go if someone can point me in 
the right direction.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18153
___
___
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-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bfd53dcb02ff by Ned Deily in branch 'default':
Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
http://hg.python.org/cpython/rev/bfd53dcb02ff

--
nosy: +python-dev

___
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



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

2013-06-14 Thread Ned Deily

Ned Deily added the comment:

Committed for release in 3.4.0.  Thanks, Mark.

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

___
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



[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-14 Thread Brett Cannon

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


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

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



[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 46ef1d2af352 by Brett Cannon in branch 'default':
Issue #17222: Raise FileExistsError when py_compile.compile would
http://hg.python.org/cpython/rev/46ef1d2af352

--

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon

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


--
assignee: barry - brett.cannon

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



[issue18194] Move imp.source_from_cache/cache_from_source to importlib

2013-06-14 Thread Brett Cannon

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


--
assignee:  - brett.cannon

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-14 Thread Brett Cannon

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


--
assignee:  - brett.cannon

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17907
___
___
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-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6661a8154eb3 by Victor Stinner in branch 'default':
Issue #3329: Add new APIs to customize memory allocators
http://hg.python.org/cpython/rev/6661a8154eb3

--
nosy: +python-dev

___
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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5619bc2d8207 by Brett Cannon in branch 'default':
Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
http://hg.python.org/cpython/rev/5619bc2d8207

--
nosy: +python-dev

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



[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

Oh, by the way there's a bit more of the test infrastructure in python3 
compared to python2.

--

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



[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

Well, the first thing to do would be to write a test that reproduces the 
problem.  There is test infrastructure in Lib/test/test_imaplib.py, but I will 
admit that writing the server side of imaplib tests is not a walk in the park.  
You are welcome to take a look.  If you can figure it out, you'll be on your 
way to being a non-newbie Python programmer :)

--

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



[issue18192] Move imp.get_magic() to importlib

2013-06-14 Thread Brett Cannon

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


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

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



[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-14 Thread STINNER Victor

STINNER Victor added the comment:

I commited my new API to customize memory allocators:

New changeset 6661a8154eb3 by Victor Stinner in branch 'default':
Issue #3329: Add new APIs to customize memory allocators
http://hg.python.org/cpython/rev/6661a8154eb3

I added PyMem_RawMalloc(), PyMem_RawRealloc() and PyMem_RawFree() in the same 
commit. These functions are wrappers to malloc/realloc/free which can be called 
without the GIL held. Using these new functions instead of malloc/realloc/free 
is interesting because the internal functions can be replaced with 
PyMem_SetRawAllocators() and many checks are added in debug mode (ex: check for 
buffer under- and overflow).

--

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



[issue18153] python imaplib - error 'unexpected repsonse'

2013-06-14 Thread R. David Murray

R. David Murray added the comment:

I'll also note that if you start from the traceback and look at the code 
involved in the exception (keeping in mind that since the exception is caught, 
in python2 you lose the original cause, which is therefore in the function 
called in the try block), there is actually a comment in the code that is 
directly on point to this issue.  If we can get a reproducible test case the 
fix will probably be simple.

--

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-14 Thread Brett Cannon

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


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

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset be50f1403f4d by Brett Cannon in branch 'default':
Issue #17907: Document types.ModuleType's constructor and attributes,
http://hg.python.org/cpython/rev/be50f1403f4d

--
nosy: +python-dev

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e7a01c7f69fe by Ethan Furman in branch 'default':
Closes issue 17947.  Adds PEP-0435 (Adding an Enum type to the Python standard 
library).
http://hg.python.org/cpython/rev/e7a01c7f69fe

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

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-06-14 Thread STINNER Victor

STINNER Victor added the comment:

 New changeset e7a01c7f69fe by Ethan Furman in branch 'default':
 Closes issue 17947.  Adds PEP-0435 (Adding an Enum type to the Python 
 standard library).
 http://hg.python.org/cpython/rev/e7a01c7f69fe

Great job :-)

--
nosy: +haypo

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



[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-14 Thread STINNER Victor

STINNER Victor added the comment:

pymem_debugcheckgil.patch: Patch adding check in debug mode to ensure that 
PyMem_Malloc() and PyObject_Malloc() are called with the GIL held.

--
keywords: +patch
Added file: http://bugs.python.org/file30590/pymem_debugcheckgil.patch

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



[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-14 Thread STINNER Victor

STINNER Victor added the comment:

py_finalize.patch: modify Py_Finalize() to destroy the GIL after the last call 
to PyMem_Malloc() or PyObject_Malloc(). For example, 
PyCFunction_Fini() calls PyObject_GC_Del() which calls PyObject_FREE().

--
Added file: http://bugs.python.org/file30591/py_finalize.patch

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



[issue18203] Replace calls to malloc() with PyMem_Malloc()

2013-06-14 Thread STINNER Victor

STINNER Victor added the comment:

pymem_debugcheckgil.patch: oops, a forgot a change in pgenmain.c. New fixed 
patch attached.

--
Added file: http://bugs.python.org/file30592/pymem_debugcheckgil-2.patch

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



[issue17121] SSH upload for distutils

2013-06-14 Thread Tom Prince

Tom Prince added the comment:

 this package performs heavy monkey-patching of distutils to make it
use the system's ssh command.
 I don't think this bodes well for immediate inclusion, especially in
a bugfix release.

It only needs monkey-patching to convince distutils to connect over ssh. This 
is suggesting it handle it natively. (clearly)

--
nosy: +Tom.Prince
versions: +Python 2.7

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



  1   2   >