[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I'll work on improving the docs to make this classmethod more discoverable in 
docs, but the API is going to stay the same.

--
resolution:  - rejected

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



[issue14984] netrc module allows read of non-secured .netrc file

2013-09-09 Thread bruno Piguet

Changes by bruno Piguet bruno.pig...@gmail.com:


--
versions: +Python 3.2

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



[issue14984] netrc module allows read of non-secured .netrc file

2013-09-09 Thread Antoine Pitrou

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


--
nosy: +giampaolo.rodola

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



[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fa1fa88b685b by Raymond Hettinger in branch 'default':
Issue 18752:  Make chain.from_iterable() more visible in the documentation.
http://hg.python.org/cpython/rev/fa1fa88b685b

--
nosy: +python-dev

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



[issue18943] argparse: default args in mutually exclusive groups

2013-09-09 Thread paul j3

paul j3 added the comment:

At the very least the `is not action.default` needs to be changed.  Else where 
in argparse `is` is only used with `None` or constant like `SUPPRESS`.  So 
using it with a user defined parameter is definitely not a good idea.

Possible variations on how `is` behaves across implementations (pypy, 
ironpython) only complicates the issue.  I'm also familiar with a Javascript 
translation of argparse (that uses its `!==` in this context).

--

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



[issue18980] Docs: enum - ReST format

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e05b07a6f84 by Ethan Furman in branch 'default':
Close #18980: Enum doc fixes.  Patch from Elazar Gershuni.
http://hg.python.org/cpython/rev/0e05b07a6f84

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

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



[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 29fa1f418796 by Raymond Hettinger in branch '3.3':
Issue 18301:  The classmethod decorator didn't fit well with the 
rough-equivalent example code.
http://hg.python.org/cpython/rev/29fa1f418796

--
nosy: +python-dev

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



[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-09-09 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 23f77dc58979 by Raymond Hettinger in branch '3.3':
Issue 18752:  Make chain.from_iterable() more visible in the documentation.
http://hg.python.org/cpython/rev/23f77dc58979

--

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



[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-09 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
status: open - closed

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



[issue18313] In itertools recipes repeatfunc() defines a non-keyword argument as keyword

2013-09-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

All of the proposed variants have their own issues.  

For example, the keyword-argument variant behaves badly if the user leaves off 
the keyword:

   list(repeatfunc(ord, 'A', times=3))
  [65, 65, 65]
   list(repeatfunc(ord, 'A', 3))
  Traceback (most recent call last):
File pyshell#12, line 1, in module
  list(repeatfunc(ord, 'A', 3))
  TypeError: ord() takes exactly one argument (2 given)

I prefer to leave the recipe as is.  The primary purpose of the recipe is to 
illustrate how starmap() and repeat() can be used together.  Will that 
knowledge, a user can easily cobble together in-line code for either the finite 
version or the infinite iterable version.

--
priority: normal - low
resolution:  - rejected
status: open - closed

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



[issue18577] lru_cache enhancement: lru_timestamp helper function

2013-09-09 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This is a pretty interesting idea.

Ideally, it would be great if it could be a published as a recipe somewhere so 
that people could experiment with the API and try out variations.  If there 
were good uptake by users, it would help justify a proposal to be included in 
the standard library.

--
priority: normal - low

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



[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 So, even though __members__ does show up in dir(Color),
 classify_class_attrs incorrectly assigns its class.
 
[...]
 
 So if getmembers() correctly reports it because it shows up in dir(),
 then classify_class_attrs should correctly identify it as well.

Ok, you got me convinced :-)

--

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



[issue18606] Add statistics module to standard library

2013-09-09 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
nosy: +skrah

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



[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2013-09-09 Thread Nicola Palumbo

Nicola Palumbo added the comment:

Hi all,

I've fixed the infinite recursion in `reset_mock()`. It has been solved by 
tracking a set of visited ids as suggested.

 from unittest import mock
 a = mock.mock_open()
 a.reset_mock()
 a
MagicMock name='open' spec='builtin_function_or_method' id='4449688192'

--
keywords: +patch
nosy: +npalumbo
Added file: http://bugs.python.org/file31694/issue18622.patch

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



[issue18985] Improve the documentation in fcntl module

2013-09-09 Thread Vajrasky Kok

New submission from Vajrasky Kok:

The attached patch fixed typos and improved the documentation to improve the 
clarity in Modules/fcntlmodule.c.

Please see the attached patch and feel free to disagree with the improvement.

--
assignee: docs@python
components: Documentation
files: fix_documentation_on_fcntl_module.patch
keywords: patch
messages: 197358
nosy: docs@python, vajrasky
priority: normal
severity: normal
status: open
title: Improve the documentation in fcntl module
type: enhancement
versions: Python 3.4
Added file: 
http://bugs.python.org/file31695/fix_documentation_on_fcntl_module.patch

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This is a very common need when implementing network protocols. You want to 
match keys case-insensitively but also preserve the original casing (e.g. for 
presentation).

When searching on the Web, you see many people reimplementing their own variant 
(often incomplete, or buggy). For example, Twisted has its own, the email 
package has something resembling it, WebOb also.

Having an implementation in the stdlib would spare many people the effort, 
ensure the implementation is complete and well-tested, and perhaps also add 
some optimizations to mitigate the overhead compared to a plain dict.

Note this is an instance of a more general pattern, where they key used for 
matching is derived from the lookup key using a constant derivation function. 
So maybe we want to implement the more general pattern and let users specify 
str.lower as the key derivation function.

--
components: Library (Lib)
messages: 197359
nosy: barry, pitrou, r.david.murray, rhettinger, tim.peters
priority: normal
severity: normal
status: open
title: Add a case-insensitive case-preserving dict
type: enhancement
versions: Python 3.4

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Thomas Heller

Changes by Thomas Heller thel...@ctypes.org:


--
nosy: +theller

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Matthew Barnett

Matthew Barnett added the comment:

Surely a case-insensitive dict should use str.casefold, not str.lower?

--
nosy: +mrabarnett

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Surely a case-insensitive dict should use str.casefold, not
 str.lower?

Perhaps. Network protocols will usually only allow ASCII in parts
where case is insensitive (e.g. header names), so it shouldn't make a
difference.

Implementing the generic pattern means this is left at the user's
discretion, though.

--

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



[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-09 Thread Sam Ferencik

New submission from Sam Ferencik:

distutils.util.get_platform() semantically differs on (a) Windows and OS X, and 
on (b) Linux.

Windows/OS X: the return value is derived from the architecture of the 
*interpreter*, hence for 32-bit Python running on a 64-bit system, 
get_platform() = 'win32'/'macosx-10.6-i386' (32-bit).

Linux: the return value is derived from the architecture of the *OS*, hence for 
32-bit Python running on 64-bit Linux get_platform() = 'linux-x86_64' (64-bit).

Based on a discussion on distutils-sig, the Linux behaviour is probably wrong 
and should be changed. 
https://mail.python.org/pipermail/distutils-sig/2013-August/subject.html

My context (where this hit me): I was installing the 32-bit version of the 
Perforce API (compiled module) on 64-bit Windows and on 64-bit Linux. My 
command-line was

  python3.3-32 setup.py install --root FOO --install-platlib=lib.$PLAT

(note the '-32' and the '$PLAT')

On Windows, this installed the 32-bit version of the API into FOO\lib.win32. 
On Linux, this installed the 64-bit version of the API into 
FOO/lib.linux-x86_64.

--
assignee: eric.araujo
components: Distutils
messages: 197363
nosy: eric.araujo, sferencik, tarek
priority: normal
severity: normal
status: open
title: distutils.utils.get_platform() for 32-bit Python on a 64-bit machine
type: behavior
versions: Python 3.3

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, I have my own implementation here:
https://bitbucket.org/optiflowsrd/obelus/src/tip/obelus/casedict.py?at=default
https://bitbucket.org/optiflowsrd/obelus/src/tip/obelus/test/test_casedict.py?at=default

--

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



[issue18988] Tab key doesn't work sometimes.

2013-09-09 Thread Howitzer21

New submission from Howitzer21:

In the IDLE program for Python 3.3.2, I've run across a situation where the tab 
key is not working.  I have attached a file that shows everything in IDLE's 
console.  At the very end of the file, you can see where I have typed in the 
word queue in IDLE without pressing enter.  At this point, if I press tab, 
nothing happens.  If I press space and then tab, suddenly it'll work just fine. 
 But then if I delete all the spaces and tabs and just go back to having 
nothing more than queue on the line, with no trailing whitespace, suddenly 
tab will go back to not working.

--
components: IDLE
files: console.txt
messages: 197364
nosy: Howitzer21
priority: normal
severity: normal
status: open
title: Tab key doesn't work sometimes.
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file31696/console.txt

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue18945] Name collision handling in tempfile is not covered by tests

2013-09-09 Thread Vlad Shcherbina

Changes by Vlad Shcherbina vlad.shcherb...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file31697/tempfile_collision_tests.patch

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread R. David Murray

R. David Murray added the comment:

For the record, email is not a good argument for this, since email could not 
use this data structure (its data structure is *not* a dict, but a list with 
dict-like features grafted on).

I do think this would be useful, and the generic version (analogous to 
defaultdict) would seem to make sense.

--

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



[issue17741] event-driven XML parser

2013-09-09 Thread Stefan Behnel

Stefan Behnel added the comment:

Looks like we missed the alpha2 release for the close() API fix. I recommend 
not letting yet another deadline go by.

--

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



[issue18934] multiprocessing: use selectors module

2013-09-09 Thread Charles-François Natali

Changes by Charles-François Natali cf.nat...@gmail.com:


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

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



[issue18988] Tab key doesn't work sometimes.

2013-09-09 Thread Serhiy Storchaka

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


--
nosy: +kbk, roger.serwy, terry.reedy
versions: +Python 2.7, Python 3.4

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, let's bikeshed this a bit. What should be the name?
- projectdict?
- normalizedict?
- normdict?
- derivedict?
- transformdict?
- any ideas?

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Ethan Furman

Ethan Furman added the comment:

I would say

- transformkeydict


Too bad we can't just add an extra 'transform_key' keyword to defaultdict.

--

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



[issue18988] Tab key doesn't work sometimes.

2013-09-09 Thread Roger Serwy

Roger Serwy added the comment:

LGTM. I manually tested it by assigning a = 1 and then pressing tab at 
after a, aa,  aaa, and a, and then pressing tab afterwards. Tab 
works to complete the name, and then afterwards when it has been replaced with 
a.

--

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



[issue18988] Tab key doesn't work sometimes.

2013-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think this patch should fix the bug.

--
keywords: +patch
nosy: +serhiy.storchaka
stage:  - patch review
Added file: http://bugs.python.org/file31698/idle_autocomplete_nochange.patch

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



[issue18989] reuse of enum names in class creation inconsistent

2013-09-09 Thread Ethan Furman

New submission from Ethan Furman:

Consider:

==
--from enum import Enum

--class Color(Enum):
...   red = 1
...   green = 2
...   blue = 3
...   red = 4
... 
Traceback (most recent call last):
  File stdin, line 1, in module
  File stdin, line 5, in Color
  File /home/ethan/source/python/issue18924/Lib/enum.py, line 87, in 
__setitem__
raise TypeError('Attempted to reuse key: %r' % key)
TypeError: Attempted to reuse key: 'red'
==

versus

==
--class Color(Enum):
...   red = 1
...   green = 2
...   blue = 3
...   def red(self):
... return 'fooled ya!'
... 

# no error
==

or

==
--class Color(Enum):
...   red = 1
...   green = 2
...   blue = 3
...   @property
...   def red(self):
... return 'fooled ya!'
... 

# no error
==

In both of the latter two cases the redefinition of 'red' is allowed because 
the new definition is not an enum member.

This is inconsistent as well as confusing.

I know normal class creation semantics don't place any such limitations on 
names and allow redefining at will, but Enum is not a regular class.

--
assignee: ethan.furman
files: no_reuse_of_enum_names.stoneleaf.01.patch
keywords: patch
messages: 197375
nosy: barry, eli.bendersky, eric.snow, ethan.furman, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: reuse of enum names in class creation inconsistent
type: behavior
versions: Python 3.4
Added file: 
http://bugs.python.org/file31699/no_reuse_of_enum_names.stoneleaf.01.patch

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

It would be nice to combine the behaviors that defaultdict and the 
case-insensitive comparisons.

--
nosy: +eric.smith

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

Just today I was using a defaultdict where the keys are stock symbols. They're 
case insensitive (at least for this particular application).

In this case I just str.upper everything, but it would be a nice feature to 
case-preserve the keys that I pre-populate. I care less about the keys from 
user data.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 In this case I just str.upper everything, but it would be a nice
 feature to case-preserve the keys that I pre-populate. I care less
 about the keys from user data.

Well, stock symbols are what I would call user data :-)

--

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



[issue18984] Remove .stopped Event from Thread internals

2013-09-09 Thread Tim Peters

Tim Peters added the comment:

Antoine, could I bother you to try the attached cleanup.patch?  It looks 
harmless to me, but when I checked it in the Unix-y buildbots failed the 
thread+fork tests again :-(  Two examples:

http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/4914/steps/test/logs/stdio

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8581/steps/test/logs/stdio

Worse, the buildbot slaves appeared never to finish running then - I had to 
stop them (via the stop build button).

Maybe I'm just tired, but I've stared  stared at this and just don't see 
what's going wrong :-(

--
Added file: http://bugs.python.org/file31700/cleanup.patch

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Revised version of the patch: catches RuntimeError instead of
 skipping the first frame; adds versionadded tag; adds entry to NEWS
 and whatsnew files.

Looks good to me, thank you.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

True enough!

I was trying to distinguish keys that I populate with initial values (mostly 
stock indexes) versus those where I just read values from a user-supplied file. 
When I populate the index values, I'd like to preserve the case I initially 
used. When I use user-supplied values, I don't know that the first value I use 
to populate the defaultdict has any more meaning that the last one I see.

It would just be a nice-to-have feature for which I have a real use case. It's 
not so critical that I can't work around it.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 It would be nice to combine the behaviors that defaultdict and the 
 case-insensitive comparisons.

Any use case? In my experience they are used in completely different
situations. defaultdict mostly to use the writing of some (internal)
algorithms, a case-insensitive dict to store user-visible data.

--

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



[issue18988] Tab key doesn't work sometimes.

2013-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is simpler test case. Just enter flo and press TAB. Twice.

--

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



[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-09 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/issue18987
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Ethan Furman

Ethan Furman added the comment:

To the point, however, Eric's example would make use of both the defaultdict 
portion and the transformkey portion in a single dict.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Matthew Barnett

Matthew Barnett added the comment:

mappeddict?

Re defaultdict, you could write a dict that does all of these things, called 
superdict! :-)

--

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



[issue18984] Remove .stopped Event from Thread internals

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I suppose we can close this issue now?

--

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



[issue18989] reuse of enum names in class creation inconsistent

2013-09-09 Thread R. David Murray

R. David Murray added the comment:

As I recall this was discussed at length and we decided that this was the 
behavior we wanted.  I could be wrong, of course; it was a long discussion.

--
nosy: +r.david.murray

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread R. David Murray

R. David Murray added the comment:

coercekeydict

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I would like to shorten the proposals to transformdict and coercedict.
(after all, transforming the values would have little sense: you can do it 
yourself trivially)

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread STINNER Victor

STINNER Victor added the comment:

FYI os.environ uses something similar: keys and values are encoded and decoded 
using functions. So any transformation is supported.

http://hg.python.org/cpython/file/eac63e7ceb03/Lib/os.py#l636

On UNIX, the encoder and decoder are os.fsencode() and os.fsdecode() (not 
exactly, the real functions are more strict on the input type).

On Windows, the encoder converts the key to uppercase.

--
nosy: +haypo

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Eli Bendersky

Eli Bendersky added the comment:

+1 For the general idea
+1 For the more generic approach of which lowercase is just one special case

+10 to make this a PEP so that more people have a chance to express their 
opinion (currently only those who noticed it on the issues mailing list). I 
find the issue tracker a very bad medium for any kind of brain-storming or 
bikeshedding.

--
nosy: +eli.bendersky

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



[issue18984] Remove .stopped Event from Thread internals

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a fixed patch (works here, at least :-)).

--
Added file: http://bugs.python.org/file31701/cleanup2.patch

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 FYI os.environ uses something similar: keys and values are encoded and
 decoded using functions. So any transformation is supported.

I don't think this is the same situation. os.environ has bijective
transformations, which don't pose any implementation challenge.

The whole point of a transformdict is to allow for multiple keys to
actually map to the same dict entry.

--

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



[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-09 Thread Tim Peters

Changes by Tim Peters t...@python.org:


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

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



[issue18984] Remove .stopped Event from Thread internals

2013-09-09 Thread Tim Peters

Tim Peters added the comment:

Yes - and I just closed 18808 :-)

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

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



[issue18990] Remove unnecessary API inconsistency from ElementTree.XMLPullParser.close()

2013-09-09 Thread Stefan Behnel

New submission from Stefan Behnel:

The .close() method of the new XMLPullParser (see issue17741) in Py3.4 shows an 
unnecessarily complicated behaviour that is inconsistent with the .close() 
method of the existing XMLParser.

The attached patch removes some code to fix this.

--
components: Library (Lib), XML
files: xmlpullparser_close.patch
keywords: patch
messages: 197383
nosy: scoder
priority: normal
severity: normal
status: open
title: Remove unnecessary API inconsistency from 
ElementTree.XMLPullParser.close()
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file31702/xmlpullparser_close.patch

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 +10 to make this a PEP so that more people have a chance to express
 their opinion (currently only those who noticed it on the issues
 mailing list). I find the issue tracker a very bad medium for any kind
 of brain-storming or bikeshedding.

Well, I don't think there is a lot of brainstorming to be done here: we
are talking about a single well-defined functionality. I don't mind
writing a PEP if other people ask for it, but I'd rather spend my time
on more important things.

As for bikeshedding, there is no good medium for it, really :-) At
worse we could ask python-dev for their naming contributions (a great
idea, surely).

--

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



[issue18984] Remove .stopped Event from Thread internals

2013-09-09 Thread Tim Peters

Tim Peters added the comment:

Well - I remain baffled, but am grateful for the patch - thanks :-)

--

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



[issue18990] Remove unnecessary API inconsistency from ElementTree.XMLPullParser.close()

2013-09-09 Thread Stefan Behnel

Changes by Stefan Behnel sco...@users.sourceforge.net:


--
nosy: +eli.bendersky

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



[issue17741] event-driven XML parser

2013-09-09 Thread Stefan Behnel

Stefan Behnel added the comment:

Created separate issue18990 to keep this one closed as is.

--

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-09 Thread STINNER Victor

STINNER Victor added the comment:

I tried to implement the feature as a new traceback.clear_frames() method. I 
tried to follow the chain of frame objects (using frame.f_back), but it does 
not work as expected. The method needs to follow the chain of traceback objects 
(tb.tb_next). So it makes sense to define a function instead of a method (a 
method usually only affect the object, not a chain of objects).

clear-tb-frames-2.txt:

- I didn't see the tb abbreviation in other places in Python, except for 
traceback attributes. I prefer clear_traceback_frames(). The name 
clear_frames() is maybe better because traceback is already known by the 
context (the module is called tracback. Example: traceback.clear_frames(tb) 
instead of traceback.clear_traceback_frames(tb).

- The documentation is wrong: frame.clear() does not guarantee to clear *all* 
locals, but only *most* locals:

F.clear(): clear most references held by the frame);

So I suggest a more permissive documentation:

Clear most reference held by frames.

--

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



[issue18904] Unnecessary test in file descriptor inheritance test

2013-09-09 Thread STINNER Victor

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


--
resolution:  - fixed
status: open - closed

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



[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Do you want to upload a patch?

--
nosy: +pitrou
versions: +Python 2.7, Python 3.4

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also discussion on a topic: 
http://comments.gmane.org/gmane.comp.python.ideas/18469 .

Proposed names: custom_dict, KeyedDictionary, Dictionary.

It will be confused if this dict will not be compatible with PyDict API. It is 
possible to add such feature directly into the dict class (I experimented with 
IdentityDict).

--
nosy: +serhiy.storchaka

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 - The documentation is wrong: frame.clear() does not guarantee to
 clear *all* locals, but only *most* locals:
 
 F.clear(): clear most references held by the frame);

Actually, the documentation is right: references != locals ;-)

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread R. David Murray

R. David Murray added the comment:

Indeed.  Although there was apparently some call for it, it doesn't sound from 
a quick google like defaultdict was deemed to require a PEP.  Presumably the 
informed audience should be wider than this issue, though.

I also note that defaultdict is implemented via a special method on dict itself 
(__missing__), and if this one was implemented the same way it would be easy to 
combine the features.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Ethan Furman

Ethan Furman added the comment:

Precisely what I was thinking.  :)

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I also note that defaultdict is implemented via a special method on
 dict itself (__missing__), and if this one was implemented the same
 way it would be easy to combine the features.

It's not that simple: to remember the original casing you need either a
second container, or to use (original_key, value) tuples as values. Both
approaches have non-trivial repercussions on the implementation of many
methods.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(as a sidenote, you might want a case-insensitive OrderedDict as well, I see no 
reason to make a special case for defaultdict here)

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Proposed names: custom_dict, KeyedDictionary, Dictionary.

Sounds much too vague and un-specific.

 It will be confused if this dict will not be compatible with PyDict
 API.

Why? Many custom dict-like classes aren't.

 It is possible to add such feature directly into the dict class (I
 experimented with IdentityDict).

Can you explain how?

--

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



[issue18991] Overriding OrderedDict.__getitem__() doesn't work

2013-09-09 Thread Davi Post

New submission from Davi Post:

class MyOrderedDict(OrderedDict):
   
def __getitem__(self, key):
OrderedDict.__getitem__(self, key)

After setting a key, getting it returns None. See attached.

Am I missing something?

Discovered this when trying to use the dict_type parameter of 
ConfigParser.RawConfigParser -- caused an AttributeError.

Possibly relevant to http://bugs.python.org/issue9534

--
components: Library (Lib)
files: OrderedDictTest.py
messages: 197404
nosy: davipo
priority: normal
severity: normal
status: open
title: Overriding OrderedDict.__getitem__() doesn't work
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file31703/OrderedDictTest.py

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Why? Many custom dict-like classes aren't.

And this is weird (issue10977).

 Can you explain how?

By patching Objects/dictobject.c of course. I suppose it should require 
changing about 400 lines of code, a little more than for IdentityDict. When you 
provides the specification perhaps I will provide a patch.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 By patching Objects/dictobject.c of course.

Am I stupid :-)

 I suppose it should require changing about 400 lines of code, a little
 more than for IdentityDict. When you provides the specification
 perhaps I will provide a patch.

Well, take a look at the code I've pointed to above. I'm curious to know
how you'll integrate it in dictobject.c without slowing down normal dict
objects, and without making them bigger.

--

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



[issue18991] Overriding OrderedDict.__getitem__() doesn't work

2013-09-09 Thread Alex Gaynor

Alex Gaynor added the comment:

Your __getitem__ never returns the result of OrderedDict.__getitem__

--
nosy: +alex
resolution:  - invalid
status: open - closed

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



[issue18991] Overriding OrderedDict.__getitem__() doesn't work

2013-09-09 Thread Davi Post

Davi Post added the comment:

Oops. Thanks.  :-{

On Mon, Sep 9, 2013 at 4:56 PM, Alex Gaynor rep...@bugs.python.org wrote:


 Alex Gaynor added the comment:

 Your __getitem__ never returns the result of OrderedDict.__getitem__

 --
 nosy: +alex
 resolution:  - invalid
 status: open - closed

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


--

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



[issue14937] IDLE's deficiency in the completion of file names (Python 32, Windows XP)

2013-09-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not currently seeing the problem I reported, so closing. If I type past / 
and hit ^space, I sometimes get an empty listbox, but I do not yet have a 
consistent failing case. Will open a new issue if/when I get one.

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

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 I'm curious to know how you'll integrate it in dictobject.c without slowing 
 down normal dict objects, and without making them bigger.

It of course will make a size of source file bigger, but shouldn't affect a 
size or performance of normal dicts. A dict object contains dk_lookup. 
Constructor for keyed dict (subclass of ) should initialize it with specialized 
function which calls the key function and recalculate a hash (yes, with this 
simple approach a hash will be calculated twice, for original and for 
transformed keys). Hmm, actually it can be even simpler than for IdentityDict 
(for which not calculating a hash was important). Also some other methods which 
relies on dict implementation details (e.g. making a copy of dict) should be 
modified.

The most cumbersome part is the tests. Unfortunately I lost my tests for 
IdentityDict (used hg diff without --git). It will be good if your provide 
complete test suite.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 It of course will make a size of source file bigger, but shouldn't
 affect a size or performance of normal dicts. A dict object contains
 dk_lookup.

You need to keep both the original keys and the transformed keys. It's not only 
about transforming keys on lookup. Otherwise, yes, it's trivial.

--

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



[issue18986] Add a case-insensitive case-preserving dict

2013-09-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 It will be good if your provide complete test suite.

... Again, take a look at the code I've posted above ...

--

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



[issue18989] reuse of enum names in class creation inconsistent

2013-09-09 Thread Nick Coghlan

Nick Coghlan added the comment:

I don't recall this *particular* wrinkle being discussed. Silently failing
to define one of the requested enum members seems quite dubious.

--

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



[issue18943] argparse: default args in mutually exclusive groups

2013-09-09 Thread paul j3

paul j3 added the comment:

This patch uses a narrow criteria - if `_get_values()` sets the value to 
`action.default`, then argument counts as 'not present'.  I am setting a 
`using_default` flag in `_get_values`, and return it for use by `take_action`.

In effect, the only change from previous behavior is that small ints (257) now 
behave like large ints, strings and other objects.

It removes the nonstandard 'is not action.default' test, and should behave 
consistently across all platforms (including pypy).

--
keywords: +patch
Added file: http://bugs.python.org/file31704/patch_1.diff

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



[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-09 Thread Tim Peters

New submission from Tim Peters:

Don't know whether this is new.  Found it running the test suite under a 
3.4.0a2 freshly installed from the python.org .msi installer:

== CPython 3.4.0a2 (v3.4.0a2:9265a2168e2c+, Sep 8 2013, 19:41:05) [MSC v.1600 
32 bit (Intel)]
==   Windows-Vista-6.0.6002-SP2 little-endian

`regrtest -v test_sax` output attached.  Interestingly, test_sax passes under 
the tip HG Pythons I build myself.

Didn't we recently fix something like this???  Appears to be a line-end 
problem.  Ya!  Whoever builds the Windows installer needs to delete directory 
Lib\test\xmltestdata on their box, and then do hg revert on that directory to 
get fresh copies of the test data.  .hgeol was changed to treat those files as 
binary, but Mercurial doesn't replace the files automatically just because 
.hgeol changed.

--
components: Tests
files: test_sax.out
messages: 197415
nosy: tim.peters
priority: normal
severity: normal
status: open
title: test_sax fails on Windows under 3.4.0a2
versions: Python 3.4
Added file: http://bugs.python.org/file31705/test_sax.out

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



[issue18992] test_sax fails on Windows under 3.4.0a2

2013-09-09 Thread Ned Deily

Ned Deily added the comment:

Martin builds the Windows installers.

--
nosy: +loewis, ned.deily

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



[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-09 Thread Ethan Furman

Ethan Furman added the comment:

Cool.  Latest patch has a slight doc fix for getmembers.

Will commit on Friday if no other pertinent feedback.

--
assignee:  - ethan.furman
stage:  - patch review
Added file: http://bugs.python.org/file31706/issue18929.stoneleaf.04.patch

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



[issue18800] Document Fraction's numerator and denominator properties

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fe5c03fb0ff6 by Senthil Kumaran in branch '3.3':
Document Fraction's numerator and denominator properties.
http://hg.python.org/cpython/rev/fe5c03fb0ff6

New changeset 5fb700ca3fd5 by Senthil Kumaran in branch 'default':
merge from 3.3
http://hg.python.org/cpython/rev/5fb700ca3fd5

--
nosy: +python-dev

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



[issue18800] Document Fraction's numerator and denominator properties

2013-09-09 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Fixed in applicable versions 3.3 and 3.4.

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

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



[issue18734] Berkeley DB versions 4.4-4.9 are not discovered by setup.py

2013-09-09 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +benjamin.peterson
priority: normal - release blocker

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



[issue18281] tarfile defines stat constants

2013-09-09 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file31707/issue18281.stoneleaf.01.patch

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



[issue18281] tarfile defines stat constants

2013-09-09 Thread Ethan Furman

Ethan Furman added the comment:

Interestingly enough, the two constants that are used are prefixed with `stat`.

Patch attached.

Adios!

--

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-09 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Couple of strategies I thought for tacking this problem.

1) Documenting the resolution of NEWS specific merge conflict. 
Observing/recording when those arises and when it was there was no-conflict 
will be helpful.  This could help us in organizing NEWS file in a manner that 
less conflicts occur.

2) Automatic generation of NEWS file from commit logs. We can tag commit logs 
like #NEWS-Lib-2.7, #NEWS-Core-3.4 and NEWS file can be auto generated from the 
log. This could be interesting, it could also be error prone. That's probably 
the reason why we (or any other OSS project) has not adopted this method 
already.

--
nosy: +orsenthil

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



[issue18815] DOCUMENTATION: mmap .close() doesn't close the underlying file

2013-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 443d12b61e5b by Senthil Kumaran in branch '2.7':
Clarify mmap.close method  behavior.  Addresses issue  #18815
http://hg.python.org/cpython/rev/443d12b61e5b

New changeset 373907ca13e0 by Senthil Kumaran in branch '3.3':
Clarify mmap.close method  behavior.  Addresses issue  #18815
http://hg.python.org/cpython/rev/373907ca13e0

New changeset 377bd6e0f61c by Senthil Kumaran in branch 'default':
merge from 3.3
http://hg.python.org/cpython/rev/377bd6e0f61c

--
nosy: +python-dev

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



[issue18815] DOCUMENTATION: mmap .close() doesn't close the underlying file

2013-09-09 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is addressed. Thanks for the patch, Anoop.

--
nosy: +orsenthil
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - behavior

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