[issue19087] bytearray front-slicing not optimized

2013-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't see much sense in differences between bytea_slice2.patch and 
bytea_slice3.patch, because bytea_slice3.patch is not smaller and simpler than 
bytea_slice2.patch.

I meant that you can continue use self-ob_bytes instead of 
PyByteArray_AS_STRING(self) if self-ob_bytes points not to the start of 
physical buffer, but to the start of logical byte array. *This* will simplify 
the patch a lot.

--

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



[issue19156] Enum helper functions test-coverage

2013-10-04 Thread Ethan Furman

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


--
assignee:  - ethan.furman
nosy: +ethan.furman
stage:  - patch review

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



[issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str()

2013-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not a bug, str accepts the encoding argument in Python 3. And in 
contrast to the decode method it works with arbitrary byte-like objects (i.e. 
array.array).

--
nosy: +serhiy.storchaka

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



[issue19087] bytearray front-slicing not optimized

2013-10-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I meant that you can continue use self-ob_bytes instead of
 PyByteArray_AS_STRING(self) if self-ob_bytes points not to the
 start of physical buffer, but to the start of logical byte array.
 *This* will simplify the patch a lot.

It will make the diff smaller but it will not simplify the patch.

--

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



[issue10049] Add a no-op (null) context manager to contextlib

2013-10-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:


--
nosy: +piotr.dobrogost

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



[issue1673203] add identity function

2013-10-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:


--
nosy: +piotr.dobrogost

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



[issue11011] More functools functions

2013-10-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:


--
nosy: +piotr.dobrogost

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Adam Davison

New submission from Adam Davison:

If you pass an array containing nan to collections.Counter, rather than 
counting the number of 'nan's it outputs 'nan': 1 n times into the 
dictionary. I appreciate using this on an array of floats is a bit of an 
unusual case but I don't think this is the expected behaviour based on the 
documentation.

To reproduce, try e.g.:
a = [1, 1, 1, 2, 'nan', 'nan', 'nan']
collections.Counter(map(float, a))

Based on the documentation I expected to see:
{1.0: 3, 2.0: 1, nan: 3}

But it actually returns:
{1.0: 3, 2.0: 1, nan: 1, nan: 1, nan: 1}

Presumably this relates to the fact that nan != nan. I'm not 100% sure if this 
is a bug or maybe just something that should be mentioned in the 
documentation... Certainly it's not what I wanted it to do :)

Thanks,

Adam

--
components: Library (Lib)
messages: 198938
nosy: Adam.Davison
priority: normal
severity: normal
status: open
title: collections Counter handles nan strangely
type: behavior
versions: Python 2.7

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Mark Dickinson

Mark Dickinson added the comment:

 Presumably this relates to the fact that nan != nan.

Yep.  What you're seeing is pretty much expected behaviour, and it matches how 
NaNs behave with respect to containment in other Python contexts:

 x = float('nan')
 y = float('nan')
 s = {x}
 x in s
True
 y in s
False

There's a much-discussed compromise between object model sanity and respect for 
IEEE 754 here.  You can find the discussions on the mailing lists, but the 
summary is that this isn't going to change in a hurry.

One way you can work around this is to make sure you only have single NaN 
object (possibly referenced multiple times) in your list.  Then you get the 
behaviour that you're looking for:

 nan = float('nan')
 a = [1, 1, 2, nan, nan, nan]
 collections.Counter(a)
Counter({nan: 3, 1: 2, 2: 1})

By the way, when you say 'array of floats', do you mean a NumPy ndarray, a 
standard library array.array object, or a plain Python list?  The example you 
show is a list containing a mixture of ints and strings.

I suggest closing this as 'wont fix'.  Raymond?

--
nosy: +mark.dickinson, rhettinger

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Adam Davison

Adam Davison added the comment:

Thanks for the quick response. I'm really using a pandas Series, which is 
effectively a numpy array behind the scenes as far as I understand, the example 
I pasted was just to illustrate the behaviour. So the nans are being produced 
elsewhere, I don't really have control over that step.

It seems like perhaps collections.Counter should handle nans as a special case. 
But I can appreciate the counter-arguments too.

Thanks,

Adam

--

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



[issue19162] datetime.datetime.min.strftime('%Y') not working

2013-10-04 Thread Filip Zyzniewski

New submission from Filip Zyzniewski:

The datetime class provides a min datetime object which is not formattable:

on Python 2:

$ python
Python 2.7.3 (default, Apr 10 2013, 05:13:16) 
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
 import datetime
 datetime.datetime.min.strftime('%Y')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: year=1 is before 1900; the datetime strftime() methods require year 
= 1900
 

and on Python 3:

$ python3
Python 3.2.3 (default, Apr 10 2013, 05:07:54) 
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
 import datetime
 datetime.datetime.min.strftime('%Y')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: year=1 is before 1000; the datetime strftime() methods require year 
= 1000


It seems to me that either datetime.datetime.min.year should be increased to 
1900/1000 or strftime should be able to format year=1 - it is strange that the 
API doesn't support its own constants.

--
components: Library (Lib)
messages: 198941
nosy: filip.zyzniewski
priority: normal
severity: normal
status: open
title: datetime.datetime.min.strftime('%Y') not working
type: behavior
versions: Python 2.7, Python 3.2

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



[issue19163] PyString_Format with dict

2013-10-04 Thread hiroaki itoh

New submission from hiroaki itoh:

http://docs.python.org/2.7/c-api/string.html#PyString_Format

The documents says `The args argument must be a tuple.',
But if format is like '%(key)s', PyString_Format claims
args must be mapping protocol.
(At least 2.7.3.)

--
assignee: docs@python
components: Documentation
messages: 198942
nosy: docs@python, xwhhsprings
priority: normal
severity: normal
status: open
title: PyString_Format with dict
type: behavior
versions: Python 2.7

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



[issue19164] Update uuid.UUID TypeError exception: integer should not be an argument.

2013-10-04 Thread Marco Buccini

New submission from Marco Buccini:

When you try to use uuid.UUID() without arguments you get a TypeError exception 
saying that you can actually use an integer (while you cannot). 

Python 2.6.8 (default, Apr 26 2013, 16:24:53) 
[GCC 4.6.3] on linux2
 uuid.UUID()
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/uuid.py, line 129, in __init__
raise TypeError('need one of hex, bytes, bytes_le, fields, or int')
TypeError: need one of hex, bytes, bytes_le, fields, or int

 uuid.UUID(uuid.uuid4().int)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/uuid.py, line 131, in __init__
hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'long' object has no attribute 'replace'

So, let's check with an integer - maybe an int has 'replace'.
 uuid.UUID(1231231)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/uuid.py, line 131, in __init__
hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'int' object has no attribute 'replace'

No, it doesn't. Anyway, with a propery hex value, it works (of course!).

 uuid.UUID(uuid.uuid4().hex)
UUID('89b1283d-c32e-4b8a-a9e3-a699445fdd4d')

--
assignee: docs@python
components: Documentation
messages: 198943
nosy: docs@python, makronized
priority: normal
severity: normal
status: open
title: Update uuid.UUID TypeError exception: integer should not be an argument.
type: behavior
versions: Python 2.6

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



[issue19162] datetime.datetime.min.strftime('%Y') not working

2013-10-04 Thread tomasz.zaleski

tomasz.zaleski added the comment:

works correctly on python3.3:
Python 3.3.2 (default, Oct  4 2013, 12:21:07)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type help, copyright, credits or license for more information.
 import datetime
 datetime.datetime.min.strftime('%Y')
'0001'

issue on 2.7:
Python 2.7.5 (default, Sep 17 2013, 12:11:31)
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd9
Type help, copyright, credits or license for more information.
 import datetime
 datetime.datetime.min.strftime('%Y')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: year=1 is before 1900; the datetime strftime() methods require year 
= 1900

--
nosy: +krzaq

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



[issue19153] Embedding into a shared library fails again

2013-10-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 No custom builds. Every package from ubuntu repository. Psycopg2 installed by 
 pip

You may have to rebuild packages using the custom Python, not the system 
Python, since the linker options have to be different (especially the shared 
part: Ubuntu's Python is a static build, not a shared library build).

Or perhaps you can dlopen the CPython shared library with the RTLD_GLOBAL flag. 
I don't know.

I don't know if this is something that we can alleviate in Python itself.

--
nosy: +doko, pitrou, sandro.tosi
versions: +Python 3.3, Python 3.4

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



[issue19164] Update uuid.UUID TypeError exception: integer should not be an argument.

2013-10-04 Thread Vajrasky Kok

Vajrasky Kok added the comment:

The exception message is correct. You can give an integer argument. But you 
have to use keyword argument.

 uuid.UUID(int=uuid.uuid4().int)
UUID('62ad61e5-b492-4f01-81e6-790049051c4f')

From the documentation:

 __init__(self, hex=None, bytes=None, bytes_le=None, fields=None, int=None, v
ersion=None)
 |  Create a UUID from either a string of 32 hexadecimal digits,
 |  a string of 16 bytes as the 'bytes' argument, a string of 16 bytes
 |  in little-endian order as the 'bytes_le' argument, a tuple of six
 |  integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
 |  8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as
 |  the 'fields' argument, or a single 128-bit integer as the 'int'
 |  argument.  When a string of hex digits is given, curly braces,
 |  hyphens, and a URN prefix are all optional.  For example, these
 |  expressions all yield the same UUID:

--
nosy: +vajrasky

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Mark Dickinson

Mark Dickinson added the comment:

 perhaps collections.Counter should handle nans as a special case

I don't think that would be a good idea:  I'd rather that collections.Counter 
didn't special case NaNs in any way, but instead treated NaNs following the 
same (admittedly somewhat awkward) rules that all the other Python collections 
do---namely, for NaNs, containment effectively works by object identity.

 I'm really using a pandas Series

Okay, that makes sense.  It's a bit unfortunate that NumPy creates a new NaN 
object every time you read a NaN value out of an array, so that you get e.g.,

 from numpy import array, nan, isnan
 import numpy as np
 my_list = [1.2, 2.3, np.nan, np.nan]
 my_list[2] is my_list[3]
True
 my_array = np.array(my_list)
 my_array[2] is my_array[3]
False

Or even:

 my_array[2] is my_array[2]
False

I guess you're stuck with using Pandas functionality like `dropna` and `isnull` 
to deal with missing and non-missing values separately.

--

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-04 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Is BoundedSemaphore really supposed to be robust in the face of too many 
releases, or does it just provide a sanity check?

I think that releasing a bounded semaphore too many times is a programmer 
error, and the exception is just a debugging aid for the programmer.  Raising 
an exception 99% of the time should be sufficient for that purpose.

--
nosy: +sbt

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



[issue19155] Display stack info with color in pdb (the w command)

2013-10-04 Thread R. David Murray

R. David Murray added the comment:

I think we are unlikely to do this, as pdb is a very simple text interface.  
I'm sure a patch would be considered if one was offered, but the increase in 
complexity of the codebase would need to be minimal for it to be accepted, and 
I suspect the feature would need to be off by default.

--
nosy: +r.david.murray

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



[issue19155] Display stack info with color in pdb (the w command)

2013-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Agreed with David.
You can use https://bitbucket.org/antocuni/pdb/src instead.

--
nosy: +ezio.melotti
resolution:  - rejected
stage:  - committed/rejected
status: open - closed

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



[issue19162] datetime.datetime.min.strftime('%Y') not working

2013-10-04 Thread R. David Murray

R. David Murray added the comment:

Indeed, this is already fixed.  This issue is a duplicate of issue 1777412.  
The bug will not be fixed in earlier versions for the reasons discussed in that 
issue.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - datetime.strftime dislikes years before 1900

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



[issue14455] plistlib unable to read json and binary plist files

2013-10-04 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I'd really like to include this patch in 3.4, but haven't managed to do any 
opensource work in the previous period and don't know when I'll be able to 
actually commit this (and more importantly, be available when issues crop up) 
:-(

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14455
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://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-10-04 Thread Brett Cannon

Brett Cannon added the comment:

It looks like as long as you block _frozen_importlib and do a fresh import of 
importlib you can make sure to use the source version of importlib._bootstrap 
instead of _frozen_importlib.


 from test.support import import_fresh_module
 mod = import_fresh_module('importlib.abc', fresh=('importlib',), 
 blocked=('_frozen_importlib',))
 mod
module 'importlib.abc' from 
'/Users/bcannon/Repositories/cpython/default/Lib/importlib/abc.py'
 mod._bootstrap
module 'importlib._bootstrap' from 
'/Users/bcannon/Repositories/cpython/default/Lib/importlib/_bootstrap.py'
 mod._frozen_importlib
 import importlib
 importlib._bootstrap
module 'importlib._bootstrap' (frozen)
 mod2 = import_fresh_module('importlib', blocked=('_frozen_importlib',))
 mod2
module 'importlib' from 
'/Users/bcannon/Repositories/cpython/default/Lib/importlib/__init__.py'
 mod2._bootstrap
module 'importlib._bootstrap' from 
'/Users/bcannon/Repositories/cpython/default/Lib/importlib/_bootstrap.py'

--

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



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

2013-10-04 Thread Brett Cannon

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


--
title: Make test_importlib run tests under both _frozen_importlib and 
importlib._bootstrap - Make test_import  test_importlib run tests under both 
_frozen_importlib and importlib._bootstrap

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



[issue19163] PyString_Format with dict

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 405245885569 by Benjamin Peterson in branch '2.7':
dict is also allowed (closes #19163)
http://hg.python.org/cpython/rev/405245885569

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

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



[issue19164] Update uuid.UUID TypeError exception: integer should not be an argument.

2013-10-04 Thread Georg Brandl

Georg Brandl added the comment:

Yeah, the first message should probably say one of the hex, bytes, bytes_le, 
fields, or int arguments must be given

--
nosy: +georg.brandl

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



[issue18716] Deprecate the formatter module

2013-10-04 Thread Brett Cannon

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


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

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



[issue18716] Deprecate the formatter module

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 04ff1cc40d62 by Brett Cannon in branch 'default':
Issue #18716: Deprecate the formatter module
http://hg.python.org/cpython/rev/04ff1cc40d62

--
nosy: +python-dev

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



[issue19165] Change formatter warning to DeprecationWarning in 3.5

2013-10-04 Thread Brett Cannon

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


--
assignee: brett.cannon
components: Library (Lib)
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Change formatter warning to DeprecationWarning in 3.5
versions: Python 3.5

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



[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Vajrasky Kok

New submission from Vajrasky Kok:

This is the test.

   def test_keys(self):
d = {}
self.assertEqual(set(d.keys()), set())
d = {'a': 1, 'b': 2}
k = d.keys()
self.assertIn('a', d)
self.assertIn('b', d)
self.assertRaises(TypeError, d.keys, None)
self.assertEqual(repr(dict(a=1).keys()), dict_keys(['a']))

As you can see, the variable k is never used. Attached the patch to give 
purpose to variable k.

--
components: Tests
files: fix_test_dict_unused_variable.patch
keywords: patch
messages: 198957
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Unusued variable in test_keys in Lib/test/test_dict.py
versions: Python 3.4
Added file: http://bugs.python.org/file31958/fix_test_dict_unused_variable.patch

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



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

2013-10-04 Thread Brett Cannon

Brett Cannon added the comment:

Turns out this isn't as clean-cut as simply using 
test.support.import_fresh_module() as you end up with different instances of 
importlib._bootstrap which kills any possible subclass checks, etc. between 
e.g. importlib.abc and importlib.machinery as the source versions will have 
different instances of importlib._bootstrap.

--

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



[issue6028] Interpreter aborts when chaining an infinite number of exceptions

2013-10-04 Thread Jesús Cea Avión

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


--
nosy: +jcea

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-04 Thread Tim Peters

Tim Peters added the comment:

Richard, that's a strange argument ;-)  Since, e.g., a BoundedSemaphore(1) is 
semantically equivalent to a mutex, it's like saying some_mutex.release() 
usually raises an exception if the mutex isn't held at the time - but maybe it 
won't.  If the docs _say_ it's not reliable, fair enough.  But they don't say 
that.  When a thread gimmick is _intended_ to be probabilistic, the docs say so 
(e.g., Queue.qsize()).

Probably would have been better if a bounded=False optional argument to 
Semaphore.__init__() had been added, rather than creating a new 
BoundedSemaphore class.  But, as is, it could easily be made reliable:

1. Change Semaphore's condition variable to use an RLock (instead of the 
current Lock).

2. Stuff the body of BoundedSemaphore.release() in a `with self._cond:` block.

Curiously, there doesn't appear to be a test that BoundedSemaphore.release ever 
raises ValueError.  So I'll readily agree that nobody ever took this seriously 
;-)

--

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



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

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0416b2b5654 by Brett Cannon in branch 'default':
Issue #16803: Run test.test_importlib.test_abc under both
http://hg.python.org/cpython/rev/f0416b2b5654

--
nosy: +python-dev

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



[issue19153] Embedding into a shared library fails again

2013-10-04 Thread Rinat

Rinat added the comment:

 Or perhaps you can dlopen the CPython shared library with the RTLD_GLOBAL 
 flag. I don't know.

Yes, it works. I made it is my shared library before boost block like this

{
  void* handle = dlopen(libpython2.7.so, RTLD_LAZY | RTLD_GLOBAL);
  // boost wrapper for python call
  dlclose(handle);
}


I think if nothing helps, i'll put this code into __attribute__((ctor|dtor)) 
functions

Thanks a lot

--

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



[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2013-10-04 Thread Phil Connell

Changes by Phil Connell pconn...@gmail.com:


--
nosy: +pconnell

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



[issue19153] Embedding into a shared library fails again

2013-10-04 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, making it a documentation issue in case it deserves clarification in the 
docs.

--
assignee:  - docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

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



[issue19119] duplicate test name in Lib/test/test_heapq.py

2013-10-04 Thread STINNER Victor

STINNER Victor added the comment:

@Xavier de Gaye: Nice, you found many similar issues. How did you find them? 
Would it be possible to automate the detection of duplicated test names?

--
nosy: +haypo

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



[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-04 Thread mpb

New submission from mpb:

On Win32, when I select from an SQLite view, and enclose the column name in 
double quotes in the select query, the cursor description (erroneously?) 
contains the double quotes.

On Linux (or on Win32 when selecting from a table rather than a view) the 
cursor description does not contain the double quotes.  I expect the Linux 
behavior, not the Win32 behavior.

The following code demonstrates the problem.

import sqlite3, sys

print (sys.platform)
print (sys.version)

conn = sqlite3.connect (':memory:')
cur  = conn.cursor ()

cur.execute ('create table Foo ( foo_id integer primary key ) ;')
cur.execute ('create view  Foo_View as select * from Foo ;')

cur.execute ('select foo_id from Foo;')
print (cur.description[0][0])
cur.execute ('select foo_id from Foo;')
print (cur.description[0][0])
cur.execute ('select foo_id from Foo_View;')
print (cur.description[0][0])
cur.execute ('select foo_id from Foo_View;')
print (cur.description[0][0])


Sample output on Linux and Win32.

linux
3.3.1 (default, Apr 17 2013, 22:32:14) 
[GCC 4.7.3]
foo_id
foo_id
foo_id
foo_id

win32
3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)]
foo_id
foo_id
foo_id
foo_id


Above, please note the (erroneous?) double quotes around the final foo_id.

--
components: Library (Lib)
messages: 198964
nosy: mpb
priority: normal
severity: normal
status: open
title: sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), 
when selecting from a view.
type: behavior
versions: Python 3.3

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



[issue18679] include a codec to handle escaping only control characters but not any others

2013-10-04 Thread Derek Wilson

Derek Wilson added the comment:

Any update on this? Just so you can see what my work around is, I'll paste in 
the code I'm using. The major issue I have with this is that performance 
doesn't scale to large strings.

This is also a bytes-to-bytes or str-to-str encoding, because this is the type 
of operation that one plans to do with the data one has.

Having a full fledged streaming codec to handle this would be very helpful when 
writing applications that stream tab and newline separated utf-8 data over 
stdin/stdout.

  
text_types = (str, )  

escape_tm = dict((k, repr(chr(k))[1:-1]) for k in range(32))  
escape_tm[0] = '\0'
escape_tm[7] = '\a'
escape_tm[8] = '\b'
escape_tm[11] = '\v'   
escape_tm[12] = '\f'   
escape_tm[ord('\\')] = ''

def escape_control(s):  
if isinstance(s, text_types):   
return s.translate(escape_tm)
else:
return s.decode('utf-8', 
'surrogateescape').translate(escape_tm).encode('utf-8', 'surrogateescape')

def unescape_control(s):
if isinstance(s, text_types):   
return s.encode('latin1', 'backslashreplace').decode('unicode_escape')
else:   
return s.decode('utf-8', 'surrogateescape').encode('latin1', 
'backslashreplace').decode('unicode_escape').encode('utf-8', 'surrogateescape')

--

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



[issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str()

2013-10-04 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Correct, my characterization above was wrong (I shouldn't write these up 
without the interpreter right in front of me). What is wrong with the 
conversion is:

unicode(, utf-8) in python 2.x should become either str(b, utf-8) or, 
better, just  in Python 3.x.  The better version could be done if the codec 
and value can be represented in the encoding of the output 3.x source code file 
as is but that optimization is not critical.

In order for str() to take a second arg (the codec) the first cannot be a 
unicode string already:

 str(foo, utf-8)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: decoding str is not supported

--

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



[issue19119] duplicate test name in Lib/test/test_heapq.py

2013-10-04 Thread Xavier de Gaye

Xavier de Gaye added the comment:

It was proposed, in issue 16056, to enhance `make patchcheck` with the
detection of duplicate code names. This triggered the creation of issue 16079.
The script named duplicate_code_names_2.py, in issue 16079, listed about 20
duplicate names among all the non-nested functions, classes or methods in the
whole repository (default branch), mostly duplicated test names. I have
entered an issue for each one of these cases, they are listed in issue 16079.
Yes, this detection can be automated.

--

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



[issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str()

2013-10-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Just add the b prefix to literal string argument of unicode() in Python 2.

--

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



[issue19168] pprint.pprint(..., compact=True) not implemented

2013-10-04 Thread Alexis Layton

New submission from Alexis Layton:

Documentation for 3.4 states that the compact keyword-only argument has been 
added to 3.4. However:

Python 3.4.0a3 (default, Oct  2 2013, 14:05:02) 
[GCC 4.6.3] on linux
Type help, copyright, credits or license for more information.
 import pprint
 pprint(3, compact=True)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'module' object is not callable
 pprint.pprint(3, compact=True)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: pprint() got an unexpected keyword argument 'compact'


--
components: Library (Lib)
messages: 198969
nosy: AlexisLayton
priority: normal
severity: normal
status: open
title: pprint.pprint(..., compact=True) not implemented
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19168
___
___
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-10-04 Thread Raymond Hettinger

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


--
assignee:  - rhettinger

___
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



[issue19168] pprint.pprint(..., compact=True) not implemented

2013-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

This a very recent change, see #19132.

Python 3.4.0a3+ (default:f0416b2b5654, Oct  5 2013, 02:10:25) 
[GCC 4.7.3] on linux
Type help, copyright, credits or license for more information.
 import pprint
 pprint.pprint(3, compact=True)
3

--
nosy: +ezio.melotti, serhiy.storchaka
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue18594] C accelerator for collections.Counter is slow

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e4cec1116e5c by Raymond Hettinger in branch '3.3':
Issue #18594:  Make the C code more closely match the pure python code.
http://hg.python.org/cpython/rev/e4cec1116e5c

--

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



[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 92c2e76ca595 by Ezio Melotti in branch '2.7':
#19166: use an unused var in a test.  Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/92c2e76ca595

New changeset 33bbc60705e8 by Ezio Melotti in branch '3.3':
#19166: use an unused var in a test.  Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/33bbc60705e8

New changeset 16a88d026571 by Ezio Melotti in branch 'default':
#19166: merge with 3.3.
http://hg.python.org/cpython/rev/16a88d026571

--
nosy: +python-dev

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



[issue19166] Unusued variable in test_keys in Lib/test/test_dict.py

2013-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee:  - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement
versions: +Python 2.7, Python 3.3

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



[issue19165] Change formatter warning to DeprecationWarning in 3.5

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - needs patch
type:  - enhancement

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



[issue19111] 2to3 should remove from future_builtins import *

2013-10-04 Thread Terry J. Reedy

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


--
nosy: +benjamin.peterson

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



[issue19164] Update uuid.UUID TypeError exception: integer should not be an argument.

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
nosy: +ezio.melotti
stage:  - needs patch
versions: +Python 2.7 -Python 2.6

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - test needed
type: crash - behavior
versions:  -Python 2.6, Python 3.1, Python 3.2

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



[issue19124] os.execv executes in background on Windows

2013-10-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In general, os module functions lightly wrap the corresponding operating system 
calls. It does not mask differences between OSes, or between versions of an OS. 
So the unix-windows difference is not a bug and the behavior will not change. 

The difference could, however, be described succinctly in the doc. In the first 
paragraph, after On Unix, the new executable is loaded into the current 
process, and will have the same process id as the caller., we could add 
something like

On Windows, the new process is executed in the background but can send output 
to a console if the original process was started in a console.

This has to be worded carefully because the process could instead have been 
started from an icon, including in Start Menu or Windows Explorer.

--
assignee:  - docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, terry.reedy
stage: committed/rejected - needs patch
versions: +Python 3.4

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



[issue19129] 6.2.1. Regular Expression Syntax flags

2013-10-04 Thread Terry J. Reedy

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


--
stage:  - needs patch
versions: +Python 2.7, Python 3.4

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



[issue19148] Minor issues with Enum docs

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset db94fc7218fa by Ezio Melotti in branch 'default':
#19148: fix markup errors and wording in enum docs.  Patch by Esa Peuha.
http://hg.python.org/cpython/rev/db94fc7218fa

--
nosy: +python-dev

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



[issue19148] Minor issues with Enum docs

2013-10-04 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!
I used a slightly different wording than the one you suggested because the rest 
of the document doesn't seem to use you.

--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue19150] IDLE shell fails: ModifiedInterpreter instance has no attribute 'interp'

2013-10-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

By default, Idle runs user code in a separate process from the idle process 
that runs shell and edit windows. Because connecting the two processes 
sometimes fails, there is a start-up option -N (No subprocess) that run your 
code in the same process as idle code. Since this option also has potential 
problems, it should not be used unless necessary. In fact, some of us would 
like to eliminate the option (after fixing connection problems).

I tried and failed to reproduce the problem with 2.7.5 on Windows. I started 
with -N, opened an editor window, ran (F5) with a comment uncommented, got a 
syntax error box, added '#', ran again, and the valid code ran fine.

To continue this issue, update from 2.7.3 to 2.7.5 and see if you still have 
the problem. The update has 100s of bug fixes including many Idle fixes. If you 
do still see a problem with 2.7.5, please find a minimal file that has creates 
a problem when '#' is missing. Also, if you do, please test with 3.3.2 or the 
most recent 3.4.0.

--
nosy: +terry.reedy
stage:  - test needed
type: compile error - behavior

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



[issue19152] ExtensionFileLoader missing get_filename()

2013-10-04 Thread Eric Snow

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


--
status: open - closed

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



[issue19152] ExtensionFileLoader missing get_filename()

2013-10-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 62d045a873bb by Eric Snow in branch 'default':
[issue 19152] Ensure we have actually registered ExtensionFileLoader as an 
ExecutionLoader.
http://hg.python.org/cpython/rev/62d045a873bb

New changeset e9554199620f by Eric Snow in branch 'default':
[issue 19152] Add versionadded for ExtensionFileLoader.get_filename().
http://hg.python.org/cpython/rev/e9554199620f

--

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



[issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

2013-10-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Changing the API of HTTPResponse.fileno is a feature change, not a bug fix. I 
do not think it should be changed as it would break existing code to no 
purpose. Instead, calls should continue to wrapped in try: except ValueError 
when failure is possible. And this issue closed as rejected.

--
As to the illustrative example: 

I do not think the call in _fileobject.fileno should be so wrapped because I 
think the bug is elsewhere. _fileinput()._sock is supposed to be a socket, not 
an HTTPResponse. This says to me that a) self._sock.fileno() is supposed to 
call socket.fileno, not HTTPResonse.fileno; and b) nappstore/server_comm.py is 
calling socket(_sock=HTTPResonse object) (or directly modifying the .sock 
attribute).

If b) is true, that strikes me as a bug because _sock is an undocumented 
private parameter, subject to change. Indeed it disappeared in 3.x when socket 
became a _socket.socket subclass rather than a wrapper thereof. (Also, the 
pseudo _fileobject was replaced with an appropriate, real, io class.)

--
nosy: +terry.reedy
versions:  -Python 3.3, Python 3.4, Python 3.5

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti, serhiy.storchaka
stage:  - patch review

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is the sort of issue that makes me think that there should be a single nan 
object (perhaps an instance of a Nan(float) subclass with a special __eq__ 
method ;-). Pending that, I agree with closing as won't fix.

--
nosy: +terry.reedy

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



[issue19129] 6.2.1. Regular Expression Syntax flags

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
type:  - enhancement
versions:  -Python 2.7

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



[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2013-10-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti
stage:  - needs patch

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



[issue19161] collections Counter handles nan strangely

2013-10-04 Thread Raymond Hettinger

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


--
resolution:  - wont fix
status: open - closed

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



[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-10-04 Thread Eric Snow

Eric Snow added the comment:

Here's an initial patch.  Some key things left to do:

* unit tests
* documentation
* implement exec_module() for the various importlib loaders.

Once that's squared away there are further things that will be addressed in new 
tickets (or at least separate patches).  This includes:

* remove init_module_attrs() and module_to_load()
* deprecations
* clear a bunch of helper functions out of _bootstrap.py
* use ModuleSpec with __main__
* address impact on stdlib (pkgutil, pickle, etc.)

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file31959/modulespec-initial.diff

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



[issue18862] Implement __subclasshook__() for Finders and Loaders in importlib.abc

2013-10-04 Thread Eric Snow

Eric Snow added the comment:

Here's a patch.

--
keywords: +patch
stage: test needed - patch review
Added file: 
http://bugs.python.org/file31960/issue18862-importlib-abc-subclasshooks.diff

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