[issue16991] Add OrderedDict written in C

2013-06-21 Thread Eric Snow

Eric Snow added the comment:

I figured out what I hope were the last memory-related issues.  Apparently 
tp_traverse is not inherited if tp_flags is set.  I had it set on all the view 
types and all the iterator types.  So during GC it would blow up when it tried 
to call tp_traverse.

Everything is looking pretty good so I'm attaching the latest diff.

--
Added file: http://bugs.python.org/file30661/cOrderedDict.diff

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



[issue16991] Add OrderedDict written in C

2013-06-21 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


Removed file: http://bugs.python.org/file30468/cOrderedDict.diff

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



[issue17630] Create a pure Python zipfile importer

2013-06-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Times in a ZIP files have a two-seconds resolution (in the old DOS FAT format: 
5 bits for the hours, 6 bits for the minutes, and only 5 bits left for the 
seconds)
Some fuziness logic is needed when comparing against a time_t.

--
nosy: +amaury.forgeotdarc

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



[issue3354] Improve error reporting for the argument parsing C API

2013-06-21 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +larry

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



[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Tillmann Karras

Changes by Tillmann Karras til...@gmail.com:


--
nosy: +Tilka

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Does anyone actually check for instance-ness of super objects? I would never 
have thought of such an idiom.

--
nosy: +benjamin.peterson, pitrou

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



[issue14776] Add SystemTap static markers

2013-06-21 Thread Robert Buchholz

Changes by Robert Buchholz r...@freitagsrunde.org:


--
nosy: +Robert.Buchholz

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



[issue13405] Add DTrace probes

2013-06-21 Thread Robert Buchholz

Changes by Robert Buchholz r...@freitagsrunde.org:


--
nosy: +Robert.Buchholz

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



[issue14776] Add SystemTap static markers

2013-06-21 Thread Robert Buchholz

Robert Buchholz added the comment:

It's been a year and the 3.4 alpha is approaching. What's the status of 
upstream inclusion of this patch?

--

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



[issue14776] Add SystemTap static markers

2013-06-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note that feature freeze happens after the first /beta/, so the alpha release 
isn't a showstopper.

--

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



[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


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

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



[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor

STINNER Victor added the comment:

@skrah: What is the status of this issue?

--

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



[issue14776] Add SystemTap static markers

2013-06-21 Thread Christian Heimes

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


--
nosy: +christian.heimes
versions: +Python 3.4 -Python 3.3

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread Christian Heimes

New submission from Christian Heimes:

I suggest that posixpath.c:_fd_converter() should  PyObject_AsFileDescriptor() 
to convert a Python object to a fd integer. With PyObject_AsFileDescriptor() 
functions such as os.chmod() can be called with an opened file as first 
argument:

Now:

  with open(somefile) as f:
 os.chmod(f.fileno(), 0o644)

With PyObject_AsFileDescriptor():

with open(somefile) as f:
 os.chmod(f, 0o644)

_fd_converter() also has more elaborate overflow checks. These checks should be 
added to PyObject_AsFileDescriptor(), too.

--
messages: 191563
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()
type: enhancement
versions: Python 3.4

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Do we want the low-level os.write() to work with file objects, or sockets?

--
nosy: +amaury.forgeotdarc

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread STINNER Victor

STINNER Victor added the comment:

This issue looks to be related to #18269.

--
nosy: +haypo

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk

New submission from shwouchk:

Consider this:

$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
 import multiprocessing as mp
 q = mp.Queue()
 while True:
   q.put(1)
   q.get_nowait()

Traceback (most recent call last):
  File stdin, line 3, in module
  File /usr/lib/python2.7/multiprocessing/queues.py, line 152, in get_nowait
return self.get(False)
  File /usr/lib/python2.7/multiprocessing/queues.py, line 134, in get
raise Empty
Queue.Empty

I believe that similar behavior could be seen in cPython 2.7.3 with the 
Queue.Queue implementation, but I can't reproduce it now and don't have the old 
version to test. And it is irrelevant anyway since it work correctly now.

I think this behavior is counter intuitive and hampers the development of code 
that performs stuff with queues in a generic way and works in both single and 
multi-process environments.

--
components: IO, Interpreter Core
messages: 191566
nosy: shwouchk
priority: normal
severity: normal
status: open
title: Queue is empty right after put from the same process/thread
type: behavior
versions: Python 2.7

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



[issue18220] In itertools.islice() make prototype like in help()

2013-06-21 Thread A.M. Kuchling

A.M. Kuchling added the comment:

This bug is entirely too cryptic.  What exactly is the problem you're trying to 
fix?

--
nosy: +akuchling

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



[issue18247] Add Lib/test/data/ to .gitignore

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68e1eec01113 by Andrew Kuchling in branch 'default':
Closes #18247: add Lib/test/data/* to .gitignore
http://hg.python.org/cpython/rev/68e1eec01113

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

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread Christian Heimes

Christian Heimes added the comment:

os.write() already works with file and sockets object but you have to call 
ob.fileno() first. The select module uses PyObject_AsFileDescriptor() all over 
the module to get the file descriptor number from file and socket objects.

Let's unify os' and select's behavior!

--

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



[issue18218] In itertools.count() clarify the starting point

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12478f549ed8 by Andrew Kuchling in branch '3.3':
Closes #18218: use correct variable name for starting point
http://hg.python.org/cpython/rev/12478f549ed8

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

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



[issue18239] In itertools docstring update arguments in count() example

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad0b44cdae41 by Andrew Kuchling in branch '3.3':
Closes #18239: correct description of count() in module docstring
http://hg.python.org/cpython/rev/ad0b44cdae41

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

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

 Let's unify os' and select's behavior!
OK, let's do that on Windows first :-)

--

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread Christian Heimes

Christian Heimes added the comment:

 OK, let's do that on Windows first :-)

Gotcha :( Damn you winsock.dll!

--

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



[issue18276] posixpath.c:_fd_converter() should use PyObject_AsFileDescriptor()

2013-06-21 Thread STINNER Victor

STINNER Victor added the comment:

 OK, let's do that on Windows first :-)

For the PEP 433, I did something like that in os.get_cloexec() and 
os.set_cloexec():

http://hg.python.org/features/pep-433/file/f32c2b09f332/Modules/posixmodule.c#l10198

On Windows, I added two code paths: one for HANDLE (to support sockets), one 
for file descriptors (classic files). It means that you need a C function 
supports HANDLE as input type, rather than int (file descriptor).

Can't we raise a nice error message when we get a socket, whereas the function 
does not support HANDLE? What is the current message on Windows when passing 
sock.fileno() to a function expecting a file descriptor? Would it be worse if 
Python implictly call .fileno() on a socket?

--

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



[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Stefan Krah

Stefan Krah added the comment:

Basically someone has to review the patch and commit it. I'm not really
using ctypes, so for me a decent review would take a while.

--

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



[issue17913] stat.filemode returns - for sockets and unknown types

2013-06-21 Thread Richard Milne

Richard Milne added the comment:

I've added some changes to the module which (I believe) not only fix this bug, 
but add the reverse function, converting a permission string to a number.

The diff was made against Lib/stat.py @ 84234:f32dad3a243e, which was the most 
recent version of the file I could find. My patch is intended for Python 2.7, 
but should work on 3.3 (though I haven't tested it there).

My 'filemode' function ('mode2str') is not as short and elegant as the current 
one, but then it should fix this bug, and it doesn't require duplicating so 
many of the module's constants in a lookup table. It also includes a check to 
make sure mode characters (like 'p', 's', '-', etc) are defined for every 
numeric mode in the module... so long as their names start with the prefix 
S_IF (... which may lead to conflicts with issue 17924).

I may also have gone beyond the scope, and added code to recognise the git link 
file mode (see 
http://stackoverflow.com/questions/737673/how-to-read-the-mode-field-of-git-ls-trees-output),
 but this extension should be easy to recognise and remove.

Lastly, there are some minor whitespace and sorting changes (notably, S_IF* 
defs sorted by mode num).

As for tests, I couldn't find any for this module in Lib/test. I have at least 
included a command line test which exhaustively tests the encoding and decoding 
of every valid file mode. If you want, I've even a test script which creates an 
example of every valid file type (apart from socket and git link types), with 
every valid file mode!

--
nosy: +rmilne
versions: +Python 2.7
Added file: http://bugs.python.org/file30662/file_modes_strings.patch

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



[issue18269] Add new parameter format for converter function w/ position number

2013-06-21 Thread anatoly techtonik

anatoly techtonik added the comment:

This is more sophisticated that I thought. Thank for the explanation.

--

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



[issue17913] stat.filemode returns - for sockets and unknown types

2013-06-21 Thread Richard Milne

Richard Milne added the comment:

I already see my name change will cause problems. The tarfile.py 
(Lib/tarfile.py:277) module relies on the function being named 'filemode'.

As the stat.filemode function is relatively new, I don't know how many other 
modules rely on it. I changed the name because I thought the new name 
(mode2str) better described what the function does, and is orthogonal to the 
reverse function (str2mode).

But, of course, I've no issue with whatever the functions are finally named... 
I'll leave the decision to someone with a bit more experience.

--

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



[issue18274] python: not found

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

It would either be with freebsd-ports for having packaged Mesa incorrectly or 
with Mesa for having something wrong with their build setup.

--

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



[issue17630] Create a pure Python zipfile importer

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

A two second granularity? Ugh. That will require a new (possibly private) API 
to abstract that out in order to handle that case. What a pain. While I look 
into that if people can look at the code and let me know if they see anything 
wrong with it, hard to understand, or a way to improve I would appreciate it.

--

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

So I have a use case for this actually. =)

http://bugs.python.org/issue17621 is about trying to finally add a lazy mixin 
to importlib so people stop asking for it. I have a version already written 
externally at 
https://code.google.com/p/importers/source/browse/importers/lazy.py. Part of 
the trick of making it work is having a way to drop the lazy mixin from the 
loader MRO for all future uses (which is important for reloads) is to assign 
__loader__ to super(Mixin, self). The problem is that if you use isinstance on 
that loader with any of the ABCs in importlib.abc it will always come back 
false no matter whether the interface is actually implemented or not.

While I consider it a marginal thing for people to do (importlib.abc is for 
making sure people implement the right methods and providing default 
implementations, not for interface checking), I'm sure someone will do it and I 
would like one less possible warning in any future docs about this lazy mixin 
regarding isinstance checks.

--
priority: normal - low

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 http://bugs.python.org/issue17621 is about trying to finally add a
 lazy mixin to importlib so people stop asking for it. I have a
 version already written externally at
 https://code.google.com/p/importers/source/browse/importers/lazy.py.
 Part of the trick of making it work is having a way to drop the lazy
 mixin from the loader MRO for all future uses (which is important
 for reloads) is to assign __loader__ to super(Mixin, self).

That sounds like a better job for a proxy rather than a mixin.

--

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



[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The correct format string for Py_ssize_t with sprintf is 
%PY_FORMAT_SIZE_Td (defined and explained in pyport.h).

--
nosy: +ronaldoussoren

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



[issue3354] Improve error reporting for the argument parsing C API

2013-06-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

See also #18269.

--
nosy: +ronaldoussoren

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



[issue18269] Add new parameter format for converter function w/ position number

2013-06-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I don't think that a new parameter format is sufficient. For the message in 
this call the new parameter isn't even needed, you'd just have to ensure that 
enough information is available in convertsimple to create a more useful 
message.

That said, that is far from a trivial change, more so because the PyArg_Parse 
family of functions can parse fairly complicated argument structures in one go 
(such as using ``PyArg_Parse(args, (si), host, port)`` to unpack the tuple 
in the first (and only) argument).

--
nosy: +ronaldoussoren

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

The proposal to change json from using repr() to str() has unknown dangers.

I don't want the str() of IntEnum to return just the decimal string (e.g. 
42), since that breaks half of the usefulness of using the enum in the first 
place -- people will write print(x) and be confused.

Unfortunately the json module doesn't have a way to define *in the object* how 
to customize its serialization -- this is always done in the json 
encoder/decoder.  Maybe we can add something to the JSON encoder and decoder 
class that looks for a special method, e.g. __json_encode__ etc.?  (OR maybe 
this would be a use case for PEP 443?)

--
nosy: +gvanrossum

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Modifying json to use str(int(value)) (if it detects isinstance(value, int)) is 
fine with me too.

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

And similar for floats, really.

--

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



[issue13226] Expose RTLD_* constants in the posix module

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1da78c7d382b by Andrew Kuchling in branch 'default':
#13226: update references from ctypes/DLFCN modules to os module
http://hg.python.org/cpython/rev/1da78c7d382b

--

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



[issue12716] Reorganize os docs for files/dirs/fds

2013-06-21 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Mike Hoy: a later patch (http://bugs.python.org/issue14626) changed the API in 
the os module so that the wrappers for *at() functions went away; fchmod() now 
takes several different forms of argument and calls the correct function under 
the hood.

--
nosy: +akuchling

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

On Fri, Jun 21, 2013 at 10:02 AM, Antoine Pitrou rep...@bugs.python.orgwrote:


 Antoine Pitrou added the comment:

  http://bugs.python.org/issue17621 is about trying to finally add a
  lazy mixin to importlib so people stop asking for it. I have a
  version already written externally at
  https://code.google.com/p/importers/source/browse/importers/lazy.py.
  Part of the trick of making it work is having a way to drop the lazy
  mixin from the loader MRO for all future uses (which is important
  for reloads) is to assign __loader__ to super(Mixin, self).

 That sounds like a better job for a proxy rather than a mixin.


I'm attracted to the idea of making a loader lazy by simply doing something
like ``class LazySourceFileLoader(LazyMixin, SourceFileLoader): ...``. The
key thing is that it doesn't require proxying the constructor in situations
like PathEntryFinder where the finder is going to be making your loader
instance (or at least calling the object). I mean you could override
__call__ to store the arguments and then simply use them when needed to
construct the real loader, but I don't know if that makes the code simpler
without actually coding it up.

--

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I'm attracted to the idea of making a loader lazy by simply doing
 something
 like ``class LazySourceFileLoader(LazyMixin, SourceFileLoader):
 ...``.

But then you have to make a specific Lazy subclass for each delegated
loader implementation. With a proxy class you would simply proxy each
loader instance:

existing_loader = SourceFileLoader(...)
lazy_loader = LazyLoader(existing_loader)
...

--

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



[issue12716] Reorganize os docs for files/dirs/fds

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 88edac3bc2fc by Andrew Kuchling in branch 'default':
#12716: reorganize docs for os module a bit
http://hg.python.org/cpython/rev/88edac3bc2fc

--
nosy: +python-dev

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



[issue12716] Reorganize os docs for files/dirs/fds

2013-06-21 Thread A.M. Kuchling

A.M. Kuchling added the comment:

I didn't see any other constants that aren't close to the function they're used 
with.  Can this issue be closed, or are there other changes to make?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12716
___
___
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-21 Thread Éric Araujo

Éric Araujo added the comment:

Working with an explicit translator object sounds much better to me too.  I 
haven’t used it yet, but Babel has been on my radar for long, and does that 
(like flufl.i18n from what I can tell).

--
nosy: +eric.araujo

___
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



[issue11016] Re-implementation of the stat module in C

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f8ff61f44aca by Christian Heimes in branch '3.3':
Add tests for untested features of the 'stat' module (part of issue #11016)
http://hg.python.org/cpython/rev/f8ff61f44aca

New changeset d15aee50e4a0 by Christian Heimes in branch 'default':
Add tests for untested features of the 'stat' module (part of issue #11016)
http://hg.python.org/cpython/rev/d15aee50e4a0

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11016
___
___
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-21 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 21, 2013, at 04:18 PM, Éric Araujo wrote:

Working with an explicit translator object sounds much better to me too.  I
haven’t used it yet, but Babel has been on my radar for long, and does that
(like flufl.i18n from what I can tell).

flufl.enum didn't make it into the stdlib.  Think I'd have more luck with
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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-06-21 Thread Éric Araujo

Éric Araujo added the comment:

Can you suggest how to fix this?

--
components: +Build -Extension Modules
nosy: +eric.araujo
versions: +Python 3.3, Python 3.4 -Python 3.5

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



[issue18278] Clarify the loader requirements for importlib.machinery.FileFinder

2013-06-21 Thread Brett Cannon

New submission from Brett Cannon:

Should specify the loader needs to be a callable which accepts two arguments: 
module name and found file path.

--
assignee: brett.cannon
components: Documentation
messages: 191599
nosy: brett.cannon
priority: low
severity: normal
stage: needs patch
status: open
title: Clarify the loader requirements for importlib.machinery.FileFinder
versions: Python 3.3, Python 3.4

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



[issue18220] In itertools.islice() make prototype like in help()

2013-06-21 Thread py.user

py.user added the comment:

[guest@localhost cpython]$ ./python
Python 3.4.0a0 (default, Jun 22 2013, 04:24:17) 
[GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux
Type help, copyright, credits or license for more information.
 
 import itertools
 print(range.__doc__, slice.__doc__, itertools.islice.__doc__, 
 sep='\n***\n') 
range(stop) - range object
range(start, stop[, step]) - range object

Returns a virtual sequence of numbers from start to stop by step.
***
slice(stop)
slice(start, stop[, step])

Create a slice object.  This is used for extended slicing (e.g. a[0:10:2]).
***
islice(iterable, [start,] stop [, step]) -- islice object

Return an iterator whose next() method returns selected values from an
iterable.  If start is specified, will skip all preceding elements;
otherwise, start defaults to zero.  Step defaults to one.  If
specified as another value, step determines how many values are 
skipped between successive calls.  Works like a slice() on a list
but returns an iterator.


I have updated the patch

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Ethan Furman

Ethan Furman added the comment:

I'd be in favor of the __protocol__ route first and the PEP 443 route second.

The problem with just tacking in `str(int(value))` or `str(float(value))` is 
where does it stop?  StrEnum, TupleEnum, BytesEnum, ComplexEnum, 
SomeOtherInterestingConstantEnum, etc., etc..

If we go the __protocol__ route we add one method to Enum which returns the 
`str` of its `.value`, and we're set for every Enum.*  As a bonus, any other 
object that needs special json (or yaml or whatever) consideration has a fairly 
easy way to make it happen.

*Every normal Enum, anyway. ;)

--

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

On Fri, Jun 21, 2013 at 11:11 AM, Antoine Pitrou rep...@bugs.python.orgwrote:


 Antoine Pitrou added the comment:

  I'm attracted to the idea of making a loader lazy by simply doing
  something
  like ``class LazySourceFileLoader(LazyMixin, SourceFileLoader):
  ...``.

 But then you have to make a specific Lazy subclass for each delegated
 loader implementation. With a proxy class you would simply proxy each
 loader instance:

 existing_loader = SourceFileLoader(...)
 lazy_loader = LazyLoader(existing_loader)
 ...

But the point I tried to make earlier is that approach doesn't work
directly when you are creating the loader instances dynamically within a
finder. E.g. FileFinder (
http://docs.python.org/3/library/importlib.html#importlib.machinery.FileFinder)
instantiates the loader for you.

Now you could tweak things to make this work, but it isn't quite as
straightforward as you suggest because of this need to have a callable for
finders to use to create new loaders:

class LazyProxy(importlib.abc.Loader):

  def __init__(self, loader):
self.loader = loader

  def __call__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
return self

  def load_module(self, fullname):
# XXX ignoring sys.modules details, e.g. if module already existed.
lazy_module = LazyModule(fullname, proxy=self, name=fullname)
sys.modules[fullname] = lazy_module
return lazy_module

class LazyModule(types.ModuleType):

def __init__(*args, proxy, name, **kwargs):
  self.__proxy = proxy
  self.__name = name
  super().__init__(*args, **kwargs)

def __getattribute__(self, attr):
  self.__class__ = Module
  state = self.__dict__.copy()
  loader = self.__proxy.loader(*self.proxy.args, **self.proxy.kwargs)
  # XXX ignoring sys.modules details, e.g. removing module on load
failure.
  loader.load_module(self.__name)
  self.__dict__.update(state)
  return getattr(module, attr)

That's all totally untested (not even verified to compile) but I think that
would do what you are suggesting.

--

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



[issue14903] dictobject infinite loop while importing socket

2013-06-21 Thread Daniel Farina

Changes by Daniel Farina dan...@heroku.com:


--
title: dictobject infinite loop - dictobject infinite loop while importing 
socket

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14903
___
___
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-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The rationale for install is For convenience, you want the _() function to be 
installed in Python’s builtins namespace, so it is easily accessible in all 
modules of your application. As David noted, this also make it easy to update 
_ in just one place when a new language is selected.

Alex disagrees and would like to break any code that uses install, which I 
thing is much code, by removing it. This would force writers to do something 
else that will be *much* more work and which might make code harder to read. We 
do not do this without much greater reason than Alex has given. I think this a 
bad deprecation proposal and should be rejected. I also think the idea should 
have been posted to python-ideas first.

I do think that this should become a doc issue to clarify the meaning and usage 
of install.

The link Alex gave was to NullTranslations.install. The module install function 
itself is at
http://hg.python.org/cpython/file/01da7bf11ca1/Lib/gettext.py#l424

The doc for install could be much improved to say what it actually does.

Pass *domain*, *localedir*, fallback=True, and *codeset* to translation, which 
returns translation instance t. Pass *names* to t.install. The default install 
method, NullTranslations.install link, which is inherited by GNUTranslations 
link, installs t.gettext in builtins as _. See the description of translation 
and NullTranslations.install for the meaning of the parameters.
+ rationale quoted above

This expanded doc would make it clearer that one can write a custom subclass of 
NullTranslations with a custom .install method that would do something 
different, such as bind _ to a dynamic (indirect) gettext, whether in builtins 
or in a project module that is explicitly imported by every module that needs 
it.

The doc for NullTranslations.install needs the erroneous '()'s removed to make 
clear that the bindings are to bound methods and not the result of calls to 
bound methods. Ie, self.gettest() should be just self.gettext.

--
nosy: +terry.reedy
type:  - enhancement
versions: +Python 3.4

___
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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Ned Deily

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


--
nosy: +sbt

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



[issue18219] csv.DictWriter is slow when writing files with large number of columns

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

What is the purpose in touching fieldnames, either in tuple-izing it or in 
making it private and wrapped with a property. If someone wants to modify it, 
that is up to them. In any case, this change is not germane to the issue and 
could break code, so I would not make it.

wrong_fields could be calculated with
any(k for k in rowdict if k not in self._fieldset)
to stop on the first extra, if any.

That said, in 3.x, replacing

  wrong_fields = long expression
  if wrong_fields:
with
  if rowdict.keys() - self._fieldset:
should be even faster because the iteration, which will nearly always go to 
completion, is entirely in C (or whatever).

Does test/text_cvs have tests for DictWriter, both with and without rowdict 
errors? If so, or if added, I would be willing to commit a patch that simply 
added ._fieldset and used it as above for a set difference.

Also, if you have not done so yet, please go to
http://www.python.org/psf/contrib/  and
http://www.python.org/psf/contrib/contrib-form/  new electronic form
and submit a contributor agreement. An '*' will appear after your name here 
when it is processed.

--
nosy: +terry.reedy
versions: +Python 3.4

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'm not sure this is a theoretically sound idea.  Do you know what CLOS does in 
the same circumstance?

--
nosy: +rhettinger

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



[issue18220] Expand itertools.islice docstring signature to 2 lines

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The problem with all of range, slice, and islice is that 
[start,] stop [, step] is an impossible signature and needed to be changed.

The actual signature is
start_or_stop, [stop, [step]]
with customized processing to interpret start_or_stop according to the presence 
of stop (which is not really optional). We suggestion to doc it this was 
rejected as equally confusing.

In 3.3, we decided to stop trying to force all signatures presented to the user 
into one line and instead use multiple lines to present what are multiple 
signatures from a user view. So this alternative was used for range and slice 
(and other functions).

For islice, the islice entry has
itertools.islice(iterable, stop)
itertools.islice(iterable, start, stop[, step])

Py.user is corrrect in suggesting the same change for islice docstring. I have 
changed the title to be clearer.

The itertools function table has
islice()seq, [start,] stop [, step] elements from ...

I thing this should be changed also. A new line for arguments 'seq, stop' would 
say
'elements from seq[0:stop]'   example 'islice('ABCDEFG', 2) -- A B
Then remove brackets from [start] in the current line.

Py.user: To accept non-trival patches (typos, grammar corrections are trivial) 
we need a signed contributor agreement
http://www.python.org/psf/contrib/  and
http://www.python.org/psf/contrib/contrib-form/  new electronic form
An '*' will appear after your name here when it is processed.
I presume this will need a real (legal) name on the form, even though not in 
the tracker user list.

--
nosy: +terry.reedy
stage:  - patch review
title: In itertools.islice() make prototype like in help() - Expand 
itertools.islice docstring signature to 2 lines

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

I have no idea what CLOS does in this situation.

I'm fine with this never being changed, but I wanted to at least file the bug 
to have the discussion in case it ever comes up again.

--

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



[issue18222] os.path.abspath should accept multiple path parts and join them

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ditto, for reasons given

--
nosy: +terry.reedy
resolution:  - rejected
status: open - closed

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

This is a very similar issue to #17985.

While it may seem counter-intuitive, I don't see how it makes any difference.  
Another thread/process might remove the item before you can get it.

I find it very difficult to imagine a real program where you can safely use 
get_nowait() without being prepared to handle an Empty exception.

--

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



[issue18227] Use Python memory allocators in external libraries like zlib or OpenSSL

2013-06-21 Thread STINNER Victor

STINNER Victor added the comment:

It looks like CRYPTO_set_mem_functions() of OpenSSL 1.0.1e-4.fc18 does not 
work: CRYPTO_set_mem_functions() calls indirectly CRYPTO_malloc() which sets 
allow_customize = 0; and so CRYPTO_set_mem_functions() does nothing (just 
return 0, instead of 1).

Gdb trace with a modified _ssl module:

#0  0x003803463100 in CRYPTO_malloc () from /lib64/libcrypto.so.10
#1  0x003803542fae in FIPS_drbg_new () from /lib64/libcrypto.so.10
#2  0x0038035448e1 in FIPS_drbg_health_check () from /lib64/libcrypto.so.10
#3  0x003803542e88 in FIPS_drbg_init () from /lib64/libcrypto.so.10
#4  0x0038034cf9d1 in RAND_init_fips () from /lib64/libcrypto.so.10
#5  0x003803465764 in OPENSSL_init_library () from /lib64/libcrypto.so.10
#6  0x003803462c61 in CRYPTO_set_mem_functions () from 
/lib64/libcrypto.so.10
#7  0x7135bc6c in PyInit__ssl () at 
/home/haypo/prog/python/default/Modules/_ssl.c:3180

See the code:
http://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=crypto/mem.c;h=f7984fa958eb1edd6c61f6667f3f2b29753be662;hb=HEAD#l124

--

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



[issue18232] running a suite with no tests is not an error

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I do not quite see the need to complicate the interface for most users in a way 
that does not really solve all of the realistic problems.

import unittest
unittest.main()
#
Ran 0 tests in 0.000s

OK
---
It seems to me that a continuous integration system should parse out the tests 
run, ok, failed or errored, skipped (or use a lower level interface to grab the 
numbers before being printed), report them, and compare to previous numbers. 
Even one extra skip might be something to be explained. An 'arbitrary' figure 
could easily not detect real problems.

--
nosy: +terry.reedy

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



[issue18236] int() and float() do not accept strings with trailing separators

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You stated facts: what is your proposal?

The fact that unicode calls characters 'space' does not make then whitespace as 
commonly understood, or as defined by C, or even as defined by the Unicode 
database. Unicode apparently has a WSpace property. According to the table in
https://en.wikipedia.org/wiki/Whitespace_%28computer_science%29
1C - 1F are not included by that definition either. For ascii chars, that table 
matches the C definition, with \r included.

So I think your implied proposal to treat them as whitespace (in strings but 
not bytes) should be rejected as invalid. For 3.x, the manual should specify 
that it follows the C definition of 'whitespace' (\r included) for bytes and 
the extended unicode definition for strings.

 int('3\r')
3
 int('3\u00a0')
3
 int('3\u2000')
3
 int(b'3\r')
3
 int(b'3\u00a0')
Traceback (most recent call last):
  File pyshell#10, line 1, in module
int(b'3\u00a0')
ValueError: invalid literal for int() with base 10: '3\\u00a0'

--
nosy: +terry.reedy
type: behavior - enhancement
versions: +Python 3.4

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



[issue18237] unittest.assertRaisesRegex(p) example is wrong in docs

2013-06-21 Thread Terry J. Reedy

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


--
nosy: +terry.reedy

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk

shwouchk added the comment:

The major difference with the issue you referenced is that the behavior in 
#17985 is clearly stated and warned against in the docs (Queue.Empty being 
inconsistent with Queue.size), whereas this is not.

As for the actual behavior problem: Imagine you build an abstraction atop Queue 
(For example and specifically, a queue iterator). This iterator might return 
None or a similar sentinel if there is nothing on the queue.

Since you find the construct useful and would like to keep uniformity in the 
program, there is a place you use this abstraction in a fairly tight loop to 
pass messages from one part of the program to another part, in the same process 
and thread. Now the logic of the program does not work correctly as it was 
based on the assumption that in a single process Queue would work as expected.

The problem is not the exception but with having an abstraction built atop 
Queue that works right with respect to program logic both when you use it in 
one thread and in multiple ones.

--

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



[issue18246] tkinter.Text() add a newline to the content - bug?

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You omitted the crucial control experiment.
 t2=tk.Text()
 t2.get(1.0, tk.END)
'\n'
Text widgets are initialized to end with \n. I suspect that this is an  
intentional invariant of tk Text widgets, done by tk itself and not out tkinter 
wrapper, even if not well documented in the tkinter doc strings.

.insert works as documented.

So unless you can determine that this initialization is a recent and 
unintentional change, we would not change it. Hence closing at least for now.

(G.P., if you think this is wrong, re-open)

PS. python-list mirrrored on comp.lang.python and gmane.comp.python.general is 
a better place to ask 'Is this a bug?' and similar questions.

--
nosy: +gpolo, terry.reedy
resolution:  - invalid
status: open - closed

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 I have no idea what CLOS does in this situation.
No worries, I was just curious whether you knew whether this was a solved 
problem in Dylan or CLOS or some other language.

When faced with a diamond diagram, what are the semantics for 
isinstance(super_instance, cls)?

I worked on it for a little bit and came up with the following:

def super_isinstance(super_inst, cls):
'Is the cls in the mro somewhere after the current class?'
mro = super_inst.__self__.__class__.__mro__
thisclass = super_inst.__thisclass__
return cls in mro and mro.index(thisclass)  mro.index(cls)

--
Added file: http://bugs.python.org/file30663/simple_diamond_example.py

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



[issue17621] Create a lazy import loader mixin

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

While seing if it was worth making isinstance work with super(), I came up with 
this at Antoine's suggestion of using a proxy instead of a mixin:


class LazyProxy(importlib.abc.Loader):

  def __init__(self, loader):
self.loader = loader

  def __call__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
return self

  def load_module(self, fullname):
# XXX ignoring sys.modules details, e.g. if module already existed.
lazy_module = LazyModule(fullname, proxy=self, name=fullname)
sys.modules[fullname] = lazy_module
return lazy_module

class LazyModule(types.ModuleType):

def __init__(*args, proxy, name, **kwargs):
  self.__proxy = proxy
  self.__name = name
  super().__init__(*args, **kwargs)

def __getattribute__(self, attr):
  self.__class__ = Module
  state = self.__dict__.copy()
  loader = self.__proxy.loader(*self.proxy.args, **self.proxy.kwargs)
  # XXX ignoring sys.modules details, e.g. removing module on load
failure.
  loader.load_module(self.__name)
  self.__dict__.update(state)
  return getattr(module, attr)

--
dependencies: +Make isinstance() work with super type instances

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



[issue18278] Clarify the loader requirements for importlib.machinery.FileFinder

2013-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6978d7a6692a by Brett Cannon in branch '3.3':
Issue #18278: properly document how the loaders are called for FileFinder
http://hg.python.org/cpython/rev/6978d7a6692a

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

--
nosy: +python-dev

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster

New submission from Phil Webster:

This is a single test for RstripExtension.py, following from #15392. I also 
added a mock EditorWindow module with a Text widget for testing. 
test_rstripextension.py seems to run fine inside IDLE and produces the 
following output:

 
test_do_rstrip (__main__.Test_rstripextension) ... ok

--
Ran 1 test in 0.100s

OK

However, when I run via the command line, I get the following output:

philwebster@ubuntu:~/Dev/cpython$ ./python -m test -ugui test_idle
[1/1] test_idle
Warning -- warnings.showwarning was modified by test_idle
1 test altered the execution environment:
test_idle

I attempted to replicate the results from #18189, but saw the same message. Any 
thoughts?

--
components: IDLE
messages: 191618
nosy: JayKrish, philwebster
priority: normal
severity: normal
status: open
title: IDLE Unit test for RstripExtension.py
type: enhancement
versions: Python 2.7, Python 3.4

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



[issue18278] Clarify the loader requirements for importlib.machinery.FileFinder

2013-06-21 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/issue18278
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster

Changes by Phil Webster webster.p...@gmail.com:


--
nosy: +Todd.Rovito

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster

Changes by Phil Webster webster.p...@gmail.com:


--
nosy: +terry.reedy

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster

Changes by Phil Webster webster.p...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file30664/test_rstripext.patch

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



[issue18275] Make isinstance() work with super type instances

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

That solution looks right. Problem is that it would need to either go directly 
into isinstance() or type would need to grow an __instancecheck__ to deal with 
this case since you can't override isinstance from the instance end. That I'm 
not sure people are okay with.

--

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Why would you use a multi-process queue to pass messages from one part of the 
program to another part, in the same process and thread?  Why not just use a 
deque?

Is this something you actually did, or are you just trying to come up with a 
plausible example?

And, of course, if you are sure there must be an item available, you could just 
use get() instead of get_nowait().

--

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk

shwouchk added the comment:

Richard,

I think you missed my point. First, yes I did do that.

Second (the point):

I did this to use the same abstraction that was used extensively for other 
purposes, instead of recreating the same abstraction with a deque as its basis. 
Component reusability is one of the main points of OOP, after all...

And no, an item is not necessarily available - sometimes there is a message and 
sometimes there isn't. But if one was put into the queue, I claim that I should 
be able to rely on it being available right away in the application logic.

--

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



[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread shwouchk

shwouchk added the comment:

Also, of course I did this or I would not have stumbled into this issue...

--

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



[issue15693] expose glossary link on hover

2013-06-21 Thread Brett Cannon

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


--
nosy: +brett.cannon

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



[issue17621] Create a lazy import loader mixin

2013-06-21 Thread Brett Cannon

Brett Cannon added the comment:

I think the first step for this bug, now that I have two possible approaches, 
is to write the unit tests. That way both approaches can equally be validated 
based on their merits of complexity, etc. while verifying the work properly.

--

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



[issue18235] _sysconfigdata.py wrong on AIX installations

2013-06-21 Thread David Edelsohn

David Edelsohn added the comment:

It looks like someone already tried to fix part of this, but reversed the 
assignment

diff -r a089a8b1f93d Lib/sysconfig.py
--- a/Lib/sysconfig.py  Fri Jun 21 18:37:02 2013 -0400
+++ b/Lib/sysconfig.py  Fri Jun 21 22:33:15 2013 -0700
@@ -368,7 +368,7 @@
 # -- these paths are relative to the Python source, but when installed
 # the scripts are in another directory.
 if _PYTHON_BUILD:
-vars['LDSHARED'] = vars['BLDSHARED']
+vars['BLDSHARED'] = vars['LDSHARED']
 
 # There's a chicken-and-egg situation on OS X with regards to the
 # _sysconfigdata module after the changes introduced by #15298:


BLDSHARED is relative to srcdir and LDSHARED is relative to the install 
directory BINLIBDEST.

LDSHARED=   $(BINLIBDEST)/config/ld_so_aix $(CC) 
-bI:$(BINLIBDEST)/config/python.exp $(PY_LDFLAGS)
BLDSHARED=  $(srcdir)/Modules/ld_so_aix $(CC) 
-bI:$(srcdir)/Modules/python.exp $(PY_LDFLAGS)

--

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



[issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap

2013-06-21 Thread Brett Cannon

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


--
assignee:  - brett.cannon

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



[issue18056] Document importlib._bootstrap.NamespaceLoader

2013-06-21 Thread Brett Cannon

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


--
assignee: barry - docs@python
keywords: +easy -3.3regression
nosy: +docs@python
versions: +Python 3.4

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Can I vote for something like __builtin__ as the protocol, rather than
something entirely specific to serialisation? As in return the most
appropriate builtin type with the same value? Then a converter
(operator.builtin?) could coerce builtin subclasses to their base classes
by default, rather than needing to implement the protocol on every type.

Such a design would need a PEP, of course.

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm. Then I prefer just calling the appropriate builtin, e.g. int().

--Guido van Rossum (sent from Android phone)
On Jun 21, 2013 6:08 PM, Nick Coghlan rep...@bugs.python.org wrote:


 Nick Coghlan added the comment:

 Can I vote for something like __builtin__ as the protocol, rather than
 something entirely specific to serialisation? As in return the most
 appropriate builtin type with the same value? Then a converter
 (operator.builtin?) could coerce builtin subclasses to their base classes
 by default, rather than needing to implement the protocol on every type.

 Such a design would need a PEP, of course.

 --

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


--

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is a separate issue about killing that warning.

If you leave off '-ugui', you will see the traceback and why I said that 
requires('gui') should be wrapped for unittest discovery. As the code is, the 
call is executed when the file is imported, possibly during discovery, before 
the  unittest or regrtest runner starts running tests and counting success, 
fail, skip.

Two other thoughts before I look as rstrip and the content of the new test 
file. 

I would like to just call it test_rstrip. 

I have thought of having just one mock_idle.py for mock Idle classes (as 
opposed to mock_tk with mock tk classes. I am not sure how many will will need. 
Since your mock_ewin uses a real tk.Text widget, hence requiring gui, what is 
its purpose? The point of the mock_tk classes is to avoid gui and make the test 
text only. I am not saying that this is the only purpose, but other purposes 
should be stated and documented.

--
versions: +Python 3.3

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jun 22, 2013, at 01:08 AM, Nick Coghlan wrote:

Can I vote for something like __builtin__ as the protocol, rather than
something entirely specific to serialisation? As in return the most
appropriate builtin type with the same value? Then a converter
(operator.builtin?) could coerce builtin subclasses to their base classes
by default, rather than needing to implement the protocol on every type.

Such a protocol needs a way to deserialize as well.  You can't necessarily
assume (or shouldn't impose) that the __init__() can do that conversion.  In
any case...

Such a design would need a PEP, of course.

...yes, definitely.

--

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



[issue18279] IDLE Unit test for RstripExtension.py

2013-06-21 Thread Phil Webster

Phil Webster added the comment:

Thank you for the feedback Terry. I'm not seeing the traceback without '-ugui' 
either, so I'm going to look into that. I get the same results with 
requires('gui') moved inside of setUp, is that what you mean by wrapping?

For mock_ewin I used a real Text widget because RstripExtension uses index(), 
get(), and delete() and I was not able to figure out how the widget implemented 
these (is there a single string with the contents?). I can work on a non-gui 
test though if that's what needs to be done.

Thanks!

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Eli Bendersky

Eli Bendersky added the comment:

On Fri, Jun 21, 2013 at 6:59 PM, Barry A. Warsaw rep...@bugs.python.orgwrote:


 Barry A. Warsaw added the comment:

 On Jun 22, 2013, at 01:08 AM, Nick Coghlan wrote:

 Can I vote for something like __builtin__ as the protocol, rather than
 something entirely specific to serialisation? As in return the most
 appropriate builtin type with the same value? Then a converter
 (operator.builtin?) could coerce builtin subclasses to their base
 classes
 by default, rather than needing to implement the protocol on every type.

 Such a protocol needs a way to deserialize as well.  You can't necessarily
 assume (or shouldn't impose) that the __init__() can do that conversion.
  In
 any case...

 Such a design would need a PEP, of course.

 ...yes, definitely.

Practically speaking, what should be done to make enum play well with JSON
without writing new PEPs? I think we still want to convert those stdlib
constants to IntEnums...

Eli

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Change json to call int() first.

--Guido van Rossum (sent from Android phone)
On Jun 21, 2013 7:45 PM, Eli Bendersky rep...@bugs.python.org wrote:


 Eli Bendersky added the comment:

 On Fri, Jun 21, 2013 at 6:59 PM, Barry A. Warsaw rep...@bugs.python.org
 wrote:

 
  Barry A. Warsaw added the comment:
 
  On Jun 22, 2013, at 01:08 AM, Nick Coghlan wrote:
 
  Can I vote for something like __builtin__ as the protocol, rather than
  something entirely specific to serialisation? As in return the most
  appropriate builtin type with the same value? Then a converter
  (operator.builtin?) could coerce builtin subclasses to their base
  classes
  by default, rather than needing to implement the protocol on every type.
 
  Such a protocol needs a way to deserialize as well.  You can't
 necessarily
  assume (or shouldn't impose) that the __init__() can do that conversion.
   In
  any case...
 
  Such a design would need a PEP, of course.
 
  ...yes, definitely.

 Practically speaking, what should be done to make enum play well with JSON
 without writing new PEPs? I think we still want to convert those stdlib
 constants to IntEnums...

 Eli

 --

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


--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Ethan Furman

Ethan Furman added the comment:

On 06/21/2013 07:49 PM, Guido van Rossum wrote:
 Eli Bendersky added the comment:

 Practically speaking, what should be done to make enum play well with JSON
 without writing new PEPs? I think we still want to convert those stdlib
 constants to IntEnums...

 Change json to call int() first.

Should we have json call float() and str() first as well?  I'm thinking less of 
the stdlib and more of the unsuspecting 
user.

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Guido van Rossum

Guido van Rossum added the comment:

Yes for float() -- but for str() it would seem redundant? (Or what's
the context?)

On Fri, Jun 21, 2013 at 8:23 PM, Ethan Furman rep...@bugs.python.org wrote:

 Ethan Furman added the comment:

 On 06/21/2013 07:49 PM, Guido van Rossum wrote:
 Eli Bendersky added the comment:

 Practically speaking, what should be done to make enum play well with JSON
 without writing new PEPs? I think we still want to convert those stdlib
 constants to IntEnums...

 Change json to call int() first.

 Should we have json call float() and str() first as well?  I'm thinking less 
 of the stdlib and more of the unsuspecting
 user.

 --

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

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Ethan Furman

Ethan Furman added the comment:

Guido van Rossum added the comment:

 Yes for float() -- but for str() it would seem redundant? (Or what's
 the context?)

If a user has

 class Color(StrEnum):
 red = 'ff'
 green = '00ff00'
 blue = 'ff'

..
..
..

oh.  `str()` isn't going to give is the `value`'s string, is it?

Hmmm...

Instead of calling int() or float() on an enum member, perhaps we could make 
json smart enough to use the `value`?  That 
would also cover pure Enums.

--

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



[issue18264] enum.IntEnum is not compatible with JSON serialisation

2013-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Whatever we do needs to be something third party serialisation libraries
can also adopt with minimal compatibility risk for older versions of Python.

Yes, that serialisation will lose the new debugging information. That's
fine - if people want to map from a standard format like JSON to enums,
they have to handle that themselves anyway.

--

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