[issue19927] Path-based loaders lack a meaningful __eq__() implementation.

2013-12-20 Thread Eric Snow

Eric Snow added the comment:

Unless there are objections, I'll commit this in the next day or two.

--

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



[issue20030] unittest.TestLoader.discover return value incorrectly documented.

2013-12-20 Thread Arnaut Billings

New submission from Arnaut Billings:

Here: 
http://docs.python.org/3/library/unittest.html#unittest.TestLoader.discover

it states that Find and return all test modules ...

This implies that in order to get a test suite, one has to iterate over the 
return value of unittest.TestLoader.discover and call loadTestsFromModule for 
each module.

But, the type of the result of unittest.TestLoader.discover returns: class 
'unittest.suite.TestSuite'

--
assignee: docs@python
components: Documentation
messages: 206670
nosy: arnaut-billings, docs@python
priority: normal
severity: normal
status: open
title: unittest.TestLoader.discover return value incorrectly documented.
versions: Python 3.3

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



[issue20031] unittest.TextTestRunner missing run() documentation.

2013-12-20 Thread Arnaut Billings

New submission from Arnaut Billings:

Here: http://docs.python.org/3/library/unittest.html

1) unittest.TextTestRunner is missing documentation for its public run method.

2) There are references to the TestRunner class sprinkled through out the above 
page, yet no link or documentation as to what that class actually is and does.

--
assignee: docs@python
components: Documentation
messages: 206671
nosy: arnaut-billings, docs@python
priority: normal
severity: normal
status: open
title: unittest.TextTestRunner missing run() documentation.
versions: Python 3.3

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



[issue20031] unittest.TextTestRunner missing run() documentation.

2013-12-20 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, michael.foord
stage:  - needs patch
type:  - enhancement
versions: +Python 3.4

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



[issue20030] unittest.TestLoader.discover return value incorrectly documented.

2013-12-20 Thread Ezio Melotti

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


--
keywords: +easy
nosy: +ezio.melotti, michael.foord
stage:  - needs patch
type:  - enhancement
versions: +Python 3.4

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



[issue20031] unittest.TextTestRunner missing run() documentation.

2013-12-20 Thread Ezio Melotti

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


--
keywords: +easy

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



[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread STINNER Victor

STINNER Victor added the comment:

 I think this patch is bad and should be reverted. It always calls 
 traceback.format_exception() which is an expensive operation, while the 
 _TracebackLogger takes care to call it only when necessary.

Oh, I didn't notice that, and I agree that the new code is inefficient.

Since the Future object does not release the reference to the exception after 
result() or exception() has been called, there is no need to preformat the 
exception. It can be done in the destructor.

Attached asyncio_defer_format_tb.patch implements that.

Future.set_exception() creates a reference cycle. I created the issue #20032 to 
discuss that.

--
resolution: fixed - 
Added file: http://bugs.python.org/file33229/asyncio_defer_format_tb.patch

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread STINNER Victor

New submission from STINNER Victor:

asyncio.Future.set_exception(exc) sets the exception attribute to exc, but 
exc.__traceback__ refers to frames and the current frame probably referes to 
the future instance.

Tell me if I'm wrong, but it looks like a reference cycle:
fut -- fut.exception -- exception --exception.__traceback__ - traceback 
--traceback.tb_frame -- frame --frame.fb_locals -- fut

The frame class got a new clear() method in Python 3.4:
http://docs.python.org/dev/reference/datamodel.html#frame.clear

Maybe because of the PEP 442, the reference cycle is no more an issue. In fact, 
the following example calls fut destructor immediatly, at fut = None line.
---
import asyncio

fut = asyncio.Future()
try:
raise ValueError()
except Exception as err:
fut.set_exception(err)
fut = None
---

Attached patch breaks explicitly the reference cycle by scheduling a call to 
traceback.clear_frames() using call_soon(). The patch depends on 
asyncio_defer_format_tb.patch which is attached to the issue #19967.

--
files: asyncio_break_ref_cycle.patch
keywords: patch
messages: 206672
nosy: gvanrossum, haypo, pitrou
priority: normal
severity: normal
status: open
title: asyncio.Future.set_exception() creates a reference cycle
versions: Python 3.4
Added file: http://bugs.python.org/file33228/asyncio_break_ref_cycle.patch

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread STINNER Victor

STINNER Victor added the comment:

asyncio_break_ref_cycle.patch does not fix the issue on Python 3.3 (for Tulip).

--

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



[issue20033] Fix makelocalealias.py for Python 3

2013-12-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

When Tools/i18n/makelocalealias.py was ported to Python 3 some things were not 
fixed.

1. locale.alias is opened as binary file in Python 2, but as text file (with 
locale encoding) in Python 3. This can cause fail when the script runs in UTF-8 
locale because locale.alias contains non-ASCII locales ('bokmål' and 
'français', encoded in Latin1).

2. In Python 2 %r formatting always produce ASCII output. In Python 3 %a should 
be used to produce the same output.

Proposed patch fixes these minor bugs.

--
components: Demos and Tools
files: locale_py3k.patch
keywords: patch
messages: 206675
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix makelocalealias.py for Python 3
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33230/locale_py3k.patch

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file33231/locale_devanagari_2.patch

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file33219/locale_devanagari.patch

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



[issue20034] Update locale alias table

2013-12-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch updates locale alias table to most recent locale.alias file 
(from X.org 7.7 distribution).

--
components: Library (Lib)
files: locale_aliases_77.patch
keywords: patch
messages: 206676
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Update locale alias table
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33232/locale_aliases_77.patch

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



[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 00d09afb57ca by Nick Coghlan in branch 'default':
Issue #19946: use public API for multiprocessing start methods
http://hg.python.org/cpython/rev/00d09afb57ca

--

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



[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Pending a clean bill of health from the stable buildbots :)

--
status: open - pending

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



[issue19736] posixmodule.c: Add flags for statvfs.f_flag to constant list

2013-12-20 Thread Matthias Klose

Changes by Matthias Klose d...@debian.org:


--
resolution:  - fixed
status: open - closed

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



[issue20034] Update locale alias table

2013-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.12.2013 12:36, Serhiy Storchaka wrote:
 
 Proposed patch updates locale alias table to most recent locale.alias file 
 (from X.org 7.7 distribution).

Looks good.

BTW, regarding the devanagari cases:

There is some recent activity in glibc related to these. Here's a
patch that adds the  sd_IN@devanagari locale to glibc:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/localedata/locales/sd...@devanagari.diff?cvsroot=glibcr1=NONEr2=1.1

So they will start working once platforms adopt the new
glibc versions.

The @-modifier is applied to the locale, not the encoding, because
the locale uses a different script, as opposed to limiting itself
to part of an encoding. This looks reasonable, even though I'm
not sure it conforms to standards.

--

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.12.2013 12:19, Serhiy Storchaka wrote:
 
 Added file: http://bugs.python.org/file33231/locale_devanagari_2.patch

See my message on issue20034:

There is some recent activity in glibc related to these. Here's a
patch that adds the  sd_IN@devanagari locale to glibc:
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/localedata/locales/sd...@devanagari.diff?cvsroot=glibcr1=NONEr2=1.1

So they will start working once platforms adopt the new
glibc versions.

The @-modifier is applied to the locale, not the encoding, because
the locale uses a different script, as opposed to limiting itself
to part of an encoding. This looks reasonable, even though I'm
not sure it conforms to standards.

Since all this is still very much in flux, perhaps we ought
to wait a bit more and let the dust settle ?!

--

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



[issue20034] Update locale alias table

2013-12-20 Thread Berker Peksag

Berker Peksag added the comment:

See also issue 16555.

--
nosy: +berker.peksag

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



[issue15599] test_threaded_import fails sporadically on Windows and FreeBSD

2013-12-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Another recent instance of the parallel meta path failure:

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

--
keywords: +buildbot -patch
nosy: +ncoghlan

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



[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Now passing on all the stable buildbots (the two red Windows bots are for other 
issues, such as issue 15599 for the threaded import test failure)

--
status: pending - closed

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ubuntu 12.04 supports Kashmiri and Sindhi locales (requires 
language-pack-sd-base and language-pack-sd-base packages).

$ locale -a
...
ks_IN
ks_IN@devanagari
ks_IN.utf8
ks_IN.utf8@devanagari
...
sd_IN
sd_IN@devanagari
sd_IN.utf8
sd_IN.utf8@devanagari
...

Current Python doesn't support all of these locales:

$ LC_ALL=ks_IN ./python -c 'import locale; print(locale.getlocale())'
Traceback (most recent call last):
  File string, line 1, in module
  File /home/serhiy/py/cpython/Lib/locale.py, line 556, in getlocale
return _parse_localename(localename)
  File /home/serhiy/py/cpython/Lib/locale.py, line 465, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: ks_IN
$ LC_ALL=ks_IN@devanagari ./python -c 'import locale; print(locale.getlocale())'
Traceback (most recent call last):
  File string, line 1, in module
  File /home/serhiy/py/cpython/Lib/locale.py, line 556, in getlocale
return _parse_localename(localename)
  File /home/serhiy/py/cpython/Lib/locale.py, line 465, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: ks_IN@devanagari
$ LC_ALL=ks_IN.utf8 ./python -c 'import locale; print(locale.getlocale())'
('ks_IN', 'utf8')
$ LC_ALL=ks_IN.utf8@devanagari ./python -c 'import locale; 
print(locale.getlocale())'
('ks_IN', 'UTF-8')
$ LC_ALL=sd_IN ./python -c 'import locale; print(locale.getlocale())'
Traceback (most recent call last):
  File string, line 1, in module
  File /home/serhiy/py/cpython/Lib/locale.py, line 556, in getlocale
return _parse_localename(localename)
  File /home/serhiy/py/cpython/Lib/locale.py, line 465, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: sd_IN
$ LC_ALL=sd_IN@devanagari ./python -c 'import locale; print(locale.getlocale())'
Traceback (most recent call last):
  File string, line 1, in module
  File /home/serhiy/py/cpython/Lib/locale.py, line 556, in getlocale
return _parse_localename(localename)
  File /home/serhiy/py/cpython/Lib/locale.py, line 465, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: sd_IN@devanagari
$ LC_ALL=sd_IN.utf8 ./python -c 'import locale; print(locale.getlocale())'
('sd_IN', 'utf8')
$ LC_ALL=sd_IN.utf8@devanagari ./python -c 'import locale; 
print(locale.getlocale())'
('sd_IN', 'utf8')

After applying the patch Python supports all ks_IN and sd_IN locales.

--

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.12.2013 15:55, Serhiy Storchaka wrote:
 
 After applying the patch Python supports all ks_IN and sd_IN locales.

Well, yes, but only because you are removing the @-modifiers. I don't
think that's correct, since e.g. the string formatting used for
numbers is different with the modifier.

If you keep the modifiers, but move them to the end of the locale
string you should get the correct behavior, e.g.

-'sd':   'sd...@devanagari.utf-8',
+'sd':   'sd_IN.UTF-8@devanagari',

(modulo perhaps the spelling of UTF-8)

--

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



[issue20034] Update locale alias table

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Looks good.

Should these patch be applied only to 3.4 or to all maintained 
releases? I suppose the later, because alias table which is not 
conform recent systems configuration is a bug.

 BTW, regarding the devanagari cases:

This patch only updates the devanagari cases in conform to 
locale.alias file. *Issue20027 should fix support of these cases.*

--

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Well, yes, but only because you are removing the @-modifiers. I don't
 think that's correct, since e.g. the string formatting used for
 numbers is different with the modifier.

All the @-modifiers except euro are applied to the locale, not the encoding. 
And Python removes all the @-modifiers, e.g. latin and cyrillic which specify 
the script.

 If you keep the modifiers, but move them to the end of the locale
 string you should get the correct behavior, e.g.
 
 -'sd':   'sd...@devanagari.utf-8',
 +'sd':   'sd_IN.UTF-8@devanagari',
 
 (modulo perhaps the spelling of UTF-8)

Recent the locale.alias file changes these entities:

sd: sd_IN.UTF-8
sd_IN.utf8: sd_IN.UTF-8
sd@devanagari:  sd...@devanagari.utf-8
sd_IN@devanagari:   sd...@devanagari.utf-8
sd_IN@devanagari.utf8:  sd...@devanagari.utf-8

--

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



[issue20034] Update locale alias table

2013-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.12.2013 16:12, Serhiy Storchaka wrote:
 
 Serhiy Storchaka added the comment:
 
 Looks good.
 
 Should these patch be applied only to 3.4 or to all maintained 
 releases? I suppose the later, because alias table which is not 
 conform recent systems configuration is a bug.

Agreed.

 BTW, regarding the devanagari cases:
 
 This patch only updates the devanagari cases in conform to 
 locale.alias file. *Issue20027 should fix support of these cases.*

Ok.

--

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 20.12.2013 16:24, Serhiy Storchaka wrote:
 
 Serhiy Storchaka added the comment:
 
 Well, yes, but only because you are removing the @-modifiers. I don't
 think that's correct, since e.g. the string formatting used for
 numbers is different with the modifier.
 
 All the @-modifiers except euro are applied to the locale, not the encoding. 
 And Python removes all the @-modifiers, e.g. latin and cyrillic which specify 
 the script.

That's not quite correct. The modifiers are used to determine the
correct mapping, so you'll often find them on the left side, but
not necessarily on the right side.

There are several cases where the modifiers are kept around,
since they have implications on the way number or dates are
formatted.

For the Indian devanagari locales we have to keep them,
because the locale formatting of number and dates depends
on them.

 If you keep the modifiers, but move them to the end of the locale
 string you should get the correct behavior, e.g.

 -'sd':   'sd...@devanagari.utf-8',
 +'sd':   'sd_IN.UTF-8@devanagari',

 (modulo perhaps the spelling of UTF-8)
 
 Recent the locale.alias file changes these entities:
 
 sd:   sd_IN.UTF-8
 sd_IN.utf8:   sd_IN.UTF-8
 sd@devanagari:sd...@devanagari.utf-8
 sd_IN@devanagari: sd...@devanagari.utf-8
 sd_IN@devanagari.utf8:sd...@devanagari.utf-8

I'm not sure I can parse this comment :-)

Looking at issue20034 I think we are saying that the new updated
local.alias file contains these entries:

sd: sd_IN.UTF-8
sd_IN.utf8: sd_IN.UTF-8
sd@devanagari:  sd...@devanagari.utf-8
sd_IN@devanagari:   sd...@devanagari.utf-8
sd_IN@devanagari.utf8:  sd...@devanagari.utf-8

So my example is wrong with the new locale.alias file. Instead,
sd will map directly to sd_IN.UTF-8.

Still, I think the makelocalalias.py script should correct
the non-standard locale names from sd...@devanagari.utf-8
to sd_IN.UTF-8@devanagari in order to match the output
of locale -a.

--

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



[issue20034] Update locale alias table

2013-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 81f8375e60ce by Serhiy Storchaka in branch '2.7':
Issue #20034: Updated alias mapping to most recent locale.alias file
http://hg.python.org/cpython/rev/81f8375e60ce

New changeset ed62c4c70c4d by Serhiy Storchaka in branch '3.3':
Issue #20034: Updated alias mapping to most recent locale.alias file
http://hg.python.org/cpython/rev/ed62c4c70c4d

--
nosy: +python-dev

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



[issue20034] Update locale alias table

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks for your review, Marc-Andre.

--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Zachary Ware

New submission from Zachary Ware:

The attached patch refactors tkinter._fix's main logic into a function called 
'fix_environ' which is called unconditionally on import, and adds a function 
'unfix_environ' to undo the effects of fix_environ.  fix/unfix_environ are then 
used in all test files that import tkinter (test___all__, test_tcl, test_tk, 
test_ttk_guionly, test_ttk_textonly, test_idle) to ensure that the environment 
is properly set to allow Tcl to load and to suppress regrtest's warning that 
os.environ has been modified.

Since tkinter._fix is an implementation detail, I assume this change isn't 
against the 'no new features' policy of all currently open branches, but if 
this needs to wait until 3.5, that's ok with me.

--
components: Tests, Tkinter
files: suppress_environ_warning.diff
keywords: patch
messages: 206692
nosy: zach.ware
priority: low
severity: normal
stage: patch review
status: open
title: Suppress 'os.environ was modified' warning on Tcl/Tk tests
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33233/suppress_environ_warning.diff

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



[issue20034] Update locale alias table

2013-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 72e68af9e2fa by Serhiy Storchaka in branch 'default':
Issue #20034: Updated alias mapping to most recent locale.alias file
http://hg.python.org/cpython/rev/72e68af9e2fa

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

Do you have an example of code that behaves differently with this patch?  I 
can't find any.

--

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch to tip. The makelocalalias.py script now corrects
the non-standard locale names.

--
Added file: http://bugs.python.org/file33234/locale_devanagari_3.patch

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



[issue20027] Fixed support for Indian locales

2013-12-20 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file33231/locale_devanagari_2.patch

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks fragile. What if some test will import tkinter after other test 
unfix the environment? I suggest unload the tkinter._fix module in 
unfix_environ(). Then next import should implicitly fix the environment. And 
explicit fix_environ() will be not needed.

--
nosy: +serhiy.storchaka

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +r.david.murray

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2013-12-20 Thread Zachary Ware

Zachary Ware added the comment:

I like that idea, though I'm a bit wary of messing around is sys.modules.  Is 
there another way to unload a module that I'm not aware of?

Here's a new patch that does that.

--
Added file: http://bugs.python.org/file33235/suppress_environ_warning.v2.diff

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

One of these doesn't work depending on how you write the exception name.


 python3 -mdoctest src/tete.rst  
 python -mdoctest src/tete.rst   

One cannot put an ellipsis in the exception name so you see how this is a 
problem.

--
components: Demos and Tools, Library (Lib)
files: tete.py
messages: 206698
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: Running same doctests not possible on both py3 and py2
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file33236/tete.py

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

Changes by Maries Ionel Cristian ionel...@gmail.com:


Added file: http://bugs.python.org/file33237/tete.rst

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread R. David Murray

R. David Murray added the comment:

This has already been addressed in issue 7490.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - IGNORE_EXCEPTION_DETAIL should ignore the module name

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Oooops, sorry.

--

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread R. David Murray

R. David Murray added the comment:

No problem.  It's not necessarily *obvious* what one needs to do to make this 
work, so missing it isn't too surprising.

--

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



[issue19717] resolve() fails when the path doesn't exist

2013-12-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, given the diversity of possible behaviours, it starts to seem like it 
should maybe be discussed on python-dev.

--

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



[issue20029] asyncio.SubprocessProtocol is missing

2013-12-20 Thread Antoine Pitrou

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


--
nosy: +gvanrossum, haypo

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+self._loop.call_soon(traceback.clear_frames,
+ self._exception.__traceback__)

This will keep the traceback alive until called by the event loop, even if 
self._exception is cleared in the meantime...

--

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



[issue20029] asyncio.SubprocessProtocol is missing

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

I propose that we fix the code.  There are also some documented Transport 
classes that aren't listed in __all__.

I'll submit the fix.

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread STINNER Victor

STINNER Victor added the comment:

 Do you have an example of code that behaves differently with this patch?  I 
 can't find any.

I didn't check in the Python standard library, but the reference cycle is 
obvious, and I hate such issue. It introduces tricky issues like memory leaks.

Here is an example to demonstrate the issue. The DELETE OBJECT message is 
never displayed, so the object is never deleted (memory leak).

Comment fut.set_exception(err) line to delete the object, or apply attached 
patch.

--
Added file: http://bugs.python.org/file33238/never_deleted.py

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



[issue20029] asyncio.SubprocessProtocol is missing

2013-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a135e790ce5 by Guido van Rossum in branch 'default':
asyncio: Export all abstract protocol and transport classes. Fixes issue #20029.
http://hg.python.org/cpython/rev/0a135e790ce5

--
nosy: +python-dev

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-20 Thread STINNER Victor

New submission from STINNER Victor:

Attached crash.py script does crash Python.

Python traceback on the crash:

(gdb) py-bt
Traceback (most recent call first):
  File /home/haypo/prog/python/default/Lib/tokenize.py, line 431, in open
text = TextIOWrapper(buffer, encoding, line_buffering=True)
  File /home/haypo/prog/python/default/Lib/linecache.py, line 126, in 
updatecache
with tokenize.open(fullname) as fp:
  File /home/haypo/prog/python/default/Lib/linecache.py, line 41, in getlines
return updatecache(filename, module_globals)
  File /home/haypo/prog/python/default/Lib/linecache.py, line 15, in getline
lines = getlines(filename, module_globals)
  File /home/haypo/prog/python/default/Lib/traceback.py, line 65, in 
_extract_tb_or_stack_iter
line = linecache.getline(filename, lineno, f.f_globals)
  File /home/haypo/prog/python/default/Lib/traceback.py, line 18, in 
_format_list_iter
for filename, lineno, name, line in extracted_list:
  File /home/haypo/prog/python/default/Lib/traceback.py, line 153, in 
_format_exception_iter
yield from _format_list_iter(_extract_tb_iter(tb, limit=limit))
  File /home/haypo/prog/python/default/Lib/traceback.py, line 181, in 
format_exception
return list(_format_exception_iter(etype, value, tb, limit, chain))
  File /home/haypo/prog/python/default/Lib/asyncio/futures.py, line 178, in 
__del__
exc.__traceback__)
  Garbage-collecting

End of the C traceback:

#46 0x005aa742 in PyEval_CallObjectWithKeywords (func=method at remote 
0x719e79f8, arg=(), kw=0x0) at Python/ceval.c:4107
#47 0x004ee268 in slot_tp_finalize (
self=Future(_state='FINISHED', _exception=ValueError(), 
_loop=_UnixSelectorEventLoop(_selector=EpollSelector(_epoll=select.epoll at 
remote 0x70dd3a18, _fd_to_key={9: SelectorKey at remote 0x7fffeefaa0e0}, 
_map=_SelectorMapping(_selector=...) at remote 0x718eae90) at remote 
0x718ea1f8, _running=False, _signal_handlers={}, _default_executor=None, 
_ssock=socket at remote 0x7fffef7e6e68, _internal_fds=1, _scheduled=[], 
_ready=collecti---Type return to continue, or q return to quit---
ons.deque at remote 0x718c56e0, _csock=socket at remote 0x7fffeefb5958) 
at remote 0x718ea190, _log_traceback=True, _callbacks=[]) at remote 
0x718ea0c0) at Objects/typeobject.c:5954
#48 0x0043b530 in finalize_garbage (collectable=0x7fffdc90, 
old=0x8eea20 generations+64) at Modules/gcmodule.c:793
#49 0x0043bce5 in collect (generation=2, n_collected=0x0, 
n_uncollectable=0x0, nofail=1) at Modules/gcmodule.c:1009
#50 0x0043cff4 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1625
#51 0x005cd873 in PyImport_Cleanup () at Python/import.c:383
#52 0x0041e898 in Py_Finalize () at Python/pythonrun.c:622
#53 0x0043a65c in Py_Main (argc=2, argv=0x970020) at Modules/main.c:800
#54 0x0041aad9 in main (argc=2, argv=0x7fffe0b8) at 
./Modules/python.c:69

--
files: crash.py
messages: 206707
nosy: haypo
priority: normal
severity: normal
status: open
title: Calling traceback.format_exception() during Pyhon shutdown does crash 
Python
versions: Python 3.4
Added file: http://bugs.python.org/file33239/crash.py

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



[issue20037] Calling traceback.format_exception() during Pyhon shutdown does crash Python

2013-12-20 Thread STINNER Victor

STINNER Victor added the comment:

Begin of the C traceback:

#0  0x004bf70a in PyModule_GetState (m=0x0) at 
Objects/moduleobject.c:292
#1  0x006373b6 in textiowrapper_init (self=0x71073790, 
args=(_io.BufferedReader at remote 0x7fffefa094b8, 'utf-8'), 
kwds={'line_buffering': True}) at ./Modules/_io/textio.c:855
#2  0x004daf26 in type_call (type=0x94d700 PyTextIOWrapper_Type, 
args=(_io.BufferedReader at remote 0x7fffefa094b8, 'utf-8'), 
kwds={'line_buffering': True}) at Objects/typeobject.c:759

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

The cycle will be cleaned up (and the message printed) when the
garbage collector runs next. Your demo doesn't do anything else, so it
never allocates memory, so it never runs gc.collect(). But that's only
because it's a toy program.

Maybe it's time to look into
http://code.google.com/p/tulip/issues/detail?id=42 ? (It proposes to
run gc.collect() occasionally when the loop is idle.)

I am also concerned about Antoine's point -- the patch may actually
*prolong* the life of the traceback.

On Fri, Dec 20, 2013 at 2:15 PM, STINNER Victor rep...@bugs.python.org wrote:

 STINNER Victor added the comment:

 Do you have an example of code that behaves differently with this patch?  I 
 can't find any.

 I didn't check in the Python standard library, but the reference cycle is 
 obvious, and I hate such issue. It introduces tricky issues like memory leaks.

 Here is an example to demonstrate the issue. The DELETE OBJECT message is 
 never displayed, so the object is never deleted (memory leak).

 Comment fut.set_exception(err) line to delete the object, or apply attached 
 patch.

 --
 Added file: http://bugs.python.org/file33238/never_deleted.py

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

--

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



[issue20029] asyncio.SubprocessProtocol is missing

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

There's one issue left: the docs need to document BaseProtocol.

--
assignee:  - haypo
stage:  - needs patch

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Maybe it's time to look into
 http://code.google.com/p/tulip/issues/detail?id=42 ? (It proposes to
 run gc.collect() occasionally when the loop is idle.)

Is it possible to break the cycle instead? Or is the graph of references
too complex for that?

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

The only reasonable place to break the cycle seems to be the frame containing 
the set_exception() call -- but that could be app code.

Looking again at what the patch actually does I think it is too big a hammer 
anyway -- it would break debugging tools that preserve tracebacks and inspect 
the frames later.

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread STINNER Victor

STINNER Victor added the comment:

The cycle will be cleaned up (and the message printed) when the
garbage collector runs next.

Oh, ok. Using the following task, the object is correctly deleted.
---
@asyncio.coroutine
def idle():
while 1:
gc.collect()
yield from asyncio.sleep(0.1)

asyncio.Task(idle())
---

Maybe it's time to look into
http://code.google.com/p/tulip/issues/detail?id=42 ? (It proposes to
run gc.collect() occasionally when the loop is idle.)

I don't like such task. The issue can be documented, maybe with an example of 
call calling gc.collect() regulary? Such background task should be implemented 
in the application to control when the garbage collector is called.

--

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



[issue20032] asyncio.Future.set_exception() creates a reference cycle

2013-12-20 Thread STINNER Victor

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


--
resolution:  - invalid
status: open - closed

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



[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread Guido van Rossum

Guido van Rossum added the comment:

Victor, can you commit the fix (with my suggested improvement)?

--

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



[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

It seems to me that anything that is an 'integer' that can be turned into an 
int without loss of information (has .__index__) is logically a 'number' that 
can be turned into an int possibly with loss of information (has .__int__).  So 
perhaps one of the following should be true:

1. The doc for .__index__ specifies that def __index__ 'must' be followed by 
__int__ = __index__ to make a coherent class. (So Ethan's Grade as written 
above would not qualify.)

2. The type constructor does this for us by adding __int__ as an alias for 
__index__ when the latter is present.

3. Every core usage of __int__ looks for __index__ also. Int() does not do this 
now, but '%d' does, so int(Grade.F) fails but int('%d' % Grade.f) works.

The exact details would depend on whether we want to allow (or at least bless) 
classes with __int__ and __index__ returning different ints.

The docs for bin/oct/hex(x) are clear. Convert an integer number to a 
binary/octal/hexadecimal string. The result is a valid Python expression. If x 
is not a Python int object, it has to define an __index__() method that returns 
an integer. This should not change.

If the domain of %x is going to be a subset of of the domain of %d, it seems to 
me that the exclusion should be of non-integers (such as floats) rather than of 
non-int integers. Given things as they are, I would simply expand the domain of 
%x, etc, to that of %d without bothering to go through a deprecation process.

--
nosy: +terry.reedy
stage:  - test needed
type:  - enhancement

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



[issue19967] asyncio: remove _TracebackLogger

2013-12-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 06ed1691efdc by Victor Stinner in branch 'default':
Issue #19967: Defer the formating of the traceback in asyncio.Future destructor
http://hg.python.org/cpython/rev/06ed1691efdc

--

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



[issue19967] asyncio: remove _TracebackLogger

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



[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2013-12-20 Thread Maciej Szulik

Maciej Szulik added the comment:

I'm attaching merged and fixed patch (issue1100942_full.patch). Though during 
testing I found one issue with the patch: during checking for time part in date 
class I'm using (in _datetimemodule.c-date_strptime) DATE_GET_HOUR etc, but 
when given time parts are 0's then the test fails. Should I leave the patch as 
is, because possibility for 0's is very low or should I check the format string 
for time parts existence? Any further advice is appreciated.

--
Added file: http://bugs.python.org/file33240/issue1100942_full.patch

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



[issue19998] Python 2.7.6 fails to build _ctypes on GCC 2.x toolchain

2013-12-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe an upstream change will be automatically picked up by any subsequent 
CPython release without an explicit tracker patch.

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

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



[issue20003] Language Ref raise doc misssing from None

2013-12-20 Thread Terry J. Reedy

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


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - Document 'from None' in raise statement doc.
type:  - enhancement

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



[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-20 Thread Terry J. Reedy

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


--
stage:  - patch review

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



[issue20015] Allow 1-character ASCII unicode where 1-character str is required

2013-12-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Victor and Stefan are correct. 2.7 is a fixed version of Python. CPython 2.7.z, 
z = 1, only gets bug (and build) fixes. A 'new 2.7 version' would be 2.8, 
which will not happen. The fact that you propose to change the unambiguous doc 
shows that this is an enhancement, not a bugfix. This change would have had to 
be done in 2.7.0.

--
nosy: +terry.reedy
resolution:  - invalid
stage: patch review - committed/rejected
status: open - closed
type:  - enhancement

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



[issue20014] Makes array.array constructor accepts ascii-unicode typecode

2013-12-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This enhancement request would have been nice in 2.7.0 but it is too late for 
bugfix releases. Typecodes have always been shown as instances of str and still 
are. The doc no where suggests that unicode chars should work in 2.7 and it is 
not a bug that they do not.

--
nosy: +terry.reedy
resolution:  - out of date
stage: patch review - committed/rejected
status: open - closed
type: behavior - enhancement

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



[issue20038] Crash due to I/O in __del__

2013-12-20 Thread Guido van Rossum

New submission from Guido van Rossum:

I was writing a new Tulip example (a cache client and server, not yet public) 
and I noticed that when I interrupted the client with ^C I got a traceback 
(expected) followed by a segfault (unexpected).  This is on OSX 10.8 but I 
don't think it is platform dependent.

A little experiment showed that this only happened with Python 3.4 and only 
with the latest Tulip, where Future has a __del__ method.  

According to gdb, the segfault happens on the first line of 
PyModule_GetState(), because the argument 'm' is NULL.

Putting a NULL check in this function averts the segfault but give the 
following disturbing extra traceback:

--- Logging error ---
Traceback (most recent call last):
Exception ignored in: bound method Task.__del__ of 
Task(testing)exception=KeyboardInterrupt()
Traceback (most recent call last):
  File /Users/guido/tulip/asyncio/futures.py, line 177, in __del__
  File /Users/guido/cpython/Lib/logging/__init__.py, line 1278, in error
  File /Users/guido/cpython/Lib/logging/__init__.py, line 1384, in _log
  File /Users/guido/cpython/Lib/logging/__init__.py, line 1394, in handle
  File /Users/guido/cpython/Lib/logging/__init__.py, line 1456, in 
callHandlers
  File /Users/guido/cpython/Lib/logging/__init__.py, line 835, in handle
  File /Users/guido/cpython/Lib/logging/__init__.py, line 959, in emit
  File /Users/guido/cpython/Lib/logging/__init__.py, line 888, in handleError
  File /Users/guido/cpython/Lib/traceback.py, line 169, in print_exception
  File /Users/guido/cpython/Lib/traceback.py, line 153, in 
_format_exception_iter
  File /Users/guido/cpython/Lib/traceback.py, line 18, in _format_list_iter
  File /Users/guido/cpython/Lib/traceback.py, line 65, in 
_extract_tb_or_stack_iter
  File /Users/guido/cpython/Lib/linecache.py, line 15, in getline
  File /Users/guido/cpython/Lib/linecache.py, line 41, in getlines
  File /Users/guido/cpython/Lib/linecache.py, line 126, in updatecache
  File /Users/guido/cpython/Lib/tokenize.py, line 431, in open
TypeError: bad argument type for built-in operation

This suggests the problem is triggered by some I/O due to the exception logging 
in the __del__ method.

The gdb traceback (too big to post here) tells me that this PyModule_GetState() 
call is in the IO_STATE macro in textiowrapper_init().  The whole thing seems 
to be in a GC run called from Py_Finalize().  Check out the attached @bt.txt.

Any ideas?  (The TypeError is simply what PyModule_GetState() returns for a 
non-module argument -- I made it take the same exit path for NULL.)

--
files: @bt.txt
messages: 206721
nosy: gvanrossum, haypo, pitrou
priority: normal
severity: normal
status: open
title: Crash due to I/O in __del__
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file33241/@bt.txt

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



[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x

2013-12-20 Thread Serhiy Storchaka

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


--
nosy: +terry.reedy

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