[issue15444] Incorrectly writen contributor's names

2012-07-25 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 It seems to be the latter: Žiga Seilnacht

Then Misc/ACKS should be corrected too.

--

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



[issue15444] Incorrectly writen contributor's names

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Is there a reason not to correct that spelling in this issue?  Otherwise, we 
could create a new issue.

--

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



[issue15439] Include Misc/ACKS names into the documentation

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I don't know how Doc ACKS is maintained, but I think the devguide is fine as it 
stands, whether or not Doc ACKS is preserved or not. People should put 
themselves into Misc/ACKS if they made a contribution, period.

If people need to be acknowledged separately for contributing to the 
documentation, I think only major contributions (such as writing the 
documentation for a yet-undocumented module) should be explicitly acknowledged.

I think this all started from the documentation having initially Guido van 
Rossum given as its sole author, and then later Fred Drake. So Doc/ACKS.txt may 
have been an attempt to correct the impression that these two are the authors, 
but I think it went into the wrong direction (eventually leading to the 
creation of issues such as this one)

--

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



[issue15444] Incorrectly writen contributor's names

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

There was a long-standing opposition by Guido to use UTF-8 in that file, and 
also complaints about legibility. Not sure what the current status is.

It doesn't matter much to me, even though the spelling of my name is affected.

--

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



[issue15445] Ability to do code injection via logging module configuration listener port.

2012-07-25 Thread STINNER Victor

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


--
nosy: +haypo

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Well, here is updated patch. Also fixed names of Walter Dörwald (was Walter 
D�rwald) and Martin von Löwis in Misc/HISTORY.

All changed files (documentation, ACK-files, Misc/HISTORY) already in UTF-8 and 
contains non-ASCII names.

Löwis written as Loewis in some other places: Lib/idlelib/NEWS.txt, 
Tools/README, source comments. Same for Marc-Andre (without é) Lemburg. I do 
not think, that it matter in comments, but not sure about NEWS- and 
README-files.

--
title: Incorrectly writen contributor's names - Incorrectly written 
contributor's names
Added file: http://bugs.python.org/file26509/doc-nonascii-names-2.patch

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

See the PEP 410.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

The following change is a major change on how Python handles undecodable 
filenames on Windows:

-return PyUnicode_DecodeMBCS(s, size, NULL);
+return PyUnicode_DecodeMBCS(s, size, surrogateescape);

I disagree with this change, Python should not generate surrogates *on Windows*.

By the way, there is also os.fsdecode(), it has the same behaviour than 
PyUnicode_DecodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize() (it uses the 
strict error handler on Windows).

--
nosy: +loewis, tim.golden

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

[Martin]
 The patch that Meador committed is incorrect: METH_NOARGS functions
 still take a PyObject* args argument, which will be NULL.

Hmm.  I see this usage in a lot of places---e.g. see unicode_capitalize, 
unicode_casefold, unicode_title etc. in Objects/unicodeobject.c.  So it looks 
like we're relying on the (PyCFunction) cast to convert from a one-argument 
function pointer to a two-argument function pointer, which sounds a bit 
worrisome---I guess it just happens to work with common ABI calling 
conventions. I'm a bit surprised that we're not seeing compiler warnings about 
this sort of thing.

[Meador]
 I will happily fix it, but if it is wrong one place, then it is wrong
 everywhere.

It sounds like 'wrong everywhere' is accurate, unfortunately.

--

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Vincenzo Ampolo wrote:
 
 Vincenzo Ampolo vincenzo.amp...@gmail.com added the comment:
 
 This is a real use case I'm working with that needs nanosecond precision
 and lead me in submitting this request:
 
 most OSes let users capture network packets (using tools like tcpdump or
 wireshark) and store them using file formats like pcap or pcap-ng. These
 formats include a timestamp for each of the captured packets, and this
 timestamp usually has nanosecond precision. The reason is that on
 gigabit and 10 gigabit networks the frame rate is so high that
 microsecond precision is not enough to tell two frames apart.
 pcap (and now pcap-ng) are extremely popular file formats, with millions
 of files stored around the world. Support for nanoseconds in datetime
 would make it possible to properly parse these files inside python to
 compute precise statistics, for example network delays or round trip times.
 
 Other case is in stock markets. In that field information is timed in
 nanoseconds and have the ability to easily deal with this kind of
 representation natively with datetime can make the standard module even
 more powerful.
 
 The company I work for is in the data networking field, and we use
 python extensively. Currently we rely on custom code to process
 timestamps, a nanosecond datetime would let us avoit that and use
 standard python datetime module.

Thanks for the two use cases.

You might want to look at mxDateTime and use that for your timestamps.
It does provide full C double precision for the time part of a timestamp,
which covers nanoseconds just fine.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

 If a file name was invalid byte character, os.chdir() raises
 UnicodeDecodeError() instead of WindowsError.

I realized that the problem is in the error handling: raising the OSError fails 
with a UnicodeDecodeError because PyErr_SetFromWindowsErrWithFilename() calls 
PyUnicode_DecodeFSDefault(), whereas the filename is not decodable. If you want 
to change something, it should be PyErr_SetFromWindowsErrWithFilename(). We may 
use PyObject_Repr() or PyObject_ASCII() for example.

--

See also the issue #13374: The Windows bytes API has been deprecated in the os 
module. Use Unicode filenames instead of bytes filenames to not depend on the 
ANSI code page anymore and to support any filename.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Yes, I know #13374, that's why I wrote

 This is a byte-api issue on Windows, so we may be able to simply skip 
 this test.

Do you think we need a patch to avoid UnicodeDecodeError raised? 
Or should we change test to skip this?

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Thank you for taking the initiative. Regarding use of UTF-8 for text files:

I think we ought to acknowledge that UTF-8 has become the defacto standard
for non-ASCII text files by now and with Python 3 being all Unicode, it
feels silly not make use of it in Python source files.

Regarding my name: I have no issue with the apostrophe missing on the e.
I've long given up using it in source code or emails :-)

--

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



[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset a82fd35e28be by Martin v. Löwis in branch '3.2':
Issue #15318: Prevent writing to sys.stdin.
http://hg.python.org/cpython/rev/a82fd35e28be

--
nosy: +python-dev

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



[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset fa7d4ecc6357 by Martin v. Löwis in branch '2.7':
Issue #15318: Prevent writing to sys.stdin.
http://hg.python.org/cpython/rev/fa7d4ecc6357

--

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



[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
resolution:  - fixed
status: open - closed

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



[issue15438] Incredible issue in math.pow

2012-07-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Agreed that this is at worst a doc issue.

[Antoine]
 and in all honesty I don't know the difference between the ** operator
 and the built-in pow() function :-)

None, as far as I know, apart from the pow function's ability to take a 3rd 
argument.  Both ultimately call PyNumber_Power, and the various type-specific 
__pow__ methods take over from there.  [+1 for removing pow from the builtins 
and shunting three-argument pow to the math module in Python 500.]

--

___
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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I will happily fix it, but if it is wrong one place, then it is wrong
 everywhere.

Yes, it is wrong everywhere. METH_NOARGS functions do take an
args argument, see ceval.c:call_function.

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Hmm.  I see this usage in a lot of places---e.g. see
 unicode_capitalize, unicode_casefold, unicode_title etc. in
 Objects/unicodeobject.c.  So it looks like we're relying on the
 (PyCFunction) cast to convert from a one-argument function pointer to
 a two-argument function pointer, which sounds a bit worrisome---I
 guess it just happens to work with common ABI calling conventions.
 I'm a bit surprised that we're not seeing compiler warnings about
 this sort of thing.

The compiler has no chance to find out. You cast the pointer to
PyCFunction, telling the compiler that it really is a PyCFunction.

I really wish we could put a ban on function pointer casts, and try
to make this all statically type-correct. This, of course, would
require the sizeof function to take PyObject*, and cast it to
PyStructObject * locally. My idiom for that is

static PyObject *
s_sizeof(PyStructObject *_self, PyObject *unused)
{
  PyStructObject *self = (PyStructObject *)_self;

 It sounds like 'wrong everywhere' is accurate, unfortunately.

Everywhere is nowhere close to the truth. There are tons of
NOARGS functions which have the correct signature.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

 Do you think we need a patch to avoid UnicodeDecodeError raised?
 Or should we change test to skip this?

It's a bug, the test should not be skipped. You should get an OSError
because the chdir() failed, not an UnicodeDecodeError.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

As for your patch: you are missing the point of the test. The file name is 
assumed to be valid, despite it not being in the file system encoding.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

IMO, it is ok to skip the test on Windows; it was apparently targeted for Unix.

If we preserve it, we should pick a file name (on Windows) which is encodable 
in the file system encoding.

--

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



[issue7163] IDLE suppresses sys.stdout.write() return value

2012-07-25 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset f72965374b2a by Martin v. Löwis in branch '3.2':
Issue #7163: Propagate return value of sys.stdout.write.
http://hg.python.org/cpython/rev/f72965374b2a

--
nosy: +python-dev

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



[issue7163] IDLE suppresses sys.stdout.write() return value

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Thanks for the patch!

--
resolution:  - fixed
status: open - closed

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



[issue15446] Recursion SIGSEGV

2012-07-25 Thread Arseniy

New submission from Arseniy sen...@gmail.com:

a=lambda:a
print eval(a + () * 99)

--
components: None
messages: 166378
nosy: senyai
priority: normal
severity: normal
status: open
title: Recursion SIGSEGV
type: crash
versions: Python 2.7, Python 3.3

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



[issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I think this should apply to all systems, and I think the proper escaping is 
with ./, see TclpNativeSplitPath (in Tcl's source code).

--
nosy: +loewis

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 The compiler has no chance to find out. You cast the pointer to
 PyCFunction, telling the compiler that it really is a PyCFunction.

True; I was thinking that the compiler should have the necessary information to 
warn about the suspicious (PyCFunction) cast.  But then again the function 
pointer cast is perfectly legal---it's the subsequent call that invokes 
undefined behaviour, and that's in a different file, so the compiler can't help.

 Everywhere is nowhere close to the truth.

Yep, sorry;  bad wording on my part.  I didn't intend to imply that all uses of 
METH_NOARGS had this problem.  'Everywhere' for very small values of 
'everywhere'. :-)

--

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



[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

A quick question: Prior to this patch test_memoryview.py exercised
both mbuf_clear() and memory_clear(). Now gcov shows no coverage.

Is this expected? Is it still possible to construct tests that
exercise the code?

--

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



[issue15445] Ability to do code injection via logging module configuration listener port.

2012-07-25 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I think it is sufficient for 2.7, 3.2 and 3.3 to just update the documentation, 
as Graham says, using note markup so that it stands out.

I can look at ast.literal_eval as an option for 3.4.

--

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Alexander Belopolsky

Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg rep...@bugs.python.org 
wrote:
 ... full C double precision for the time part of a timestamp,
 which covers nanoseconds just fine.

No, it does not:

 import time
 t = time.time()
 t + 5e-9 == t
True

In fact, C double precision is barely enough to cover microseconds:

 t + 1e-6 == t
False

 t + 1e-7 == t
True

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Everywhere is nowhere close to the truth. There are tons of
NOARGS functions which have the correct signature.

When I started writing C-extensions, I used the PyObject *unused
idiom. Then I saw Meador's version in so many places in the source
tree that I assumed it's correct.

I think raising this issue on python-dev would be beneficial.

--
nosy: +skrah

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Marc-Andre Lemburg wrote:
 
 Alexander Belopolsky alexander.belopol...@gmail.com added the comment:

 On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg rep...@bugs.python.org 
 wrote:
 ... full C double precision for the time part of a timestamp,
 which covers nanoseconds just fine.

 No, it does not:

 import time
 t = time.time()
 t + 5e-9 == t
 True

 In fact, C double precision is barely enough to cover microseconds:

 t + 1e-6 == t
 False

 t + 1e-7 == t
 True
 
 I was referring to the use of a C double to store the time part
 in mxDateTime. mxDateTime uses the C double to store the number of
 seconds since midnight, so you don't run into the Unix ticks value
 range problem you showcased above.

There's enough room to even store 1/100th of a nanosecond, which may
be needed for some physics experiments :-)

False
 x == x + 1e-10
False
 x == x + 1e-11
False
 x == x + 1e-12
True

--

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



[issue15446] Eval Recursion SIGSEGV

2012-07-25 Thread R. David Murray

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


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - stack overflow evaluating eval(() * 3)
title: Recursion SIGSEGV - Eval Recursion SIGSEGV

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Alexander Belopolsky wrote:
 
 Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
 
 On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg rep...@bugs.python.org 
 wrote:
 ... full C double precision for the time part of a timestamp,
 which covers nanoseconds just fine.
 
 No, it does not:
 
 import time
 t = time.time()
 t + 5e-9 == t
 True
 
 In fact, C double precision is barely enough to cover microseconds:
 
 t + 1e-6 == t
 False
 
 t + 1e-7 == t
 True

I was referring to the use of a C double to store the time part
in mxDateTime. mxDateTime uses the C double to store the number of
seconds since midnight, so you don't run into the Unix ticks value
range problem you showcased above.

--

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

[Roundup's email interface again...]

 x = 86400.0
 x == x + 1e-9
 False
 x == x + 1e-10
 False
 x == x + 1e-11
 False
 x == x + 1e-12
 True

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

I think that C standard actually documents the parameter order placement, so 
you can left out the last ones in the actual function definition.

So, that this is working is not an accident, it is a C standard requirement.

I think...

--

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



[issue15275] isinstance is called a more times that needed in ntpath

2012-07-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

 I don't know about a decent way of doing benchmarks for the changes.
 Any recommendation?

You could make a script that uses the timeit module.

 If this patch is applied I think it would be good to change
 posixpath too.
 I agree and I'd love to do it but in a diff bug to make things
 self-contained, what do you think?

Having a single patch that fixes both is OK.

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Jesús: this is a (common) mistake. Standard C makes it undefined behavior to 
call a function with an incorrect number of arguments, see 6.5.2.2p9

# If the function is defined with a type that is not compatible with the 
# type (of the expression) pointed to by the expression that denotes the 
# called function, the behavior is undefined.

Two function pointers are compatible if the function types are compatible 
(6.7.5.1p2), which in turn is defined in 6.7.5.3p15,
which is too long to quote here.

Your understanding of the parameter passing convention is not part of the 
language definition. The only way to have more parameters in the call than are 
declared is by means of an ellipsis. 

There is an exception for old style (KR) functions and declarations, but it 
doesn't apply here.

--

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky

New submission from Anton Barkovsky swarmer...@gmail.com:

webbrowser._invoke opens /dev/null, never closes it and a warning is
printed.

I'm attaching a patch.
The diff looks messy, but I'm just wrapping the code in a try-finally
block, the rest is just indented.

--
components: Library (Lib)
files: fileclose.patch
keywords: patch
messages: 166392
nosy: anton.barkovsky
priority: normal
severity: normal
status: open
title: A file is not properly closed by webbrowser._invoke
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file26511/fileclose.patch

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Stefan: not sure whether raising this to python-dev really helps; see also  
msg42177, msg58196, issue1648268, and msg75239. Feel free to raise it, though.

--

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Thanks.  Is this warning printed by the webbrowser unit tests?  If not can you 
see a way to add one that does?

--
nosy: +r.david.murray

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

The warning is printed by the file object when it closes itself in __del__:

  ResourceWarning: unclosed file _io.TextIOWrapper name='/dev/null' mode='r+' 
encoding='UTF-8'

There isn't much to test, or is there?

--

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

To clarify, I discovered this when I was simply running webbrowser.open
in REPL.

--

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Are there any webbrowser unit tests?

(this could probably use the new subprocess.DEVNULL constant in 3.3)

--
nosy: +rosslagerwall

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



[issue15438] Incredible issue in math.pow

2012-07-25 Thread Ramchandra Apte

Ramchandra Apte maniandra...@gmail.com added the comment:

 [+1 for removing pow from the builtins and shunting three-argument pow to the 
 math module in Python 500.]
Me too.
Anybody who uses pow with to arguments can use arg1**arg2
Anybody who uses pow with three is doing something mathematical and has most 
likely imported math already.

--
nosy: +ramchandra.apte

___
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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

@Anton: That's what I was guessing.  If we had a unit test in test_webbrowser 
that did the same thing, we'd have seen the resource warning when running the 
tests and fixed it.  However, it looks like there aren't *any* tests for 
webbrowser, not even in test_sundry (which just makes sure modules without 
tests are importable).

So adding a test that will trigger this resource warning requires setting up a 
test_webbrowser file first, even before we get to the problem of how to test 
something that wants to start up a web browser...(but that should be solvable 
with unittest.mock, I think).

--

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



[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Here's a patch for 3.3, which consists mostly of tests. A couple of points:

  o I removed the len  view-len check in PyBuffer_ToContiguous(), since
the function is not documented and silently accepting output buffers
that are too large seems unusual to me.

  o Removed the comment in bytesobject.c Better way to get to internal 
buffer?.
IMO the answer is no: There isn't any better way that works in full 
generality.

  o Removed the need to check for overflow comment: ndim is now officially
limited to 64.


I think this can go into 3.3: It's easy to see that for contiguous buffers
PyBuffer_ToContiguous() behaves in the same manner as before (except for
the len issue).

For memoryview, buffer_to_contiguous(x, y 'C') is literally the same
code as buffer_to_c_contiguous().

--
keywords: +patch
Added file: http://bugs.python.org/file26512/issue12834.diff

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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky

Anton Barkovsky swarmer...@gmail.com added the comment:

Adding a patch that uses subprocess.DEVNULL instead.

Writing tests for webbrowser should be a separate issue, right?

--
Added file: http://bugs.python.org/file26513/fileclose_devnull.patch

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



[issue15438] Incredible issue in math.pow

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Ramchandra Apte rep...@bugs.python.org wrote:
  [+1 for removing pow from the builtins and shunting three-argument pow to 
  the math module in Python 500.]
 Anybody who uses pow with three is doing something mathematical and has most 
 likely imported math already.

Wouldn't that reinforce the misconception that math is for arbitrary precision
number theoretical functions? The OP used it for cryptography.

--

___
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



[issue15438] Incredible issue in math.pow

2012-07-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Wouldn't that reinforce the misconception that math is for arbitrary
 precision number theoretical functions?

Perhaps.  We already have math.factorial, though;  adding math.powmod wouldn't 
seem so much of a stretch.  Just to be clear, I'm not seriously proposing this 
for any version of Python before 4.0; apologies for derailing the issue thread.

--

___
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



[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

You could do it either way.  Normally we prefer to have a test along with any 
fix; in this case adding a test involves adding the test module as well, but it 
is not different in principle.  If you want to work on it and prefer to have it 
as a separate issue that's fine, we'll just make the test issue dependent on 
this one.

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

While looking this up in the C Standard (ISO/IEC 9899:TC3) I also noticed 
6.3.2.3p8:


A pointer to a function of one type may be converted to a pointer to a function 
of another
type and back again; the result shall compare equal to the original pointer. If 
a converted
pointer is used to call a function whose type is not compatible with the 
pointed-to type, the behavior is undefined.


I will add the 'unused' parameter back with my refresh patch.

--

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



[issue14930] Make memoryview weakrefable

2012-07-25 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

Is it possible that the use of test.support.gc_collect() in test_memoryview 
made the difference?

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

To be clear on this issue's scope, I would state in a single comment a white 
list of which directories or individual files are being corrected (or if 
necessary, the rules to determine such a list, e.g. any file whose name root is 
NEWS, etc).

I would also recommend being systematic about this by creating a script to 
search the above files, along with a configuration section containing the list 
of replacements: e.g. correct spelling - list of misspellings for that name.  
And upload the script to this issue.  That way people can see what misspellings 
have already been accounted for, more could be added easily, and it could be 
used again if necessary.

Because this may grow in scope (e.g. into source files) and because it affects 
people's names, it may be worth raising on python-dev.  At the least, people 
would have the chance to contribute known misspellings.

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Make sure that it's still possible to generate the pdf of the docs (with `make 
latex` and then `make all-pdf` in build/latex/).
Latin1 should be fine, but IIRC non-latin1 will break (sorry Žiga).

--
nosy: +ezio.melotti

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



[issue15439] Include Misc/ACKS names into the documentation

2012-07-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

FWIW including Misc/ACKS in the doc will probably break the generation of the 
pdf version of the doc, since it contains non-latin1 characters (see 
msg166408).  I don't think it's necessary to include the names in the doc.

 I don't know how Doc ACKS is maintained, but I think the devguide is
 fine as it stands, whether or not Doc ACKS is preserved or not. 
 People should put themselves into Misc/ACKS if they made a 
 contribution, period.

In my experience Doc/ACKS.txt is mostly ignored/unmaintained.  I did a lot of 
work on the docs and my name is not in there, and I don't think I ever added 
anyone there.

 If people need to be acknowledged separately for contributing to the
 documentation, I think only major contributions (such as writing the 
 documentation for a yet-undocumented module) should be explicitly 
 acknowledged.

It's already possible to give credit directly in the docs using directives like 
sectionauthor.

--

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



[issue15439] Include Misc/ACKS names into the documentation

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

OK, I propose to completely drop the Doc/ACKS.txt from the documentation, and 
replace it with the words

Many people have contributed to the Python language, the Python standard 
library, and the Python documentation. See Misc/ACKS in the Python source 
distribution for a partial list of contributors

--

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



[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I don't think the docs should display Misc/ACKS. Instead, I propose the 
following wording

Many people have contributed to the Python language, the Python standard 
library, and the Python documentation. See Misc/ACKS in the Python source 
distribution for a partial list of contributors

It might be useful to link Misc/ACKS to 
http://hg.python.org/cpython/file/default/Misc/ACKS
(http://hg.python.org/cpython/raw-file/default/Misc/ACKS would be better if 
hgweb wouldn't declare that application/octet-stream)

--

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



[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Sorry folks, I messed up the revisions when testing. This commit has
nothing to do with the decreased coverage.

Now I properly bisected and in r75481 mbuf_clear() and memory_clear()
are still covered, but in r75484 they are not.

r75484 addresses #1469629. I've got to figure out whether the changed
behavior is expected or not.

--

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



[issue15448] utimes() functions fail with ENOSYS even when detected by configure

2012-07-25 Thread Richard Moseley

New submission from Richard Moseley dickie.mose...@virgin.net:

When building on a ASUS Eee PC 1000 running the original Xandros O/S with 
libc-2.7-13, the various utimes() functions are being detected as available for 
use, everything compiles. However, during installation of the lib-dynload 
libraries, the error 'Error: Function not implemented' is given and the 
installation halts.

This problem has been tracked down to the fact that some of the utimes() 
functions will return ENOSYS rather than the expected result.

I have now patched the configure.ac script to check for the seven variants of 
the function, which is attached. This patch would ideally have made use of the 
same model as the AC_CHCEK_FUNCS macro but this would require adding a new file 
to the source tree.

--
components: Build
files: configure.ac.diff
keywords: patch
messages: 166413
nosy: richmose
priority: normal
severity: normal
status: open
title: utimes() functions fail with ENOSYS even when detected by configure
type: compile error
versions: Python 3.3
Added file: http://bugs.python.org/file26514/configure.ac.diff

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



[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Vincenzo Ampolo

Vincenzo Ampolo vincenzo.amp...@gmail.com added the comment:

Have a look to this python dev mailing list thread too:

http://mail.python.org/pipermail/python-dev/2012-July/121123.html

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Indeed, PDF rendering is important. OTOH, Latex T1 does support Ž. Untested, 
\v{Z} should generate that character. If this doesn't work, the build process 
needs to be fixed.

--

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



[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

r75484 should be b595e1ad5722.

--

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



[issue15445] Ability to do code injection via logging module configuration listener port.

2012-07-25 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset f30b49a5072e by Vinay Sajip in branch '2.7':
Issue #15445: Updated logging configuration documentation to highlight 
potential security risk posed by listen() in certain scenarios.
http://hg.python.org/cpython/rev/f30b49a5072e

New changeset e5d7d202f2bf by Vinay Sajip in branch '3.2':
Issue #15445: Updated logging configuration documentation to highlight 
potential security risk posed by listen() in certain scenarios.
http://hg.python.org/cpython/rev/e5d7d202f2bf

New changeset 410be02de1c6 by Vinay Sajip in branch 'default':
Closes #15445: Merged documentation update from 3.2.
http://hg.python.org/cpython/rev/410be02de1c6

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

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



[issue15269] Document dircmp.left and dircmp.right

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Thanks a lot, Eli, and for the suggestions.  I would be happy to prepare a full 
patch.

Regarding the stream argument, I think there are other changes to dircmp that 
would be more useful (e.g. issue 12932), but I agree that some form of your 
suggestion makes sense.  Would you mind if I created a separate issue for it to 
discuss there?  I have some suggestions on it, and I would be happy to work on 
it there.

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

 Indeed, PDF rendering is important. OTOH, Latex T1 does support Ž.

I tried to put a Ž directly in an rst source and indeed the pdf has been 
created correctly.

--

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



[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-07-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

We can just use :source:`Misc/ACKS` and it will created a link to hgweb (the 
colored HTML page, not the raw file).

--

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



[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

All names interpreted correctly except cyrillic (Alexander “Саша” Belopolsky 
and Марк Коренберг). I think it's just because of lack of some non-installed 
package (of course, Latex supports cyrillic).

--

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



[issue15449] Optional size argument for readline()

2012-07-25 Thread Sworddragon

New submission from Sworddragon sworddrag...@aol.com:

For file objects the read() function has the optional size argument to limit 
the data that will be read. I'm wondering why there isn't such an argument for 
readline(). Theoretically lines in a file could have million of characters and 
even much more. An optional limit could prevent that a high amount of data will 
be load into the memory.

--
components: Library (Lib)
messages: 166422
nosy: Sworddragon
priority: normal
severity: normal
status: open
title: Optional size argument for readline()
type: enhancement
versions: Python 3.2

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



[issue12605] Enhancements to gdb 7 debugging hooks

2012-07-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Dave, test_gdb fails consistently on the ARM buildbot:


==
FAIL: test_threads (test.test_gdb.PyBtTests)
Verify that py-bt indicates threads that are waiting for the GIL
--
Traceback (most recent call last):
  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/test/test_gdb.py, 
line 706, in test_threads
self.assertIn('Waiting for the GIL', gdb_output)
AssertionError: 'Waiting for the GIL' not found in 'Breakpoint 1 at 0x9e36a: 
file Python/bltinmodule.c, line 962.\n[Thread debugging using libthread_db 
enabled]\nUsing host libthread_db library 
/lib/arm-linux-gnueabi/libthread_db.so.1.\n[New Thread 0x2b2b2470 (LWP 
8779)]\n[New Thread 0x2b5ff470 (LWP 8780)]\n[New Thread 0x2b8ff470 (LWP 
8781)]\n[New Thread 0x2baff470 (LWP 8782)]\n\nBreakpoint 1, builtin_id 
(self=module at remote 0x2aca5638, v=42) at Python/bltinmodule.c:962\n962\t   
 return PyLong_FromVoidPtr(v);\n\nThread 5 (Thread 0x2baff470 (LWP 
8782)):\nTraceback (most recent call first):\n  File string, line 10, in 
run\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 639, in _bootstrap_inner\nself.run()\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 616, in _bootstrap\nself._bootstrap_inner()\n\nThread 4 (Thread 
0x2b8ff470 (LWP 8781)):\nTraceback (most recent call first):\n  File st
 ring, line 10, in run\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 639, in _bootstrap_inner\nself.run()\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 616, in _bootstrap\nself._bootstrap_inner()\n\nThread 3 (Thread 
0x2b5ff470 (LWP 8780)):\nTraceback (most recent call first):\n  File 
string, line 10, in run\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 639, in _bootstrap_inner\nself.run()\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 616, in _bootstrap\nself._bootstrap_inner()\n\nThread 2 (Thread 
0x2b2b2470 (LWP 8779)):\nTraceback (most recent call first):\n  File 
string, line 10, in run\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/threading.py, 
line 639, in _bootstrap_inner\nself.run()\n  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/thread
 ing.py, line 616, in _bootstrap\nself._bootstrap_inner()\n\nThread 1 
(Thread 0x2aac5300 (LWP 8776)):\nTraceback (most recent call first):\n  File 
string, line 18, in module\n'


http://buildbot.python.org/all/builders/ARM%20Ubuntu%203.x

--
stage: patch review - committed/rejected
versions:  -Python 2.7, Python 3.2

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



[issue15431] Cannot build importlib.h on Windows

2012-07-25 Thread Antoine Pitrou

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


--
nosy: +kristjan.jonsson, sbt

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



[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, it does:
http://docs.python.org/dev/library/io.html#io.IOBase.readline

“readline(limit=-1)

Read and return one line from the stream. If limit is specified, at most 
limit bytes will be read.”

--
nosy: +pitrou

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



[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou

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


--
resolution:  - works for me
status: open - closed

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



[issue15431] Cannot build importlib.h on Windows

2012-07-25 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

shouldn't be too hard to add, I'll give it a go soon.

--

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



[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Antoine, does the latest patch look okay to you, or did you want something even 
more minimal (e.g. by defining and acquiring the lock directly in main)?

--

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



[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I would have taken the simpler route myself (taking the lock around the 
next() call), that said it looks ok as it is to me. Do other people have an 
opinion?

--

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



[issue15209] Re-raising exceptions from an expression

2012-07-25 Thread Tyler Crompton

Tyler Crompton gtr...@gmail.com added the comment:

As for the losing valuable debug information, much worse can be done:

import sys

try:
x
except NameError:
print('An error occurred.', file=sys.stderr)
sys.exit(1)

This is obviously not how one should handle errors in development, but it's 
allowed. As Ethan pointed out, the initial proposal can be recreated by just 
adding three words which is obviously also allowed.

Nick, I'm not saying you're opinions are wrong, I just wanted to point out how 
easy it is to throw away valuable information. It's almost futile.

--

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

decode_filename_mbcs.patch uses the replace error handler to decode
the filename on Windows. It should solve the issue.

--
Added file: http://bugs.python.org/file26515/decode_filename_mbcs.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15441
___diff -r b127046831e2 Python/errors.c
--- a/Python/errors.c   Mon Jul 23 00:24:24 2012 -0500
+++ b/Python/errors.c   Wed Jul 25 15:40:52 2012 +0200
@@ -463,11 +463,22 @@ PyErr_SetFromErrnoWithFilenameObject(PyO
 return NULL;
 }
 
+static PyObject *
+decode_filename(const char *filename)
+{
+if (!filename)
+return NULL;
+#ifdef HAVE_MBCS
+return PyUnicode_DecodeMBCS(filename, strlen(filename), replace);
+#else
+return PyUnicode_DecodeFSDefault(filename);
+#endif
+}
 
 PyObject *
 PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
 {
-PyObject *name = filename ? PyUnicode_DecodeFSDefault(filename) : NULL;
+PyObject *name = decode_filename(filename);
 PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
 Py_XDECREF(name);
 return result;
@@ -558,7 +569,7 @@ PyObject *PyErr_SetExcFromWindowsErrWith
 int ierr,
 const char *filename)
 {
-PyObject *name = filename ? PyUnicode_DecodeFSDefault(filename) : NULL;
+PyObject *name = decode_filename(filename);
 PyObject *ret = PyErr_SetExcFromWindowsErrWithFilenameObject(exc,
  ierr,
  name);
@@ -595,7 +606,7 @@ PyObject *PyErr_SetFromWindowsErrWithFil
 int ierr,
 const char *filename)
 {
-PyObject *name = filename ? PyUnicode_DecodeFSDefault(filename) : NULL;
+PyObject *name = decode_filename(filename);
 PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
   PyExc_WindowsError,
   ierr, name);
@@ -892,7 +903,7 @@ PyErr_SyntaxLocationEx(const char *filen
 }
 }
 if (filename != NULL) {
-tmp = PyUnicode_DecodeFSDefault(filename);
+tmp = decode_filename(filename);
 if (tmp == NULL)
 PyErr_Clear();
 else {
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

haypo: how is this meant to fix the bug? Won't it now cause a WindowsError, 
when a successful operation is expected?

--

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



[issue15008] PEP 362 Signature Objects reference implementation

2012-07-25 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Are we going to get documentation?

--
nosy: +benjamin.peterson

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



[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Thanks, Antoine. Just a note: with that other implementation I think the call 
to pending.close() would probably also warrant a lock since it appears close() 
can't be called either if a generator is already executing (granted that 
situation would be even rarer since it could arise only during 
KeyboardInterrupt).

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

So the good old int main(void) behaviour is undefined :-)

--

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión

Jesús Cea Avión j...@jcea.es added the comment:

Talking about this, anybody has an electronic version of C Standard to share 
with me, or should I hunt around the dark corners of Internet? :-)

--

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



[issue7593] Computed-goto patch for RE engine

2012-07-25 Thread Ezio Melotti

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


--
versions: +Python 3.4 -Python 3.2

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



[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

On Wed, Jul 25, 2012 at 5:38 PM, Jesús Cea Avión rep...@bugs.python.org wrote:

 So the good old int main(void) behaviour is undefined :-)

Actually the C Standard says that is OK.  See 5.1.2.2.1 of ISO/IEC 9899:TC3.

--

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2012-07-25 Thread Ezio Melotti

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


--
type:  - enhancement

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



[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-25 Thread Ezio Melotti

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


--
nosy: +jnoller
stage:  - needs patch

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



[issue4712] Document pickle behavior for subclasses of dicts/lists

2012-07-25 Thread Ezio Melotti

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


--
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 
3.1

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



[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset d7a64e095930 by Antoine Pitrou in branch '3.2':
Issue #15320: Make iterating the list of tests thread-safe when running tests 
in multiprocess mode.
http://hg.python.org/cpython/rev/d7a64e095930

New changeset 43ae2a243eca by Antoine Pitrou in branch 'default':
Issue #15320: Make iterating the list of tests thread-safe when running tests 
in multiprocess mode.
http://hg.python.org/cpython/rev/43ae2a243eca

--
nosy: +python-dev

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



[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Ok, I've committed the patch to 3.2 and 3.3. I don't really want to bother with 
2.7 (it's a rare enough issue). Thank you Chris!

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

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



[issue13538] Improve doc for str(bytesobject)

2012-07-25 Thread Ezio Melotti

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


--
keywords: +easy
stage:  - needs patch
type:  - enhancement

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



[issue15436] __sizeof__ is not documented

2012-07-25 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

This may be CPython specific.

Also, sys.getsizeof() hasn't proved to be very useful (I never see anyone use 
it or see it in production code).  Worse, it doesn't even make sense in the 
case of shared-key dictionaries and whatnot.  Accordingly, there is little 
reason to make this more public than it already is.  I would be happy to see it 
written-off as an implementation detail.

--
nosy: +rhettinger

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



[issue15436] __sizeof__ is not documented

2012-07-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

sys.getsizeof() is not for production code, it's for experimenting and getting 
information at the command prompt. It's quite useful when you know its 
limitations.

I'd argue that implementing __sizeof__ for user types doesn't make much sense 
(except C extension types, which are CPython-specific).

--
nosy: +pitrou

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



[issue15008] PEP 362 Signature Objects reference implementation

2012-07-25 Thread Yury Selivanov

Yury Selivanov yselivanov...@gmail.com added the comment:

Benjamin: http://bugs.python.org/issue15151

--
nosy: +yselivanov

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

 haypo: how is this meant to fix the bug?
 Won't it now cause a WindowsError, when a successful
 operation is expected?

Oh, I was referring to the new test proposed in the attached patch 
(issue15441.patch):

+def test_chdir_invalid_filename(self):
+self.assertRaises(WindowsError, os.chdir, b'\xe7w\xf0')

os.chdir() in a non existent directory with a bytes name should raise an 
OSError, not a UnicodeDecodeError.

--

About the original issue: it looks like mkdir(bytes) decodes internally the 
directory name and ignore undecodable bytes. On Windows 7, mkdir(b\xe7w\xf0) 
creates a directory called \u8f42 (b\xe7w, b\xf0 suffix has been 
dropped). It is not possible to change the directory to b\xe7w\xf0, but it 
works with b\xe7w or \u8f42.

There are 2 issues:

 * On Windows, os.chdir(bytes) should not raise a UnicodeDecodeError on the 
directory does not exist
 * test_nonascii_abspath() can be skipped on Windows if 
os.fsdecode(b\xe7w\xf0) fails, or b\xe7w name should be used instead

My patch is not the best solution because it looses information (if the 
filename contains undecodable bytes). I realized that OSError.filename is not 
necessary a str, bytes is also accepted. win32_error_object() can be used. The 
following patch pass the original bytes object to OSError constructor instead:


diff -r 43ae2a243eca Modules/posixmodule.c
--- a/Modules/posixmodule.c Thu Jul 26 00:47:15 2012 +0200
+++ b/Modules/posixmodule.c Thu Jul 26 01:19:14 2012 +0200
@@ -1138,11 +1138,10 @@ static PyObject *
 path_error(char *function_name, path_t *path)
 {
 #ifdef MS_WINDOWS
-if (path-narrow)
-return win32_error(function_name, path-narrow);
-if (path-wide)
-return win32_error_unicode(function_name, path-wide);
-return win32_error(function_name, NULL);
+return PyErr_SetExcFromWindowsErrWithFilenameObject(
+PyExc_OSError,
+0,
+path-object);
 #else
 return path_posix_error(function_name, path);
 #endif

(sorry, I failed to attach a patch, I have an issue with my file chooser...)

--

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



[issue15269] Document dircmp.left and dircmp.right

2012-07-25 Thread Chris Jerdonek

Chris Jerdonek chris.jerdo...@gmail.com added the comment:

Attaching a patch to address Eli's requests (1) and (2).

Since this patch merely adds documentation and tests for existing 
functionality, is there any reason why this cannot go into Python 3.3?  Thanks.

--
Added file: http://bugs.python.org/file26516/issue-15269-2.patch

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



[issue15450] Allow dircmp.subdirs to behave well under subclassing

2012-07-25 Thread Chris Jerdonek

New submission from Chris Jerdonek chris.jerdo...@gmail.com:

Currently, the subdirs attribute of filecmp.dircmp does not respect subclassing:

 from filecmp import dircmp
 class MyDirCmp(dircmp):
...   pass
... 
 my_dcmp = MyDirCmp('dir1', 'dir2')
 for item in my_dcmp.subdirs.values():
...   print(type(item))
...   break
... 
class 'filecmp.dircmp'

This is the only place where dircmp does not respect subclassing.  It can be 
corrected here:

def phase4(self): # Find out differences between common subdirectories
...
...
self.subdirs[x]  = dircmp(a_x, b_x, self.ignore, self.hide)

This would let one do things like override dircmp.report() and have 
dircmp.report_full_closure() behave as expected.

--
components: Library (Lib)
keywords: easy
messages: 166443
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: Allow dircmp.subdirs to behave well under subclassing
type: enhancement
versions: Python 3.4

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



[issue14330] don't use host python, use host search paths for host compiler

2012-07-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

The last changeset (7955d769fdf5) caused some problem on my machine.
Before the changeset I was getting:

Python build finished, but the necessary bits to build these modules were not 
found:
_bz2   _curses_curses_panel   
_dbm   _gdbm  _lzma   
_tkinter  
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

After 7955d769fdf5 I get:

Python build finished, but the necessary bits to build these modules were not 
found:
_bz2   _curses_curses_panel   
_dbm   _gdbm  _lzma   
_sqlite3   _ssl   _tkinter
readline   zlib   
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.

I'm on an ubuntu 12.04 machine.

--
nosy: +ezio.melotti
status: closed - open

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



[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-25 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
nosy: +sbt

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



[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Atsuo Ishimoto

Atsuo Ishimoto ishim...@gembook.org added the comment:

Here's another try:

In this patch:

- skip test_nonascii_abspath() test since it fails on some code pages.

- Added a test to reproduce bug on latin code pages.

- Use repr(filename) only if decode failed. This is more backward-compatible 
and does not lose any information.

--
Added file: http://bugs.python.org/file26517/issue15441_2.patch

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



  1   2   >