[issue17047] Fix double double words words

2013-01-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In additional to changeset 07488c3c85f1, here are yet some possible word 
duplications:

Lib/_pyio.py:306:Change the stream position to byte offset offset. 
offset is
Lib/concurrent/futures/_base.py:520:fn: A callable that will take 
take as many arguments as there are
Lib/tkinter/__init__.py:3116:have the same start and and end line as 
the parent widget, but
Lib/tkinter/tix.py:149:Locates a bitmap file of the name name.xpm or 
name in one of the
Lib/tkinter/tix.py:160:Locates an image file of the name name.xpm, 
name.xbm or name.ppm
Lib/lib2to3/pgen2/grammar.py:23:Pgen parsing tables tables conversion 
class.
Lib/lib2to3/pgen2/grammar.py:48: states, each state is is a 
list of arcs, and each
Lib/email/_header_value_parser.py:1866:We allow anything except the 
excluded characters, but but if we find any
Lib/email/_encoded_words.py:17:# to to the CTE tables, but YAGNI for now.  'q' 
is Quoted Printable, 'b' is
Lib/email/mime/text.py:29:# If no _charset was specified, check to see 
see if there are non-ascii
Lib/email/policy.py:26:The API extensions enabled by this this policy are 
currently provisional.
Lib/unittest/mock.py:1420:attributes that your production code creates at 
runtime. It is off by by
Lib/test/test_socket.py:845:# Try udp, but don't barf it it doesn't 
exist
Lib/test/test_descrtut.py:322:getx() and and setx():
Lib/test/test_decimal.py:4495:# Do operations and check that it didn't 
change change internal objects.
Lib/distutils/command/install.py:266:raise 
DistutilsOptionError(can't combine user with with prefix/
Lib/distutils/tests/test_install.py:168:# can't combine user with with 
prefix/exec_prefix/home or
python-gdb.py:1466:'''Is this frame collect within the the 
garbage-collector?'''
Include/pyport.h:884: * also also takes care of Apple's universal builds.
Modules/_io/iobase.c:79:Change the stream position to byte offset offset. 
offset is\n
Modules/_heapqmodule.c:91:/* The leaf at pos is empty now.  Put newitem 
there, and and bubble
Modules/_heapqmodule.c:431:/* The leaf at pos is empty now.  Put newitem 
there, and and bubble
Modules/socketmodule.c:3547:   ensures that that doesn't happen. */
Modules/binascii.c:41:** I have attempted to break with this tradition, but I 
guess that that
Modules/posixmodule.c:9747:Return the value of extended attribute attribute on 
path.\n\
Modules/posixmodule.c:9825:Set extended attribute attribute on path to value.\n\
Modules/posixmodule.c:9890:Remove extended attribute attribute on path.\n\
PC/msvcrtmodule.c:133:Create a C runtime file descriptor from the file handle 
handle. The\n\
Doc/c-api/intro.rst:436::c:func:`sum_sequence` example above.  It so happens 
that that example doesn't
Doc/c-api/long.rst:206:   Return a C :c:type:`size_t` representation of of 
*pylong*.  *pylong* must be
Doc/c-api/long.rst:218:   Return a C :c:type:`unsigned PY_LONG_LONG` 
representation of of *pylong*.
Doc/library/stdtypes.rst:2640:  Cast 1D/unsigned char to to 2D/unsigned 
long::
Doc/library/email.policy.rst:330:  line breaks and and any (RFC invalid) 
binary data it may contain.
Doc/library/unittest.mock.rst:991:attributes that your production code 
creates at runtime. It is off by by
Doc/whatsnew/3.3.rst:1539:New attribute attribute 
:data:`multiprocessing.Process.sentinel` allows a
Lib/idlelib/extend.txt:57:Here is a complete example example:
Lib/idlelib/extend.txt:75:used to to configure the loading of extensions and to 
establish key (or, more

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 180747
nosy: docs@python, ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Fix double double words words
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue17048] calendar should understand full- vs. half-width characters

2013-01-27 Thread Robert Xiao

New submission from Robert Xiao:

Try this at your command-prompt (requires utf8 support in the terminal 
emulator):

$ python3 -m calendar -L zh_CN -e utf8

The result is a mess like this:

  2013

 一月二月三月
一  二  三  四  五  六  日   一  二  三  四  五  六  日   一  二  三  四  五  六  日
1  2  3  4  5  6   1  2  3   1  2  3
 7  8  9 10 11 12 13   4  5  6  7  8  9 10   4  5  6  7  8  9 10
14 15 16 17 18 19 20  11 12 13 14 15 16 17  11 12 13 14 15 16 17
21 22 23 24 25 26 27  18 19 20 21 22 23 24  18 19 20 21 22 23 24
28 29 30 31   25 26 27 28   25 26 27 28 29 30 31

Note the irregular spacing. The calendar module assumes that the characters are 
half-width, when in reality they are full-width characters.

calendar should use unicodedata.east_asian_width to determine if a character is 
full- or half-width, and adjust the spacing accordingly.

--
components: Library (Lib)
messages: 180748
nosy: nneonneo
priority: normal
severity: normal
status: open
title: calendar should understand full- vs. half-width characters
versions: Python 3.2

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



[issue17047] Fix double double words words

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And yet some:

Mac/README:40:  Create a universal binary build of of Python. This can be used 
with both
Misc/HISTORY:781:  some also support accepting an open file descriptor in place 
of of a path
Misc/HISTORY:1415:  trying to set a non-binary value as a comment is now now 
raised at the time
Misc/HISTORY:3055:  environment after Distutils set it.  Instead, have 
Distutils set the the
Tools/pybench/README:6: Extendable suite of of low-level benchmarks for 
measuring

--

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



[issue17049] calendar throws UnicodeEncodeError when locale is specified

2013-01-27 Thread Robert Xiao

New submission from Robert Xiao:

Try this at a command-prompt:

$ python -m calendar -L ja_JP --encoding utf8

The result is a crash:

Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py, 
line 162, in _run_module_as_main
__main__, fname, loader, pkg_name)
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py, 
line 72, in _run_code
exec code in run_globals
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/calendar.py, 
line 708, in module
main(sys.argv)
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/calendar.py, 
line 703, in main
result = result.encode(options.encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 49: 
ordinal not in range(128)

The reason is because the TimeEncoding class doesn't properly return the 
encoding it should use, so 'encoding' ends up being None in with 
TimeEncoding(self.locale) as encoding: lines.

Trivial patch:

--- calendar.py 2013-01-27 03:48:08.0 -0500
+++ calendar.py 2013-01-27 03:48:08.0 -0500
@@ -488,6 +488,7 @@
 def __enter__(self):
 self.oldlocale = _locale.getlocale(_locale.LC_TIME)
 _locale.setlocale(_locale.LC_TIME, self.locale)
+return self.locale[1]
 
 def __exit__(self, *args):
 _locale.setlocale(_locale.LC_TIME, self.oldlocale)

--
components: Library (Lib)
messages: 180750
nosy: nneonneo
priority: normal
severity: normal
status: open
title: calendar throws UnicodeEncodeError when locale is specified
versions: Python 2.7

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



[issue17048] calendar should understand full- vs. half-width characters

2013-01-27 Thread Robert Xiao

Robert Xiao added the comment:

This is also a problem in Python 2.7 after the patch in issue17049 is applied.

--
versions: +Python 2.7

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



[issue17050] argparse.REMAINDER doesn't work as first argument

2013-01-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

Works:

 p = ArgumentParser(prog='test.py')
 p.add_argument('pos')
 p.add_argument('remainder', nargs=argparse.REMAINDER)
 p.parse_args(['abc', '--def'])
Namespace(pos='abc', remainder=['--def'])

Doesn't work:

 p = ArgumentParser(prog='test.py')
 p.add_argument('remainder', nargs=argparse.REMAINDER)
 p.parse_args(['--def'])
usage: test.py [-h] ...
test.py: error: unrecognized arguments: --def

This use case comes up, for example, if you would like to extract all the 
arguments passed to a subparser in order to pass to a different program.

--
components: Library (Lib)
messages: 180752
nosy: bethard, chris.jerdonek
priority: normal
severity: normal
stage: test needed
status: open
title: argparse.REMAINDER doesn't work as first argument
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue14174] argparse.REMAINDER fails to parse remainder correctly

2013-01-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

See also issue 17050 for a reduced/simple case where argparse.REMAINDER doesn't 
work (the case of the first argument being argparse.REMAINDER).

--
nosy: +chris.jerdonek

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



[issue17048] calendar should understand full- vs. half-width characters

2013-01-27 Thread Serhiy Storchaka

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


--
dependencies: +Add functions to get the width in columns of a character

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



[issue17051] Memory leak in os.path.isdir under Windows

2013-01-27 Thread Robert Xiao

New submission from Robert Xiao:

[From 
http://stackoverflow.com/questions/12648737/huge-memory-leak-in-repeated-os-path-isdir-calls]

os.path.isdir() leaks memory under Windows in Python 2.7. The core cause is 
this snippet:

Modules/posixmodule.c:4226:
if (!PyArg_ParseTuple(args, et:_isdir,
  Py_FileSystemDefaultEncoding, path))
return NULL;

attributes = GetFileAttributesA(path);
if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE;

check:
if (attributes  FILE_ATTRIBUTE_DIRECTORY)
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;


The buffer returned by the et ParseTuple format must be freed after use. 
Since it isn't freed, we get a memory leak here.

Patch:

--- a/Modules/posixmodule.c Mon Apr 09 19:04:04 2012 -0400
+++ b/Modules/posixmodule.c Sun Jan 27 04:10:34 2013 -0500
@@ -4226,6 +4226,7 @@
 return NULL;
 
 attributes = GetFileAttributesA(path);
+PyMem_Free(path);
 if (attributes == INVALID_FILE_ATTRIBUTES)
 Py_RETURN_FALSE;

--
components: Library (Lib)
messages: 180754
nosy: nneonneo
priority: normal
severity: normal
status: open
title: Memory leak in os.path.isdir under Windows
type: resource usage
versions: Python 2.6, Python 2.7

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



[issue17052] unittest discovery should use self.testLoader

2013-01-27 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The _do_discovery() method of unittest.TestProgram:

def _do_discovery(self, argv, Loader=loader.TestLoader):

(from http://hg.python.org/cpython/file/2cf89e2e6247/Lib/unittest/main.py#l222 )

should be using self.testLoader instead of loader.TestLoader.  It's not 
consistent for some parts of TestProgram to use loader.TestLoader and other 
parts to use the testLoader passed in via the constructor.

--
components: Library (Lib)
messages: 180755
nosy: chris.jerdonek, ezio.melotti, michael.foord
priority: normal
severity: normal
stage: test needed
status: open
title: unittest discovery should use self.testLoader
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue17049] calendar throws UnicodeEncodeError when locale is specified

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for report and suggestion, Robert Xiao. The patch should be a little 
more complex however.

--
keywords: +patch
nosy: +rhettinger, serhiy.storchaka
stage:  - patch review
type:  - behavior
Added file: http://bugs.python.org/file28868/calendar_locale-2.7.patch

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



[issue17049] calendar throws UnicodeEncodeError when locale is specified

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And here is an updated test for 3.x.

--
versions: +Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28869/calendar_locale-3.x.patch

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



[issue16772] int() accepts float number base

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79db70bd3188 by Mark Dickinson in branch 'default':
Issue #16772: in int(x, base), non-integer bases must have an __index__ method.
http://hg.python.org/cpython/rev/79db70bd3188

--

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



[issue16772] int() accepts float number base

2013-01-27 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
status: open - closed

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



[issue16772] int() accepts float number base

2013-01-27 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
resolution:  - fixed

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



[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2013-01-27 Thread Mark Dickinson

Mark Dickinson added the comment:

Postponing as suggested.

--
resolution:  - postponed
status: open - closed

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



[issue15438] document that math.pow is inappropriate for integers

2013-01-27 Thread Mark Dickinson

Mark Dickinson added the comment:

 Anyone wants to suggest a specific wording?

How about the attached patch?

--
keywords: +patch
Added file: http://bugs.python.org/file28870/issue15438.patch

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



[issue4972] context managerment support in imaplib, smtplib, ftplib

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Imaplib tests was changed a lot since 3.2. Here is an updated patch.

--
nosy: +serhiy.storchaka
Added file: http://bugs.python.org/file28871/imaplib_with_2.patch

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



[issue7576] Avoid warnings in PyModuleDef_HEAD_INIT

2013-01-27 Thread Serhiy Storchaka

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


--
resolution:  - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder:  - PyModuleDef_HEAD_INIT does not explicitly initialize all fields 
of m_base

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



[issue17051] Memory leak in os.path.isdir under Windows

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch. Thank you, Robert Xiao.

Can you please submit a contributor form?

http://python.org/psf/contrib/contrib-form/
http://python.org/psf/contrib/

--
assignee:  - serhiy.storchaka
components: +Extension Modules, Windows -Library (Lib)
nosy: +serhiy.storchaka
stage:  - commit review
versions:  -Python 2.6

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



[issue16445] SEGFAULT when deleting Exception.message

2013-01-27 Thread Serhiy Storchaka

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


--
priority: normal - high

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



[issue16447] SEGFAULT when setting type.__name__

2013-01-27 Thread Serhiy Storchaka

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


--
priority: normal - high

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



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Charles-François, are you going to finish this before 2.7.4 RC released? The 
patch should be updated to address Antoine's comments.

--

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



[issue15809] IDLE console uses incorrect encoding.

2013-01-27 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Any news?

--
priority: normal - critical

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



[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2013-01-27 Thread Serhiy Storchaka

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


--
type: crash - enhancement
versions: +Python 3.4 -Python 3.3

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Let's go ahead.

--

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



[issue13886] readline-related test_builtin failure

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf0f450b3299 by Nadeem Vawda in branch '3.2':
Issue #13886: Fix input() to not strip out supposedly-invalid input bytes.
http://hg.python.org/cpython/rev/cf0f450b3299

--
nosy: +python-dev

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



[issue13886] readline-related test_builtin failure

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c8732049dd5 by Nadeem Vawda in branch '3.3':
Issue #13886: Fix input() to not strip out supposedly-invalid input bytes.
http://hg.python.org/cpython/rev/5c8732049dd5

--

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



[issue17053] pydoc should use inspect.signature instead of inspect.getfullargspec

2013-01-27 Thread Ronald Oussoren

New submission from Ronald Oussoren:

pydoc currently uses inspect.getfullargspec to determine the signature of a 
callable when rendering its documentation. It should use inspect.signature 
instead because that function can work with callables that aren't python 
functions or methods.

Changing pydoc to use inspect.signature would make it possible to render more 
useful documentation for callables implemented in C, when those callables also 
implement the __signature__ special method.

--
components: Library (Lib)
messages: 180768
nosy: ronaldoussoren
priority: low
severity: normal
stage: needs patch
status: open
title: pydoc should use inspect.signature instead of inspect.getfullargspec
type: behavior
versions: Python 3.4

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



[issue13886] readline-related test_builtin failure

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9774721bfc32 by Nadeem Vawda in branch 'default':
Issue #13886: Fix input() to not strip out supposedly-invalid input bytes.
http://hg.python.org/cpython/rev/9774721bfc32

--

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



[issue13886] readline-related test_builtin failure

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12223782031f by Nadeem Vawda in branch '2.7':
Issue #13886: Fix input() to not strip out supposedly-invalid input bytes.
http://hg.python.org/cpython/rev/12223782031f

--

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



[issue13886] readline-related test_builtin failure

2013-01-27 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
assignee:  - nadeem.vawda
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 2.7

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



[issue11729] libffi assembler relocation check is not robust, fails with clang

2013-01-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay with me to backport.

--

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



[issue17051] Memory leak in os.path.isdir under Windows

2013-01-27 Thread Robert Xiao

Robert Xiao added the comment:

The PSF form really needs a PDF version. Anyway, 'tis duly submitted.

--

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



[issue15438] document that math.pow is inappropriate for integers

2013-01-27 Thread R. David Murray

R. David Murray added the comment:

I don't think it should be .. note, but otherwise it looks fine to me.

--

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



[issue17041] Fix tests for build --without-doc-strings

2013-01-27 Thread R. David Murray

R. David Murray added the comment:

Stefan: as Serhiy pointed out, the two parameters control different things.  
While it may be true that it is *likely* that someone would use both if they 
use one, it is not guaranteed.  I think it is better to keep them separate, 
since while they are related operationally they are otherwise orthogonal, so 
linking them in the test code just seems wrong :)

--

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



[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Maybe the Unicode HOWTO could be reorganized so that it first introduces the 
bare minimum and then expands the concepts for whoever wants to know more?
Or should we have a basic and an advanced Unicode HOWTO?

--

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



[issue16772] int() accepts float number base

2013-01-27 Thread Ezio Melotti

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


--
stage: needs patch - committed/rejected

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



[issue11729] libffi assembler relocation check is not robust, fails with clang

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9792b27d410 by Stefan Krah in branch '2.7':
Issue #11729: Backport commit bff052d9 from libffi upstream in order to fix
http://hg.python.org/cpython/rev/b9792b27d410

--

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



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-01-27 Thread Charles-François Natali

Charles-François Natali added the comment:

 Charles-François, are you going to finish this before 2.7.4 RC released? The 
 patch should be updated to address Antoine's comments.

No.
I don't have access to a 64-bit box, which makes it difficult to write
(I don't get compiler warnings) and test.

Feel free to pick up the patch and update it!

--

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



[issue17041] Fix tests for build --without-doc-strings

2013-01-27 Thread Stefan Krah

Stefan Krah added the comment:

Right, keeping the cases separate is indeed clearer.

Serhiy, in case you are waiting for my stick to minimal changes comment to be
resolved:  People apparently *do* use --without-doc-strings, so the additional
code in test_pydoc.py is really fine.

--

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



[issue17041] Fix tests for build --without-doc-strings

2013-01-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6c0d9d1ce63e by Serhiy Storchaka in branch '2.7':
- Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/6c0d9d1ce63e

New changeset 241b655c23b6 by Serhiy Storchaka in branch '3.2':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/241b655c23b6

New changeset b2fa459d95d6 by Serhiy Storchaka in branch '3.3':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/b2fa459d95d6

New changeset 754112dc3bbb by Serhiy Storchaka in branch 'default':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/754112dc3bbb

--
nosy: +python-dev

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



[issue17041] Fix tests for build --without-doc-strings

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Stefan. I got notification about your comments on email and fixed 
patches.

Here is a patch which fixes doctests (for 2.7 only need replace test.support by 
test.test_support). I'm not sure this is a right way to do conditional doctests.

--
Added file: http://bugs.python.org/file28872/doctests_without_docstrings.patch

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



[issue17025] reduce multiprocessing.Queue contention

2013-01-27 Thread Charles-François Natali

Charles-François Natali added the comment:

 I would like to suggest again my idea of doing it in Connection instead,
 with new methods (e.g. locked_send and locked_recv). Especially given
 it can be useful in user code to have a thread-safe Connection (I'm in
 this situation currently).

I intended to do this initially, but then it turned out to be much
more intrusive than what I initially thought, and opted for a simpler
approach.

While it's probably a good idea to implement it in Connection, I don't
really like the idea of adding new distinct methods:
- this would require allocating locks for every connection, which
wouldn't be used most of the time
- since locks are implemented atop POSIX semaphores and some platforms
only support a handful of them, it could trigger some failure
- it's not really just adding locked_send() and locked_recv(): you
must implemented locked
send_bytes/send/recv_bytes/recv_bytes_into/recv: also, if we want to
implement timed and non blocking receive (which is supported by
Queue.get), it should probably be handled here

So basically, I think the right way to do it would be to define an
abstract ConcurrentConnection, or AtomicConnection which would
override Connection methods making them thread/process safe.
We'd also need exposing AtomicPipe...

--

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



[issue17025] reduce multiprocessing.Queue contention

2013-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

For the record, I tried the Connection approach and here is what I ended up 
with.

--
Added file: http://bugs.python.org/file28873/locked_send_recv.patch

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon

Brett Cannon added the comment:

OK, let's take a step back here and look at what exactly we are trying to 
simplify (which is now the updated example in PEP 399)::

from test.support import import_fresh_module
import unittest

c_heapq = import_fresh_module('heapq', fresh=['_heapq'])
py_heapq = import_fresh_module('heapq', blocked=['_heapq'])


class ExampleTest:

def test_example(self):
self.assertTrue(hasattr(self.module, 'heapify'))


class PyExampleTest(ExampleTest, unittest.TestCase):
module = py_heapq


@unittest.skipUnless(c_heapq, 'requires the C _heapq module')
class CExampleTest(ExampleTest, unittest.TestCase):
module = c_heapq


if __name__ == '__main__':
unittest.main()


Ignoring the unittest.main() boilerplate, we have two import_fresh_module() 
calls and the creation of two subclasses of ExampleTest, both of which inherit 
from unittest.TestCase and one of which is skipped if the acceleration code is 
lacking. So there is some boilerplate. The question is whether a solution be 
made that isn't too magical to minimize this code.

In my head I see this becoming something more like::

from test.support import PEP399Tests

pep399_tests = PEP399Tests('heapq', '_heapq')

class ExampleTest:

def test_example(self):
self.assertTrue(hasattr(self.heapq, 'heapify'))

PyExampleTest, CExampleTest = pep399_tests.create_test_cases(ExampleTest)


if __name__ == '__main__':
unittest.main()


This would cut out the import_fresh_module() calls (which don't need to be 
injected globally as you should be accessing the code through the test class' 
attribute storing the module and if you don't care what version you get you 
just do a standard imoprt), remembering to subclass unittest.TestCase, and to 
skip the accelerated version of the tests if it isn't needed. Basically it goes 
from 7 lines to 2 with not repetitious lines. You could make this a decorator, 
but honestly it's the same number of lines without the magic of mucking with a 
module's globals by getting at them through sys.modules (the decorator really 
only saves you from typing the variable names to hold the new test classes and 
the test class argument to begin with).

And the implementation should be relatively straight-forward (thanks to Eric 
having done most of the thinking on what needs to happen)::

  class PEP399Tests:
# Using keyword-only arguments you could go as far as allowing for
# customizing the attribute name to set, class name prefixes, etc.
def __init__(module_name, *accelerated_names):
  self.module_name = module_name
  self.py_module = import_fresh_module(module_name, fresh=accelerated_names)
  self.accelerated_module = import_fresh_module(module_name, 
block=accelerated_names)

def create_test_cases(self, test_class):
  class PyTestCase(test_class, unittest.TestCase): pass
  PyTestCase.__name__ = 'Py' + test_class.__name__
  setattr(PyTestCase, self.module_name, self.py_module)
  if self.accelerated_module is None:
AcceleratedTestCase = None
  else:
class AcceleratedTestCase(test_class, unittest.TestCase): pass
AcceleratedTestCase.__name__ = 'Accelerated' + test_class.__name__
setattr(AcceleratedTestCase, self.module_name, self.accelerated_module)
  return PyTestCase, AcceleratedTestCase


Does this approach seem more reasonable to people in terms of cutting down 
boilerplate without being too magical?

--

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



[issue17041] Fix tests for build --without-doc-strings

2013-01-27 Thread Stefan Krah

Stefan Krah added the comment:

doctests_without_docstrings.patch looks good to me.

--

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



[issue4972] context management support in imaplib, smtplib, ftplib

2013-01-27 Thread Berker Peksag

Berker Peksag added the comment:

The patch lacks documentation updates.

--
nosy: +berker.peksag
title: context managerment support in imaplib, smtplib, ftplib - context 
management support in imaplib, smtplib, ftplib

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



[issue17049] calendar throws UnicodeEncodeError when locale is specified

2013-01-27 Thread Ned Deily

Ned Deily added the comment:

See also Issue13539.

--
nosy: +ned.deily

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Note that while this works for the simple case, it doesn't work whenever you 
need additional tests or attributes that are specific for one of the two 
classes, or when you have additional base classes.  This is also not so 
uncommon.  I think the skip on the accelerated version might not be necessary 
in some situations.

IOW we have to trade between compactness, flexibility, and readability, and 
trying to improve one side will likely make other aspects worse.

I don't think there would be any problem at grouping the two 
import_fresh_module() in a single call that returns the two modules though.  (I 
would also avoid the use of pep399 in the names -- it's not really readable 
unless you can map pep numbers with their titles.)

--

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



[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2013-01-27 Thread Matthias Klose

Matthias Klose added the comment:

just saw the comment about .hgtouch in 
http://bugs.python.org/issue15819#msg169484

attaching a patch for it here (as proposed on python-committers).

--
nosy: +doko
Added file: http://bugs.python.org/file28874/hgtouch.diff

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

 As Richard explained, this will not break working code, this will break only 
 broken code

If code is both working and broken, for some reasonable meaning of 'working' 
and 'broken', breaking such broken code *will* break working code. I understood 
Richard as saying that code that 'works by dumb luck' is *also* broken.

I agree we do not need to retain unpredictable 'dumb luck' -- in future 
versions. But in the absence of a clear discrepancy between doc and behavior 
(the definition of a bug) I believe breaking such code in a bugfix release 
would be contrary to current policy.

--

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



[issue17054] cStringIO.StringIO aborted when more then INT_MAX bytes written

2013-01-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Reproduced on x8 snakebite.

% ./python.exe 
Python 2.7.3+ (2.7:38a10d0778d2+, Jan 27 2013, 20:05:15) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type help, copyright, credits or license for more information.
Could not open PYTHONSTARTUP
IOError: [Errno 2] No such file or directory: '/Users/cpython/.pythonrc'
 from cStringIO import StringIO
[38179 refs]
 f = StringIO()
[38181 refs]
 s = 'x' * 2**30
[38183 refs]
 f.write(s)
[38183 refs]
 f.write(s)
Assertion failed: (oself-pos + l  INT_MAX), function O_cwrite, file 
/Users/cpython/hg/storchaka/Modules/cStringIO.c, line 421.
zsh: abort  ./python.exe

--
components: IO
messages: 180790
nosy: serhiy.storchaka
priority: high
severity: normal
stage: needs patch
status: open
title: cStringIO.StringIO aborted when more then INT_MAX bytes written
type: crash
versions: Python 2.7

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



[issue17054] cStringIO.StringIO aborted when more then INT_MAX bytes written

2013-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Isn't is the same as issue7358?

--
nosy: +pitrou

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



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have picked up it.

Actually BINSTRING format supports only strings less 2GiB, so test should be 
changed. But there are other bugs which prohibit pickling a lot of data. For 
one I open issue17054.

--
dependencies: +cStringIO.StringIO aborted when more then INT_MAX bytes written

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



[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2013-01-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I basically agree with Ezio. The doc currently starts with

Introduction to Unicode
History of Character Codes
...

It ends with

Tips for Writing Unicode-aware Programs.
  ...
  The most important tip is:
Software should only work with Unicode strings internally, decoding the 
input data as soon as possible and encoding the output only at the end.

I think the how-to should *start* with that general principle and continue with 
the specific task-based how-tos from the thread. This will tell people who at 
least vaguely know the following material how to get going in a practical 
manner.

--
versions: +Python 3.4

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



[issue13539] Return value missing in calendar.TimeEncoding.__enter__

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue17049. This is not a theoretical bug.

--
nosy: +serhiy.storchaka
versions:  -Python 3.2, Python 3.3

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



[issue1764286] inspect.getsource does not work with decorated functions

2013-01-27 Thread Ezio Melotti

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


--
versions: +Python 3.3, Python 3.4

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



[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

If we agree on this, I can propose a patch in #4153 and this issue can be 
closed.

--

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



[issue13539] Return value missing in calendar.TimeEncoding.__enter__

2013-01-27 Thread Éric Araujo

Éric Araujo added the comment:

Then you can close one bug as duplicate and commit a fix for the other :)

--

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Every bugfix breaks some code. As a compromise I propose set m_obj-size = 
PY_SSIZE_T_MAX in case of overflow and emit a warning.

--

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



[issue1298835] Add a vendor-packages directory for system-supplied modules

2013-01-27 Thread Trent Nelson

Changes by Trent Nelson tr...@snakebite.org:


--
nosy: +brian-cameron-oracle, trent

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



[issue1145257] shutil.copystat() may fail...

2013-01-27 Thread Petr Prikryl

Petr Prikryl added the comment:

Well, it is quite an old event. Anyway, I have fixed the simple example, and 
launched it on Python 2.6, 2.7, 3.2, 3.3. It does not fail now. But I did not 
tested it heavily.

From my point of view, it was probably fixed.

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Eli Bendersky

Eli Bendersky added the comment:

Brett - you approach is certainly less magical. While you're at it, how about 
PEP 399 recommending the import_fresh_modules calls not being in the global 
context, but rather class/instance attributes of the test cases? This is what 
both yours and Eric's decorator do, and it's better common sense.

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

That wouldn't work if there is a skip decorator that checks that the C module 
is available :)

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FWIW, I like Brett's approach much better.
Also, I agree with Ezio that pep399 shouldn't be in the name.

--

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



[issue17055] ftplib.ftpcp test

2013-01-27 Thread Michał Jastrzębski

New submission from Michał Jastrzębski:

Test for ftplib.ftpcp.

--
components: Tests
files: ftpcp_test.patch
keywords: patch
messages: 180802
nosy: inc0
priority: normal
severity: normal
status: open
title: ftplib.ftpcp test
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file28875/ftpcp_test.patch

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



[issue17055] ftplib.ftpcp test

2013-01-27 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, giampaolo.rodola
stage:  - patch review

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Eli Bendersky

Eli Bendersky added the comment:

 That wouldn't work if there is a skip decorator that checks that the C
module is available :)

Yes, but that's easily amended with just raising SkipTest in the setUp
instead. Not polluting the global namespace has its merits, especially when
the import sequence is so funky you want to clearly separate testing of the
two modules.

--

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



[issue17055] ftplib.ftpcp test

2013-01-27 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

ftplib.ftpcp? What is that? I do not understand what you're trying to test. 
ftplib test suite is already pretty extended.

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

That would work if we use something Brett's proposal, so that we can create a 
default setUp that raises SkipTest.  My comment was about using module = 
import_fresh_module() directly in the class body of the subclasses as they are 
currently documented in PEP 399.
The point is that, while Brett's proposal doesn't look too bad, I'm not sure 
it's flexible enough.

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon

Brett Cannon added the comment:

On Sun, Jan 27, 2013 at 3:13 PM, Ezio Melotti rep...@bugs.python.orgwrote:


 Ezio Melotti added the comment:

 Note that while this works for the simple case, it doesn't work whenever
 you need additional tests or attributes that are specific for one of the
 two classes,

Sure it does. The modules are simply attributes on the PEP399Test instance,
so you can still access the modules just as easily in test classes that
don't need to be tested with both possible modules.

or when you have additional base classes.

That can easily be solved with the argument to create_test_cases(), e.g.
``def create_test_cases(*bases_classes): ... class PyTest(*(base_classes +
[unittest.TestCase])): pass``.

  This is also not so uncommon.  I think the skip on the accelerated
 version might not be necessary in some situations.


Then don't use this approach. It doesn't have to apply to every single test
class in a module. It just needs to help in the simple case.


 IOW we have to trade between compactness, flexibility, and readability,
 and trying to improve one side will likely make other aspects worse.


There is no trade-off. Either you can use this approach or you simply don't
and use the slightly longer form. This doesn't mean the current approach we
use can't continued to be used, just that the simple case can be made
really simple.

 I don't think there would be any problem at grouping the two
 import_fresh_module() in a single call that returns the two modules though.

And that can still be a useful thing for the class; for test modules whose
needs are simply too complicated then the instantiated instance can be
nothing more than a streamlined way of getting at both modules.

  (I would also avoid the use of pep399 in the names -- it's not really
 readable unless you can map pep numbers with their titles.)

I came up with the name on the fly when I could think of anything better in
5 seconds. =) I assumed a different name would be used if this approached
was decided upon and went into test.support.

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

 This is also not so uncommon.  I think the skip on the accelerated
 version might not be necessary in some situations.

Then don't use this approach. It doesn't have to apply to every single test 
class in a module. It just needs to help in the simple case.

What I was trying to say is that since the special cases are not so uncommon, 
we might not have many simple cases where this idiom could be used to save a 
few lines, and we will end up with two different idioms for the same thing.

--

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



[issue17056] Support Visual Studio 2012

2013-01-27 Thread Gili T.

New submission from Gili T.:

msvc9compiler needs to check for the VS110COMNTOOLS environment variable in 
order to support Visual Studio 2012. Currently it complains cannot find 
vcvarsall.bat.

The following workaround works for now:

SET VS90COMNTOOLS=%VS110COMNTOOLS%

--
components: Build
messages: 180808
nosy: cowwoc
priority: normal
severity: normal
status: open
title: Support Visual Studio 2012
type: enhancement
versions: Python 2.7

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



[issue17056] Support Visual Studio 2012

2013-01-27 Thread Ezio Melotti

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


--
components: +Windows
nosy: +brian.curtin

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon

Brett Cannon added the comment:

To prevent speculation, the files that mention import_fresh_module are:

# Without changes to test classes
Lib/test/test_bisect.py: would work if you made the attribute configurable 
(e.g. self.module instead of self.bisect
Lib/test/test_heapq.py: would work
Lib/test/test_warnings.py: would work if you made the attribute configurable

# With minor changes to test classes
Lib/test/json_tests/__init__.py: would work if you took out the function 
accessing shortcuts (e.g. self.json.loads instead of self.loads)
Lib/test/test_functools.py: would work if you took out the function accessing 
shortcuts

# Won't work
Lib/test/test_datetime.py: has its own crazy version of this approach (although 
it sounds like part of it is because of problem with import_fresh_module and 
other things that might need to be fixed)
Lib/test/test_decimal.py: won't work because of fractions modules
Lib/test/test_xml_etree.py: doctest-based
Lib/test/test_xml_etree_c.py: specific to accelerated version

# Doesn't apply
Lib/test/support.py: because it defines it =) 
Lib/test/test_bz2.py: used in a single test method
Lib/test/test_importlib/test_api.py: used in a single test
Lib/test/test_support.py: obvious =)


So out of 9 test modules it will work with 5 of them (2 with either 
search-and-replace changes to the test code or making the proposed solution 
more flexible) and not w/ 4 (or 3 if you don't count the etree tests as 
separate, and the test_datetime seems weird as to why it's so complicated based 
on the comments in the code). So overall it still seems like a win to me, 
especially if we keep adding more test modules that need this approach.

--

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



[issue17056] Support Visual Studio 2012

2013-01-27 Thread Brian Curtin

Brian Curtin added the comment:

This change can only happen on 3.4.

--
versions: +Python 3.4 -Python 2.7

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Brett Cannon

Brett Cannon added the comment:

I took a closer look at test_datetime and it probably should be using this 
approach, but because the tests seemed to have been copied from Zope the tests 
were left as-is and instead the testing approach we have been using was 
actually forced upon the test module instead of datetime. So it would probably 
work with some work to refactor the code to use it.

--

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



[issue17057] Data model documentation grammar

2013-01-27 Thread Hobs

New submission from Hobs:

New-style and old-style class expalanation in the datamodel section has minor 
grammatical errors and one minor ambiguity that could be improved.

http://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes

* independently of should always be indepenent of
* single hyphens (-) should be double-hyphens (--) for an m-dash
* flavour should be flavor (used 100x more often in docs.python)
* only the symantics of... is ambiguous. can't tell if 'only' modifies 
'symantics' or 'new-style classes'?

--
assignee: docs@python
components: Documentation
files: datamodel-reference-docs.patch
keywords: patch
messages: 180812
nosy: Hobson.Lane, docs@python
priority: normal
severity: normal
status: open
title: Data model documentation grammar
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file28876/datamodel-reference-docs.patch

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 27/01/2013 8:27pm, Terry J. Reedy wrote:
 I agree we do not need to retain unpredictable 'dumb luck' -- in
 future versions. But in the absence of a clear discrepancy
 between doc and behavior (the definition of a bug) I believe
 breaking such code in a bugfix release would be contrary to
 current policy.

Currently if you mmap a file with length 4GB+1, then you get an mmap of 
length 1.  Surely that is a *huge* discrepancy between docs and behaviour.

BTW, on 32 bit Windows it looks like the maximum size one can mmap in 
practice is about 1.1GB:

PS python -c import mmap; m = mmap.mmap(-1, int(1.1*1024**3))
PS python -c import mmap; m = mmap.mmap(-1, int(1.2*1024**3))
Traceback (most recent call last):
   File string, line 1, in module
WindowsError: [Error 8] Not enough storage is available to process this 
command

--

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 27/01/2013 9:06pm, Serhiy Storchaka wrote:
 Every bugfix breaks some code. As a compromise I propose set
  m_obj-size = PY_SSIZE_T_MAX in case of overflow and emit a warning.

Trying to allocate PY_SSIZE_T_MAX bytes always seems to fail with

 WindowsError: [Error 8] Not enough storage is available to process
 this command

--

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



[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

Some of the exceptions among the modules you listed are:

Lib/test/test_warnings.py:420 has a class specific for the C module.

Lib/test/json_tests/test_dump.py:34 has an additional test specific for the C 
module.
Lib/test/json_tests/test_speedups.py is specific for the C module.

Lib/test/test_functools.py:199 is specific to the Python module.
Lib/test/test_functools.py:207 different tests depending on the version.

Unless these additional methods are defined separately and somehow added to the 
two classes returned by pep399_tests.create_test_cases(ExampleTest), it would 
be necessary to create additional classes using the current idiom and then get 
the modules from pep399_tests.cmodule/pep399_tests.pycmodule, e.g.:

# the two normal tests
TestPyDump, TestCDump = pep399_tests.create_test_cases(DumpTest)

# the additional test for the C module
@unittest.skipUnless(pep399_tests.cmodule, 'requires _json')
class TestCDump2(unittest.TestCase)
module = pep399_tests.cmodule
@bigmemtest(size=_1G, memuse=1)
def test_large_list(self, size):
...

FWIW I won't change the json tests, because I already wrote them in a way that 
most of the code is defined in __init__.py and shared in all the other test 
files.

--

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread Gili T.

New submission from Gili T.:

Python keeps on crashing with error:

The following repro steps are a slight variation of 
http://packages.python.org/RhodeCode/setup.html.

My installation environment is Windows 7, 64-bit, Visual Studio 2012. I doubt 
the bug is specific to this environment but I'm providing it as a point of 
reference. This issue is 100% reproducible for me:

1. Install Python 2.7.3, 64-bit
2. Download https://raw.github.com/pypa/virtualenv/master/virtualenv.py
3. From a VS2012 64-bit command-prompt, run python virtualenv 
c:\users\name\documents\rhodecode
4. cd \users\name\documents\rhodecode
5. scripts\activate
6. pip install rhodecode
7. paster make-config RhodeCode production.ini
8. paster setup-rhodecode production.ini
9. You need to point at a directory that contains at least one Mercurial 
repository.

Code will output:
  [...]
  2013-01-27 19:51:05,855 INFO sqlalchemy.engine.base.Engine ()
  2013-01-27 19:51:05.861 INFO  [rhodecode.model.scm] scanning for repositories 
in
   C:\Users\Gili\Documents\MercurialRepositories

The thread 0x3b4 has exited with code -1073740777 (0xc417).
The thread 0x1bfc has exited with code -1073740777 (0xc417).
The thread 0x39c has exited with code -1073740777 (0xc417).
The thread 0x1fcc has exited with code -1073740777 (0xc417).
The program '[1260] python.exe' has exited with code -1073740777 (0xc417).

and crash. The stack-trace is:

   msvcr90.dll!71059f64()  Unknown
msvcr90.dll!710551ec()  Unknown
msvcr90.dll!710552d4()  Unknown
msvcr90.dll!7104f335()  Unknown
python27.dll!1e0a89f9() Unknown
python27.dll!1e0a8c0e() Unknown
python27.dll!1e0a9379() Unknown
osutil.pyd!07fefc62176f()   Unknown
python27.dll!1e0c0966() Unknown
python27.dll!1e110484() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e10eba9() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e0b2553() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e099211() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e0e02be() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e10fc7b() Unknown
python27.dll!1e11052a() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e10eb38() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e10eb38() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e0b2553() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e099211() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e0e086e() Unknown
python27.dll!1e0dd5e6() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e10fc7b() Unknown
python27.dll!1e11052a() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e10eba9() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e0b2553() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e099211() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e0e086e() Unknown
python27.dll!1e0dd5e6() Unknown
python27.dll!1e08adf5() Unknown
python27.dll!1e10fc7b() Unknown
python27.dll!1e11052a() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e10eba9() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e115439() Unknown
python27.dll!1e10eba9() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e10eb38() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e10eb38() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown
python27.dll!1e10eb38() Unknown
python27.dll!1e110514() Unknown
python27.dll!1e113c34() Unknown

[issue17037] Use a test.support helper to wrap the PEP 399 boilerplate

2013-01-27 Thread Eli Bendersky

Eli Bendersky added the comment:

etree's doctest tests are a painful relic of the past, which will hopefully go 
away one day (issue #15083), at which point conformance to PEP 399 shouldn't be 
an issue.

More generally, and this applies to etree's test too, a lot of trouble is being 
caused by pickle (see etree's tests and decimals's tests). If we're on a way to 
actually commit a decorator for PEP 399, perhaps this issue can somehow be 
addressed in a generic manner.

--

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



[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-01-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I missed the Ngb+1 case in your previous answer and agree that this is a bug 
issue.

--

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



[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2013-01-27 Thread Nick Coghlan

Nick Coghlan added the comment:

Include a couple of See Also links out to my essay and Ned's article and that 
sounds good to me.

(Assuming I've adjusted the DNS settings correctly, this alternate URL for my 
essay should start working soon: 
http://python-notes.curiousefficiency.org/en/latest/python3/text_file_processing.html

--

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



[issue4153] Unicode HOWTO up to date?

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

As discussed in #13997, the HOWTO should be reorganized to start with a basic 
introduction and then expand on more advanced topic.

See also msg180743 for a couple of essays that could be linked as see also or 
integrated in the HOWTO.

--

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



[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2013-01-27 Thread Ezio Melotti

Ezio Melotti added the comment:

OK, I'm going to close this then.

I'll take a look at the links and see if what they say can be included in the 
HOWTO.  As I mentioned in an earlier post I made a few talks about Unicode and 
encodings, so I will take some material from there too.  Depending on the final 
result we can then decide if and what additional links are necessary.

--
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder:  - Unicode HOWTO up to date?

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



[issue16997] subtests

2013-01-27 Thread Chris Jerdonek

Chris Jerdonek added the comment:

After thinking about this more, it seems this lets you do two orthogonal things:

1. Easily append data to failure messages coming from a block of asserts
2. Continue running a test case after a failure from a block of asserts

Both of these seem independently useful and more generally applicable, so it 
seems worth discussing them in isolation before exposing them only together.  
Maybe there is a nice API or combination of API's that lets you do one or the 
other or both.

Also, for (1) above, I'm wondering about the choice to put the extra data in 
the id/shortDescription of a pseudo-TestCase instead of just adding it to the 
exception message, for example.  Adding it to the message seems more consistent 
with unittest's current API.  Including the info in a new name/id seems 
potentially to be misusing the concept of TestCase because the test names 
created from this API need not be unique, and the resulting tests are not 
addressable/runnable.

Incidentally, I noticed that the runnability of TestCases was removed from the 
documentation in an unreviewed change shortly after the last patch was posted:

-An instance of a :class:`TestCase`\ -derived class is an object that can
-completely run a single test method, together with optional set-up and tidy-up
-code.

(from http://hg.python.org/cpython/rev/d1e6a48dfb0d#l1.111 )

whereas subtest TestCases from the last patch are not runnable:

+class _SubTest(TestCase):
+...
+def runTest(self):
+raise NotImplementedError(subtests cannot be run directly)

A way around these issues would be to pass the original, runnable TestCase 
object to TestResult.errors, etc. instead of a pseudo-TestCase.  Alternatively, 
subtests could be made independently addressable and runnable, but that route 
seems more challenging and less certain.

--

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread R. David Murray

R. David Murray added the comment:

Is VS2012 actually involved in anything here?  Does something get compiled when 
you install rhodecode?

Since it is a third party package, it may be that no one here will volunteer to 
reproduce this (though it is possible).  If you can isolate the failure more, 
that would be a big help.

--
nosy: +r.david.murray

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



[issue17059] tarfile.is_tarfile without read permissions raises AttributeError

2013-01-27 Thread Damian

New submission from Damian:

Hi. While porting a library of mine from python 2.7 to 3.2 I noticed that 
tarfile.is_tarfile() now raises an AttributeError rather than IOError when it 
lacks read permissions...

atagar@morrigan:~$ touch dummy_file.tar
atagar@morrigan:~$ chmod 000 dummy_file.tar 
atagar@morrigan:~$ pwd
/home/atagar

atagar@morrigan:~$ python
Python 2.7.1+ (r271:86832, Sep 27 2012, 21:16:52) 
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
 import tarfile
 tarfile.is_tarfile(/home/atagar/dummy_file.tar)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.7/tarfile.py, line 2583, in is_tarfile
t = open(name)
  File /usr/lib/python2.7/tarfile.py, line 1658, in open
return func(name, r, fileobj, **kwargs)
  File /usr/lib/python2.7/tarfile.py, line 1720, in gzopen
fileobj = bltn_open(name, mode + b)
IOError: [Errno 13] Permission denied: '/home/atagar/dummy_file.tar'

atagar@morrigan:~$ python3
Python 3.2 (r32:88445, Oct 20 2012, 14:09:50) 
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
 import tarfile
 tarfile.is_tarfile(/home/atagar/dummy_file.tar)
Traceback (most recent call last):
  File /usr/lib/python3.2/tarfile.py, line 1805, in gzopen
fileobj = gzip.GzipFile(name, mode + b, compresslevel, fileobj)
  File /usr/lib/python3.2/gzip.py, line 157, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
IOError: [Errno 13] Permission denied: '/home/atagar/dummy_file.tar'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.2/tarfile.py, line 2593, in is_tarfile
t = open(name)
  File /usr/lib/python3.2/tarfile.py, line 1739, in open
return func(name, r, fileobj, **kwargs)
  File /usr/lib/python3.2/tarfile.py, line 1809, in gzopen
fileobj.close()
AttributeError: 'NoneType' object has no attribute 'close'

 try:
...   tarfile.is_tarfile(/home/atagar/dummy_file.tar)
... except IOError:
...   print(caught an IOError)
... except AttributeError:
...   print(caught an AttributeError)
... 
caught an AttributeError


... easy to work around, but I suspect this wasn't intentional. :)

--
components: None
messages: 180824
nosy: atagar
priority: normal
severity: normal
status: open
title: tarfile.is_tarfile without read permissions raises AttributeError
type: behavior
versions: Python 3.2

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



[issue17047] Fix double double words words

2013-01-27 Thread Éric Araujo

Éric Araujo added the comment:

Note that sometimes duplicates are actually typos: in 
http://hg.python.org/cpython/rev/07488c3c85f1/#l4.1 for exemple I think the 
intent was to write “that the” instead of “the the”.

--
nosy: +eric.araujo

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



[issue17056] Support Visual Studio 2012

2013-01-27 Thread Gili T.

Gili T. added the comment:

Why? :)

I ask because all the application I depend upon only run against Python 2.x 
(Rhodecode, Mercurial, etc). I'd love for them to upgrade but it's not really 
in my control.

Has there been some sort of policy change within Python to stop supporting 2.x?

--

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread Gili T.

Gili T. added the comment:

Yes, Visual Studio 2012 is used when installing Rhodecode. I'd love to isolate 
this further but I don't know anything about Python. I'm just an end-user of 
Rhodecode.

I filed a bug report with the Rhodecode author (asking for help) but I think we 
can both agree this is actually a Python bug (python.exe is the one crashing).

I try to reproduce this with Visual Studio 2010 if you are more comfortable 
with that environment.

--

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



[issue17056] Support Visual Studio 2012

2013-01-27 Thread Brian Curtin

Brian Curtin added the comment:

This is a feature request and new features are only being added on the 3.x 
line. The next feature release will be 3.4.

--

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread Brian Curtin

Brian Curtin added the comment:

You need to compile rhodecode with VS2008 to match Python 2.7.

You'd have this same problem mixing runtimes regardless of rhodecode or Python 
being involved.

--
nosy: +brian.curtin

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue17058] Python crashes with error 0xc0000417

2013-01-27 Thread Brian Curtin

Brian Curtin added the comment:

A more correct way to say my last message is that you'd need to have Python and 
rhodecode linked to the same runtime, by compiling with the same Visual Studio.

If you require VS2012 with Python 2.7, you'll need to port Python on your own 
and then your setup would work. We can't accept your patch on #17056, so you'd 
have to do the work to make 2.7 work with 2012 and maintain the patch yourself.

--

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



[issue17047] Fix double double words words

2013-01-27 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
priority: normal - low

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



  1   2   >