[issue12944] setup.py upload to pypi needs to work with specified files

2011-09-09 Thread Rene Dudfield

New submission from Rene Dudfield ill...@users.sourceforge.net:

We need to specify files to upload to pypi.  Otherwise we have to use the web 
interface.

'Regarding the setup.py upload command, this isn't very helpful because it 
will not upload a package that was already built - for example, a Windows 
package built on another host while I am trying to release from a Linux 
desktop. Since automatic package building across a build farm is the only way I 
can actually build packages for most platforms, this rules out use of the 
upload command.'

See this post for more details:
http://as.ynchrono.us/2011/09/releasing-python-software-is-tedious.html

--
assignee: tarek
components: Distutils
messages: 143754
nosy: eric.araujo, illume, tarek
priority: normal
severity: normal
status: open
title: setup.py upload to pypi needs to work with specified files
type: feature request

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



[issue12905] multiple errors in test_socket on OpenBSD

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

Charles-François Natali neolo...@free.fr added the comment:

 It looks like Python cannot do much to workaround OpenBSD issues. IMO the 
 best fix is just to skip these tests on OpenBSD, until OpenBSD handles 
 correctly signals in programs linked to pthread. The same fix can be used 
 for #12903.

Agreed.

--

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



[issue6715] xz compressor support

2011-09-09 Thread Nam Nguyen

Nam Nguyen bits...@gmail.com added the comment:

In uint32_converter, I'm not sure the if statement comparing val and UINT32_MAX 
makes sense. val was defined to be unsigned long, which is 32bit on 32-bit 
compiler.

--
nosy: +Nam.Nguyen

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



[issue6715] xz compressor support

2011-09-09 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

 In uint32_converter, I'm not sure the if statement comparing val and
 UINT32_MAX makes sense. val was defined to be unsigned long, which is
 32bit on 32-bit compiler.

Yes, on a 32-bit system, this comparison will always be false. However,
on a 64-bit system, an unsigned long will (usually) be 64 bits wide. In
this case, we do need to check that the value fits into a uint32_t.

--

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



[issue12555] PEP 3151 implementation

2011-09-09 Thread Stefan Krah

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

I still need to understand the full impact of the PEP, but it seems
very sound. I've left two small comments on Rietveld, and there's
an additional question:


Should the input of OSError be checked?

 OSError(not an errno, Bad file descriptor)
OSError('not an errno', 'Bad file descriptor')
 o = OSError(not an errno, Bad file descriptor)
 raise o
Traceback (most recent call last):
  File stdin, line 1, in module
OSError: [Errno not an errno] Bad file descriptor


--

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



[issue12941] add random.pop()

2011-09-09 Thread Mark Dickinson

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

 is it really worth adding?

Probably not.  For improvements along these lines, I'd rather see random.choice 
support sets:

 random.choice({1, 2})
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/Library/Frameworks/Python.framework/Versions/7.1/lib/python2.7/random.py, 
line 274, in choice
return seq[int(self.random() * len(seq))]  # raises IndexError if seq is 
empty
TypeError: 'set' object does not support indexing

But that's another (rejected) issue; see issue 7522.

--
nosy: +mark.dickinson

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



[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein

John Feuerstein j...@feurix.com added the comment:

 r.pop(random.randrange(0, len(r)))

So seq[random.randrange(0, len(seq))] suddenly makes random.choice(seq) 
obsolete? There is no functional reasoning here, it's convenience for a common 
operation.

 Not all the sequences have a .pop() method.

Not all sequences support indexing or item assignment either:

 random.choice({1, 2})
TypeError: 'set' object does not support indexing
 random.shuffle(abc)
TypeError: 'str' object does not support item assignment
...

 I'd rather see random.choice support sets: ...
 But that's another (rejected) issue; see issue 7522.

So the implicit requirement for random.choice() is support for indexing.
The implicit requirement for random.shuffle() is support for indexing and item 
assignment. The implicit requirement for random.pop() is support for 
seq.pop()...

I don't think random's convenience functions should validate (or even worse, 
convert) input. It's actually great that they are thin wrappers without magic, 
resulting in the same behaviour as if done without them.

 self.assertIn(pop([25, 75]), [25, 75])
 These should also verify that the element is not in the list anymore.
 Also other test with different (and possibly wrong) input types should be 
 added.

This is true for many convenience functions in random. I've considered doing 
that at first and came to the conclusion that the tests for random should test 
the behaviour specific to random, not that of the underlying functionality?

So seq[random] should test for random behaviour, not that indexing of seq 
itself works correctly. Similarly, seq.pop(random) should test for random 
behaviour and not for a working seq.pop()?

All we would do here is duplicate tests not related to random.

Please correct me if I'm wrong. I'm glad that this started a discussion.

--

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



[issue12945] ctypes works incorrectly with _swappedbytes_ = 1

2011-09-09 Thread Pavel Boldin

New submission from Pavel Boldin boldin.pa...@gmail.com:

ctypes seems to work incorrectly with _swappedbytes_ specified.

I.e. it misses some values from buffer:

class X(ctypes.Structure):
_swappedbytes_ = 1
_pack_ = 1
_fields_ = [
('a', ctypes.c_ubyte, 4),
('b', ctypes.c_ubyte, 4),
('c', ctypes.c_ushort, 8),
('d', ctypes.c_ushort, 8),
]

buf = '\x12\x34\x56\x78'
x = X.from_buffer_copy(buf)

print x.a == 1
print x.b == 2
print x.c == 3
print x.d == 4

This prints
True
True
False
False

Where as four 'True' are expected.

--
components: ctypes
files: test_ctypes.py
messages: 143761
nosy: Pavel.Boldin
priority: normal
severity: normal
status: open
title: ctypes works incorrectly with _swappedbytes_ = 1
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file23122/test_ctypes.py

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



[issue12941] add random.pop()

2011-09-09 Thread Ezio Melotti

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

 Not all the sequences have a .pop() method.
 Not all sequences support indexing or item assignment either:

All the sequences support indexing and len(), but not assignment (e.g. tuples 
and strings are sequences, but they are immutable).  So talking about sequences 
there is incorrect (see also 
http://docs.python.org/py3k/glossary.html#term-sequence ).

 So seq[random] should test for random behaviour, not that indexing of
 seq itself works correctly. Similarly, seq.pop(random) should test for
 random behaviour and not for a working seq.pop()?

The test should check the behavior of the function, and in this case it 
includes both getting a random element and removing it.  The test doesn't have 
to check that seq.pop() is working fine (there are other tests for that) but 
that it's actually called and that it pops the right element from the input 
sequence (and not e.g. from a copy of the sequence that might have been created 
at some point).
In general it's always better to have a test more than one less.

Regarding the function itself, I'm not sure about its usefulness.  While I've 
used random.choice several times, I never felt the need of popping the 
elements.  One use case I might think of is picking all the elements of a 
sequence until there are no more left, without risking to pick the same element 
twice.  The same result can be achieved by shuffling the sequence and iterate 
over the elements though (that doesn't actually leave you with an empty 
sequence, but that's probably just a unimportant side-effect).

--

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



[issue12942] Shebang line fixer for 2to3

2011-09-09 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue12333] test_distutils and test_packaging failures under Solaris

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

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

I am seen the same problem in 2.7 buildbots. Eric, could you apply this patch 
to 2.7 branch too?.

Thanks!.

--
nosy: +jcea
versions: +Python 2.7

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



[issue12946] PyModule_GetDict() claims it can never fail, but it can

2011-09-09 Thread Stefan Behnel

New submission from Stefan Behnel sco...@users.sourceforge.net:

As is obvious from the code, PyModule_GetDict() can fail if being passed a 
non-module object, and when the (unlikely) dict creation at the end fails. The 
documentation of the C-API function should be fixed to reflect that, i.e. it 
should state that NULL is returned in the case of an error.

PyObject *
PyModule_GetDict(PyObject *m)
{
PyObject *d;
if (!PyModule_Check(m)) {
PyErr_BadInternalCall();
return NULL;
}
d = ((PyModuleObject *)m) - md_dict;
if (d == NULL)
((PyModuleObject *)m) - md_dict = d = PyDict_New();
return d;
}

--
assignee: docs@python
components: Documentation
messages: 143764
nosy: docs@python, scoder
priority: normal
severity: normal
status: open
title: PyModule_GetDict() claims it can never fail, but it can
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein

John Feuerstein j...@feurix.com added the comment:

 The test doesn't have to check that seq.pop() is working fine (there are 
 other tests for that) but that it's actually called and that it pops the 
 right element from the input sequence (and not e.g. from a copy of the 
 sequence that might have been created at some point).

I agree, that makes sense.

 One use case I might think of is picking all the elements of a sequence until 
 there are no more left, without risking to pick the same element twice.  The 
 same result can be achieved by shuffling the sequence and iterate over the 
 elements though (that doesn't actually leave you with an empty sequence, but 
 that's probably just a unimportant side-effect).

One problem with shuffling in this use case is that you lose the otherwise 
original order of the remaining elements, so there is no way to return from 
pop random elements to pop elements in order (without working on a shallow 
copy). However, I would agree that this is rather uncommon.

Feel free to close this as wont fix, after all it is trivial for the user to 
randomly pop elements out of a sequence himself (see above).

There might be other use cases. If nothing else, there's at least issue 12941 
to reference now.

Thanks!

--

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



[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-09 Thread Roundup Robot

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

New changeset a74483c12740 by Jesus Cea in branch '2.7':
Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch 
by Antoine Pitrou
http://hg.python.org/cpython/rev/a74483c12740

--

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



[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee: docs@python - eric.araujo
nosy: +eric.araujo
versions:  -Python 3.1

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



[issue12936] armv5tejl: random segfaults in getaddrinfo()

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

Charles-François Natali neolo...@free.fr added the comment:

You don't have a core dump, do you?

--
nosy: +neologix

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



[issue12333] test_distutils and test_packaging failures under Solaris

2011-09-09 Thread Éric Araujo

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

I got your message but you committed before I could do it :)  Thanks!

--

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



[issue12841] Incorrect tarfile.py extraction

2011-09-09 Thread Éric Araujo

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

 I think we have to go without a unit test.
May I ask why?  I don’t know tarfile well, but I know that a lot can be done 
with unittest.

--
nosy: +eric.araujo

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



[issue12919] Control what module is imported first

2011-09-09 Thread Éric Araujo

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

Thomas: I assume you have “hg add”-ed the file; you may need to use git-style 
diffs to have new files included in diffs: 
http://hgtip.com/tips/beginner/2009-10-22-always-use-git-diffs/

--
nosy: +eric.araujo

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



[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Roundup Robot

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

New changeset 4c759be5 by Éric Araujo in branch '3.2':
Fix current name of the Python 3 binary on Unix (#12896).
http://hg.python.org/cpython/rev/4c759be5

--
nosy: +python-dev

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



[issue12896] Recommended location of the interpreter for Python 3

2011-09-09 Thread Éric Araujo

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

Thanks for the report.

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

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



[issue12920] inspect.getsource fails to get source of local classes

2011-09-09 Thread Éric Araujo

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

 inspect.getsource called with a class defined in the same file fails
 with TypeError: module '__main__' (built-in) is a built-in class

The error message makes me think that getsource(__main__) was used, not 
getsource(SomeClass).  Can you check again?

--
nosy: +eric.araujo
title: Inspect.getsource fails to get source of local classes - 
inspect.getsource fails to get source of local classes
versions:  -Python 3.1

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



[issue12893] Invitation to connect on LinkedIn

2011-09-09 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


Removed file: http://bugs.python.org/file23098/unnamed

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



[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Éric Araujo

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

By testing, I mean running ./python -m test test_shutil

--

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



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

The docs for the doctest module contains examples that use doctest flags to 
control behavior, but the HTML version does not contain the flags, making the 
examples useless.

I don’t know if this is a bug with the HTML builder or something we can fix in 
markup.

--
assignee: docs@python
components: Documentation
messages: 143775
nosy: docs@python, eric.araujo, georg.brandl
priority: normal
severity: normal
status: open
title: Examples in library/doctest.html lack the flags
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Éric Araujo

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

The revision you linked to seems to say that Georg was the one who added this 
code.

--
nosy: +georg.brandl
versions: +Python 3.3 -Python 3.1

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



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Éric Araujo

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

Ezio prompted me to give precise examples, and I can’t find any in the docs 
online.  Maybe it was only a local build with certain options that caused this 
problem, I’ll reopen if I find out.

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

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



[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-09-09 Thread Éric Araujo

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

After thinking about this, I think it may be easier for everyone if I just did 
the change.  It’s just a list of boring grep-sed combos to run, and it’s easier 
if a core dev just does it instead of reviewing a long patch.  Sorry if you 
invested time, Bryce.

--

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



[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

 The revision you linked to seems to say that Georg was the one who
 added this code.

Can you elaborate?  Line 355 in trunk was last edited by edloper.

--

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



[issue12947] Examples in library/doctest.html lack the flags

2011-09-09 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Hehe... Sphinx makes a point of *removing* doctest flags, to enable doctesting 
of code snippets without distracting the reader with the test-internal flags.

I think it's because you used a newer version locally.

--

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



[issue1492704] distinct error type from shutil.move()

2011-09-09 Thread Gennadiy Zlobin

Gennadiy Zlobin gennad.zlo...@gmail.com added the comment:

Yes, I got Windows 7, downloaded VS 2008 express, compiled, ran
python python_d.exe -m test test_shutil 
and tests failed. I found out that os.rename does not raise OSError, according 
to my previous comment...

--

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



[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Éric Araujo

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

I misread the Subversion viewer, it was actually PJE in r45248 (if I read 
correctly this time :)

--
nosy: +pje

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



[issue12948] multiprocessing test failures can hang the buildbots

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

New submission from Jesús Cea Avión j...@jcea.es:

Some failures in the multiprocessing testsuite can leave processes around, 
hanging the buildbots (until the timeout).

I take care of this myself.

--
assignee: jcea
messages: 143783
nosy: jcea
priority: normal
severity: normal
status: open
title: multiprocessing test failures can hang the buildbots
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue12949] Documentation of PyCode_New() lacks kwonlyargcount argument

2011-09-09 Thread Stefan Behnel

New submission from Stefan Behnel sco...@users.sourceforge.net:

In Py3, PyCode_New() takes a new argument kwonlyargcount. The signature 
change is not currently in the Py3 C-API documentation.

http://docs.python.org/dev/c-api/code.html

PyCodeObject *
PyCode_New(int argcount, int kwonlyargcount,
   int nlocals, int stacksize, int flags,
   PyObject *code, PyObject *consts, PyObject *names,
   PyObject *varnames, PyObject *freevars, PyObject *cellvars,
   PyObject *filename, PyObject *name, int firstlineno,
   PyObject *lnotab)

--
assignee: docs@python
components: Documentation
messages: 143784
nosy: docs@python, scoder
priority: normal
severity: normal
status: open
title: Documentation of PyCode_New() lacks kwonlyargcount argument
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3

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



[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Roundup Robot

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

New changeset ebeb58f3de39 by Jesus Cea in branch '3.2':
Close issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/ebeb58f3de39

New changeset 1e189d55721c by Jesus Cea in branch 'default':
Close issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/1e189d55721c

New changeset b376534856a3 by Jesus Cea in branch '2.7':
Close issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/b376534856a3

--
nosy: +python-dev

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



[issue12948] multiprocessing test failures can hang the buildbots

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

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


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

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



[issue12902] help(modules) executes module code

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The immediate issue is improvement of the entries for help and help():

In builtin functions section:

Expand Invoke the built-in help system. to
Invoke the built-in help system, which uses *pydoc*.
where *pydoc* is linked to the pydoc section.

Add to the end of the entry something like As needed, pydoc imports modules to 
get their doc strings.

The special string 'modules' is not documented in the manual entry for help() 
itself. That is fine. It does appear in the longer text that appears for 
'help()'. That text, where ever it is, could and should have a warning.

Warning: gathering the results for the topic 'modules' can take considerable 
time and have side effects as it imports *every* module available to get at its 
doc string.

A separate issue would be a feature request to not do that (assuming it really 
does). Given that 'modules' just produces a list of (incomplete) module names, 
I do not see the point of importing until one requests help on a particular 
name.

There seems to be a bug. In a fresh 3.2.2 IDLE window, help('modules') produces 
about 300 names. If I repeat, I get a reduced list of 58 names. These seem to 
just be the builtin C-coded modules, like 'math', with all Python-coded 
modules, like 'random', omitted.

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python, terry.reedy
stage:  - needs patch
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

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

New submission from Jesús Cea Avión j...@jcea.es:

Buildbots running OpenIndiana 147 show failures in multiprocessing 
test_fd_transfer:


==
ERROR: test_fd_transfer (test.test_multiprocessing.WithProcessesTestConnection)
--
Traceback (most recent call last):
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/test/test_multiprocessing.py,
 line 1597, in test_fd_transfer
reduction.send_handle(conn, fd, p.pid)
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/multiprocessing/reduction.py,
 line 80, in send_handle
_multiprocessing.sendfd(conn.fileno(), handle)
OSError: [Errno 9] Bad file number

==
ERROR: test_large_fd_transfer 
(test.test_multiprocessing.WithProcessesTestConnection)
--
Traceback (most recent call last):
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/test/test_multiprocessing.py,
 line 1626, in test_large_fd_transfer
reduction.send_handle(conn, newfd, p.pid)
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/multiprocessing/reduction.py,
 line 80, in send_handle
_multiprocessing.sendfd(conn.fileno(), handle)
OSError: [Errno 9] Bad file number

--


Buildbots are running OpenIndiana 147 (this is not the last OI version, could 
be a OI bug).

This test seem to work correctly under Solaris 10 Update 9.

--
messages: 143787
nosy: jcea
priority: normal
severity: normal
stage: needs patch
status: open
title: multiprocessing test_fd_transfer fails under OpenIndiana
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

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

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

Example: 
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.2/builds/568/steps/test/logs/stdio

--

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



[issue12913] Add a debugging howto

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

If you write 'How to debug Python code' rather than just How to use pdb, I 
would start with the use of print statements and binary search. Have short 
sections on using trace and profile. Very useful would be a list of error 
messages and possible un-obvious to beginners but common causes. The following 
example comes up regularly on python-list.

TypeError: 'int' object is not callable
  Look in the previous line to see what you called. If it is a builtin name, 
perhaps you re-assigned the name to something else. Example:

list = 3
many lines later
list(1,2,3)
Traceback (most recent call last):
  File pyshell#7, line 1, in module
list(1,2,3)
TypeError: 'int' object is not callable 

Another one we see occasionally (Is module x broken?) is something like: user 
runs script.py

import random
x = random.random()
Traceback...
NameError: name 'random.random' is not defined

Solution: user has a file random.py in the same directory

--
nosy: +terry.reedy

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



[issue12920] inspect.getsource fails to get source of local classes

2011-09-09 Thread Popa Claudiu

Popa Claudiu pcmantic...@gmail.com added the comment:

Yes. On Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit 
(Intel)] on win32, the result for the following lines:

import inspect
class A:
pass
inspect.getsource(A)

is:

Traceback (most recent call last):
  File E:/Scripts/Snippets/test_inspect_bug.py, line 4, in module
inspect.getsource(A)
  File C:\Python32\lib\inspect.py, line 694, in getsource
lines, lnum = getsourcelines(object)
  File C:\Python32\lib\inspect.py, line 683, in getsourcelines
lines, lnum = findsource(object)
  File C:\Python32\lib\inspect.py, line 522, in findsource
file = getsourcefile(object)
  File C:\Python32\lib\inspect.py, line 441, in getsourcefile
filename = getfile(object)
  File C:\Python32\lib\inspect.py, line 406, in getfile
raise TypeError('{!r} is a built-in class'.format(object))
TypeError: module '__main__' (built-in) is a built-in class


--

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



[issue12936] armv5tejl: random segfaults in getaddrinfo()

2011-09-09 Thread Stefan Krah

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

No such luck. Somehow gdb doesn't dump the core file:


[ 25/359] test_urllib2_localnet
Fatal Python error: Segmentation fault

Current thread 0x400225f0:
  File /home/user/cpython-e91ad9669c08/Lib/socket.py, line 389 in 
create_connection
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 721 in connect
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 743 in send
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 805 in 
_send_output
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 960 in 
endheaders
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 1002 in 
_send_request
  File /home/user/cpython-e91ad9669c08/Lib/http/client.py, line 964 in request
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 1145 in 
do_open
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 1165 in 
http_open
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 347 in 
_call_chain
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 387 in 
_open
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 369 in open
  File /home/user/cpython-e91ad9669c08/Lib/urllib/request.py, line 138 in 
urlopen
  File /home/user/cpython-e91ad9669c08/Lib/unittest/case.py, line 136 in 
handle
  File /home/user/cpython-e91ad9669c08/Lib/unittest/case.py, line 572 in 
assertRaises
  File /home/user/cpython-e91ad9669c08/Lib/test/test_urllib2_localnet.py, 
line 537 in test_bad_address
  File /home/user/cpython-e91ad9669c08/Lib/unittest/case.py, line 386 in 
_executeTestPart
  File /home/user/cpython-e91ad9669c08/Lib/unittest/case.py, line 441 in run
  File /home/user/cpython-e91ad9669c08/Lib/unittest/case.py, line 493 in 
__call__
  File /home/user/cpython-e91ad9669c08/Lib/unittest/suite.py, line 105 in run
  File /home/user/cpython-e91ad9669c08/Lib/unittest/suite.py, line 67 in 
__call__
  File /home/user/cpython-e91ad9669c08/Lib/unittest/suite.py, line 105 in run
  File /home/user/cpython-e91ad9669c08/Lib/unittest/suite.py, line 67 in 
__call__
  File /home/user/cpython-e91ad9669c08/Lib/unittest/runner.py, line 168 in run
  File /home/user/cpython-e91ad9669c08/Lib/test/support.py, line 1293 in 
_run_suite
  File /home/user/cpython-e91ad9669c08/Lib/test/support.py, line 1327 in 
run_unittest
  File /home/user/cpython-e91ad9669c08/Lib/test/test_urllib2_localnet.py, 
line 561 in test_main
  File /home/user/cpython-e91ad9669c08/Lib/test/support.py, line 1420 in 
decorator
  File /home/user/cpython-e91ad9669c08/Lib/test/regrtest.py, line 1140 in 
runtest_inner
  File /home/user/cpython-e91ad9669c08/Lib/test/regrtest.py, line 905 in 
runtest
  File /home/user/cpython-e91ad9669c08/Lib/test/regrtest.py, line 708 in main
  File /home/user/cpython-e91ad9669c08/Lib/test/__main__.py, line 13 in 
module
  File /home/user/cpython-e91ad9669c08/Lib/runpy.py, line 73 in _run_code
  File /home/user/cpython-e91ad9669c08/Lib/runpy.py, line 160 in 
_run_module_as_main
make: *** [buildbottest] Segmentation fault (core dumped)


user@debian-arm:~/cpython-e91ad9669c08$ ulimit -c
unlimited
user@debian-arm:~/cpython-e91ad9669c08$ ls core
ls: cannot access core: No such file or directory
user@debian-arm:~/cpython-e91ad9669c08$ find . -name core
user@debian-arm:~/cpython-e91ad9669c08$ 


When I run under gcc, the test are automatically interrupted
by SIGINT at some point. Perhaps this is another broken
threading implementation. I'll try --without-threads.

--

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



[issue12299] Stop documenting functions added by site as builtins

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Can we close this as out-of-date, since 2/3rds of what you asked seems to be 
done already, and the last 1/3 should (in my opinion) absolutely not be?

--

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



[issue12951] List behavior is different

2011-09-09 Thread शंतनू

New submission from शंतनू shanta...@gmail.com:

URL: http://docs.python.org/library/stdtypes.html

Following example is given.

 lists = [[]] * 3
 lists
[[], [], []]
 lists[0].append(3)
 lists
[[3], [3], [3]]


Behavior is as follows.

 a = [[]] * 3
 a
[[], [], []]
 a[0] = 1
 a
[1, [], []]
 


Python interpreter details:

$ python
Python 2.7.2 (default, Aug 22 2011, 13:53:27) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.

--
assignee: docs@python
components: Documentation
messages: 143793
nosy: docs@python, शंतनू
priority: normal
severity: normal
status: open
title: List behavior is different
type: behavior
versions: Python 2.7

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



[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Tim Chase

Tim Chase python.l...@tim.thechases.com added the comment:

I see the status changed to needs-patch.  what do I patch against?

--

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



[issue12914] Add cram function to textwrap

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

It is already available:
 import pydoc
 pydoc.cram('This sentence is too long to fit the space I have made 
 available', 28)
'This sentenc...ade available'

def cram(text, maxlen):
Omit part of a string if needed to make it fit in a maximum length.
if len(text)  maxlen:
pre = max(0, (maxlen-3)//2)
post = max(0, maxlen-3-pre)
return text[:pre] + '...' + text[len(text)-post:]
return text

It could be documented in place, or moved and imported into pydoc. I am +0 at 
the moment.

--
nosy: +terry.reedy

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



[issue12915] Add inspect.locate and inspect.resolve

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

To be a little clearer, this is about dotted import names, not regular dotted 
names.
pydoc.locate(path, forceload=0):
  Locate an object by name or dotted path, importing as necessary
pydoc.resolve(thing, forceload=0):
  Given an object or a path to an object, get the object and its name. 

It is not completely clear to me how this is different from using __import__ 
but I will believe it is. It something like this is in at least 3 places, +1 on 
factoring it out to one place.

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

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



[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

3.2. Any patch should trivially port to 3.3 and 2.7

--
nosy: +terry.reedy
versions: +Python 2.7, Python 3.2

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



[issue12941] add random.pop()

2011-09-09 Thread Terry J. Reedy

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


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

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



[issue12942] Shebang line fixer for 2to3

2011-09-09 Thread Terry J. Reedy

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


--
stage:  - test needed

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



[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

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

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

I have compiled ncurses myself, supporting wide characters. I get this warnings 
in the buildbots:


/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Modules/_cursesmodule.c:920:
 warning: implicit declaration of function 'wget_wch'
/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Modules/_cursesmodule.c:927:
 warning: implicit declaration of function 'mvwget_wch'
/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Modules/_cursesmodule.c:2760:
 warning: implicit declaration of function 'unget_wch'


Studying the ncurses.h, I see the definition of wget_wch and others. But 
these definitions are created only if _XOPEN_SOURCE_EXTENDED is defined.

Something to be explored?.

--
nosy: +jcea

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



[issue12567] curses implementation of Unicode is wrong in Python 3

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

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


--
nosy: +jcea

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



[issue6703] cross platform failure and silly test in doctest

2011-09-09 Thread Phillip J. Eby

Phillip J. Eby p...@telecommunity.com added the comment:

No, I only consolidated the two copies of the code to a single function, in 
order to more easily add the PEP 302 support.  The feature was already there.

--

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



[issue12948] multiprocessing test failures can hang the buildbots

2011-09-09 Thread Roundup Robot

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

New changeset 9f4d72da69a8 by Jesus Cea in branch '2.7':
Fix issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/9f4d72da69a8

New changeset 559ea53e25df by Jesus Cea in branch '3.2':
Fix issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/559ea53e25df

New changeset c9a72fb5968d by Jesus Cea in branch 'default':
Fix issue #12948: multiprocessing test failures can hang the buildbots
http://hg.python.org/cpython/rev/c9a72fb5968d

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

I think a pair of integers is a poor API.  It ties the value of the fractional 
part to nanoseconds.  What happens when a future filesystem implements 
picosecond resolution?  And then later goes to femtoseconds?  Or some platform 
chooses another divisor (2**32)?  This should all be abstracted away by the 
API, as the current API does.  Otherwise you start sprinkling magic values in 
your code (ie 1e9).  Suggesting that other representations (float128, Decimal) 
can be built on top of the (int,int) interface is irrelevant; obviously, any 
representation can be built on top of any other.

I think Decimal is reasonable, except that it breaks existing code.  One cannot 
perform computation between a Decimal and a float, so almost any existing 
manipulations of atime/utime would start throw exceptions.

I suggest that a float128 type would solve the problem on all counts--nobody 
would have to change their code, and it would handle nanosecond (or I think 
even zeptosecond!) resolution.  And when we run out of resolution, we can 
switch to float256.  (Or an arbitrary-precision float if Python has one by 
then.)

os.stat added support for float atime/mtime in 2.3, specifically in October 
2002:
  http://hg.python.org/cpython/rev/0bbea4dcd9be
This predates both the inclusion of Decimal in Python (2.4) and nanosecond 
resolution in the utime API (2008).  I could find no discussion of the change, 
so I don't know what other representations were considered.  It's hard to say 
what the author of the code might have done if Decimal had existed back then, 
or if he foresaw nanosecond resolution.

However, that author is already present in this thread ;-)  Martin?

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky

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

On Fri, Sep 9, 2011 at 4:50 PM, Larry Hastings rep...@bugs.python.org wrote:
..
 I think a pair of integers is a poor API.  It ties the value of the 
 fractional part to nanoseconds.  What happens
 when a future filesystem implements picosecond resolution?

If history repeats, struct stat will grow new st_xtimesuperspec
fields, st_xtimespec will become a macro expanding to
st_xtimesuperspec.tv_picosec and we will get a request to support that
in os.stat().  I don't see why this conflicts with
stat_result.st_xtimespec returning a (sec, nsec) tuple.  If we will
ever have to support higher resolution,  stat_result will grow another
member with a (sec, picosec) or whatever will be appropriate value.

  And then later goes to femtoseconds?

Same thing.

  Or some platform chooses another divisor (2**32)?

Unlikely, but C API will dictate Python API if this happens.

--
nosy: +Alexander.Belopolsky

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky

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

On Fri, Sep 9, 2011 at 5:22 PM, Alexander Belopolsky
rep...@bugs.python.org wrote:
..
 If history repeats, struct stat will grow new st_xtimesuperspec
 fields, st_xtimespec will become a macro expanding to
 st_xtimesuperspec.tv_picosec

On the second thought, this won't work.  To support higher resolution
will need to supply 3 fields in st_xtimesuperspec: tv_sec and tv_nsec
packed in st_xtimespec (say tv_timespec) and new tv_psec field.
st_xtime will now be   st_xtimesuperspec.tv_timespec.tv_sec and
st_xtimespec will be a new macro expanding to
st_xtimesuperspec.tv_timespec.  The rest of my argument still holds.

--

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



[issue12841] Incorrect tarfile.py extraction

2011-09-09 Thread Lars Gustäbel

Lars Gustäbel l...@gustaebel.de added the comment:

It's the low-level operating system aspects of tarfile that are very difficult 
to test, e.g. filesystem and operating system dependent features such as 
symbolic links, hard links, file permissions, ownership. It is not even 
possible to reliably determine the filesystem the testsuite currently runs on. 
Also, superuser privileges are needed for some operations to work, e.g. 
chown(). A testsuite is normally not run as root, so a test that depends on 
this will never get enough coverage.

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

 To support higher resolution
 will need to supply 3 fields in st_xtimesuperspec: tv_sec and tv_nsec
 packed in st_xtimespec (say tv_timespec) and new tv_psec field.
 st_xtime will now be   st_xtimesuperspec.tv_timespec.tv_sec and
 st_xtimespec will be a new macro expanding to
 st_xtimesuperspec.tv_timespec.

How is this superior to using either Decimal or float128?

--

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



[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

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

New submission from Jesús Cea Avión j...@jcea.es:

Solaris/Illumos (OpenIndiana) have several more Scheduling Policies, specially 
if the program is running under a Solaris Zone.

OpenIndiana buildbots are running under Zones, and the test is failing because 
current (under Zones) scheduling policy is not recognized.

I take care of this myself.

--
assignee: jcea
messages: 143806
nosy: jcea
priority: normal
severity: normal
status: open
title: Solaris/Illumos (OpenIndiana) Scheduling policies
type: feature request
versions: Python 3.3

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Martin v . Löwis

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

 This predates both the inclusion of Decimal in Python (2.4) and
 nanosecond resolution in the utime API (2008).  I could find no
 discussion of the change, so I don't know what other representations
 were considered.  It's hard to say what the author of the code might
 have done if Decimal had existed back then, or if he foresaw
 nanosecond resolution.
 
 However, that author is already present in this thread ;-)  Martin?

I think I specifically expected that nanosecond resolution in the file
system API will not be relevant ever, since a nanosecond is damned
short. I also specifically wanted to support units of 100ns, since that
is what NTFS used at that time (and still uses).

I also considered that introducing float would cause backwards
incompatibilities, and provided the stat.float_times setting, and
made only the indexed fields return ints, whereas the named fields
contained floats. I think I would have chosen an arbitrary-precision
fractional type had one been available. If a two-ints representation
is considered necessary, I'd favor a rational number (numerator,
denominator) over a pair (second, subsecond); this would also support
2**-32 fractions (as used in NTP !!!).

As yet another approach, I propose a set of st_[cma]time_nsec fields
which always give an int representing the integral part of the time
stamp in nanoseconds since the epoch. If sub-nanosecond time stamps
ever become a reality, st_[cma]time_asec fields could be added, for
attosecond resolution.

--

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



[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

2011-09-09 Thread Roundup Robot

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

New changeset e1644c8edc3e by Jesus Cea in branch 'default':
Close issue 12952: Solaris/Illumos (OpenIndiana) Scheduling policies
http://hg.python.org/cpython/rev/e1644c8edc3e

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

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



[issue12952] Solaris/Illumos (OpenIndiana) Scheduling policies

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

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

Under Solaris 10 Update 9, FSS (Fair Share Scheduling) is usually used in the 
Zones, but it is not defined in sched.h, so the test will fail.

--

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



[issue12763] test_posix failure on OpenIndiana

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

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

This fix is incorrect. It is ignoring a common case (a process running under a 
Solaris Zone) completelly.

Since the intention of the test is to check the access to the scheduling 
information of a different process, I change it to access the parent, instead 
of a hardcoded init.

I take care of this.

--
assignee: benjamin.peterson - jcea
nosy: +jcea

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

I've drawn an ASCII table summarizing the proposals so far.  If I've made any 
factual errors I trust you'll let me know.


=type means os.stat().st_mtime is changed to that type.
+type means os.stat() grows a new field using that type,
  and the current behavior of st_mtime is unchanged.

___

[ UPSIDES  ]=(int,int)  +(int,int) =Decimal +Decimal =float128
[ yes is good! ]

all existing code gets   no   nono   no   yes
more accurate for free

some existing code gets  no   noyes  no   yes
more accurate for free

guaranteed
future-proof against no   noyes  yes  no*
new representations

very very
future-proof against no   noyes  yes  yes*
new representations

* float128 could handle representations finer than yoctosecond resolution,
  10**-24, but not another 10**-3.  fwiw, yocto is currently the smallest
  defined prefix.
___

[ DOWNSIDES   ]  =(int,int)  +(int,int) =Decimal +Decimal =float128
[ yes is bad! ]

breaks existing code  yes  noyes  no   no

requires new code in
order to take advantage   yes* yes   yes* yes  no
of added precision

requires implementing a   no   nono   no   yes
complicated new type

* Since this option breaks existing code, obviously people will have to
  write new code in order to cope.
___


My take on the above: if we're willing to put people through the pain of 
changing their code to use the new accuracy, then Decimal is the obvious 
winner.  I see no advantage to any of the pair-of-floats proposals over Decimal.

If we want all existing code to continue working and get more accurate 
automatically, the only viable option is float128 (or a multiple-precision 
float).

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

s/pair-of-floats/pair-of-ints/

Also, to be clear: yocto is the smallest defined SI prefix.  And what I meant 
when I referred to 10**-3 was, float128 could handle 10**-24 but not 10**-27.  
According to my back-of-the-envelope calculations, float128 could accurately 
represent timestamps with yoctosecond resolution for another 650 years to come.

--

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



[issue12953] Function calls missing from profiler output

2011-09-09 Thread Hagen Fürstenau

New submission from Hagen Fürstenau ha...@zhuliguan.net:

I noticed that some function calls don't get reported by profile/cProfile. For 
example, 'len' works fine, but calls to 'range' or functions in 'itertools' 
don't show up. Is this a known limitation?

I remember that there was a bug in profiling C-functions with keyword arguments 
(issue5330, fixed), but I don't have the time right now to investigate whether 
this is related.

--
components: Library (Lib)
messages: 143813
nosy: hagen
priority: normal
severity: normal
status: open
title: Function calls missing from profiler output
type: behavior
versions: Python 3.2

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



[issue12763] test_posix failure on OpenIndiana

2011-09-09 Thread Roundup Robot

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

New changeset dba886806eb3 by Jesus Cea in branch 'default':
Better fix for #12763: test_posix failure on OpenIndiana
http://hg.python.org/cpython/rev/dba886806eb3

--

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



[issue12954] Multiprocessing logging under Windows

2011-09-09 Thread paul j3

New submission from paul j3 ajipa...@gmail.com:

The Windows programming guidelines for the multiprocessing module documentation 
should include a warning that any logging initialization should be protected by 
the 'if __name__' block.  Otherwise you will get duplicate logging entries for 
the child processes.  This is because the multiprocessing.forking.prepare() 
function explicitly calls log_to_stderr(), and may implicitly do so again when 
it imports the parent module, resulting in duplicate logging handlers.

--
assignee: docs@python
components: Documentation
messages: 143815
nosy: docs@python, paul.j3
priority: normal
severity: normal
status: open
title: Multiprocessing logging under Windows

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



[issue12763] test_posix failure on OpenIndiana

2011-09-09 Thread Roundup Robot

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

New changeset 9ef10328180b by Jesus Cea in branch 'default':
Yet another fix for #12763: test_posix failure on OpenIndiana
http://hg.python.org/cpython/rev/9ef10328180b

--

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



[issue12941] add random.pop()

2011-09-09 Thread Raymond Hettinger

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


--
assignee:  - rhettinger

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



[issue12940] Cmd example using turtle left vs. right doc-bug

2011-09-09 Thread Tim Chase

Tim Chase python.l...@tim.thechases.com added the comment:

Patch attached.

--
keywords: +patch
versions:  -Python 2.7, Python 3.2
Added file: http://bugs.python.org/file23123/issue12940.diff

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



[issue12945] ctypes works incorrectly with _swappedbytes_ = 1

2011-09-09 Thread Meador Inge

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

I can reproduce this on Fedora 15 with the Python tip revision.  I am 
investigating the behavior now.

--
nosy: +meadori
stage:  - needs patch
type:  - behavior
versions: +Python 3.2, Python 3.3

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky

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

On Fri, Sep 9, 2011 at 5:42 PM, Larry Hastings rep...@bugs.python.org wrote:
..
 How is this superior to using either Decimal or float128?

It is explicit about the units of time used.  If we use named tuples
and retain C API field names, stat_result.tv_atimespec.tv_sec will
clearly mean number of seconds and stat_result.tv_atimespec.tv_nsec
will clearly mean nanoseconds.  Even if we use plain tuples, the
convention will be obvious to someone familiar with C API.  And
familiarity with C API is expected from users of os module, IMO.
Those who need higher level abstractions should use higher level
modules.

--

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



[issue11457] Expose nanosecond precision from system calls

2011-09-09 Thread Alexander Belopolsky

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

On Fri, Sep 9, 2011 at 6:18 PM, Larry Hastings rep...@bugs.python.org wrote:
..
 I've drawn an ASCII table summarizing the proposals so far.

You did not mention closely matches C API as an upside.

--

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



[issue11812] transient socket failure to connect to 'localhost'

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

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

I am seeing this failure from time to time in OpenIndiana buildbots. For 
instance 
http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/1751/steps/test/logs/stdio

Seems a clear race condition.

--
nosy: +jcea

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



[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger

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


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-09-09 Thread John O'Connor

John O'Connor tehj...@gmail.com added the comment:

Moved {l,r,}strip to stringlib as well as the bloom filters from unicodeobject. 
I think it cleans things up nicely. Now there is one implementation for all 3 
types. This patch also improves performance for bytearray and slightly for 
bytes. I see no delta for unicodeobject.

Added a test case for the mistake I made before (returning inc ref for mutable 
type).

grep -R couldn't find any other references to _PyUnicode_XStrip so I removed 
it. Though, someone with better knowledge of this should confirm.

--
Added file: http://bugs.python.org/file23124/stringlib_strip.patch

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



[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-09-09 Thread John O'Connor

Changes by John O'Connor tehj...@gmail.com:


Removed file: http://bugs.python.org/file22982/strip_perf.patch

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



[issue12914] Add cram function to textwrap

2011-09-09 Thread Raymond Hettinger

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

A few thoughts:
* no one has ever made a request for this
* different people may want to do it in different ways 
  (the formulas are hard-wired).
* the '...' connector is hardwired
  (perhaps ' ... ' would look less odd).
* we should have a preference for keeping APIs small
  (more to learn and remember)
* this is dirt simple string processing and not hard
  for people to roll their own if the need arises
* if the API were to be expanded, perhaps it should
  be as a part of a focuses, thoughtful effort to
  provide a more generic set of text formatting
  transformations perhaps modeled on deep experiences
  with similar modules in other languages.
  (as opposed to piecemeal additions that weren't 
  designed with a coherent vision).

--

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

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

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

This failure happens only in 32 bits, not in 64 bits. I suspect a alignment 
issue.

--

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

2011-09-09 Thread Roundup Robot

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

New changeset 1fde7cf94c76 by Jesus Cea in branch 'default':
Close #12950: multiprocessing test_fd_transfer fails under OpenIndiana
http://hg.python.org/cpython/rev/1fde7cf94c76

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

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

2011-09-09 Thread Roundup Robot

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

New changeset cd15473a9de2 by Jesus Cea in branch '2.7':
Close #12950: multiprocessing test_fd_transfer fails under OpenIndiana
http://hg.python.org/cpython/rev/cd15473a9de2

--

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



[issue12950] multiprocessing test_fd_transfer fails under OpenIndiana

2011-09-09 Thread Roundup Robot

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

New changeset 0f50b8379614 by Jesus Cea in branch '3.2':
Close #12950: multiprocessing test_fd_transfer fails under OpenIndiana
http://hg.python.org/cpython/rev/0f50b8379614

New changeset e37488e78cfa by Jesus Cea in branch 'default':
MERGE: Close #12950: multiprocessing test_fd_transfer fails under OpenIndiana
http://hg.python.org/cpython/rev/e37488e78cfa

--

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



[issue6560] socket sendmsg(), recvmsg() methods

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

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


--
nosy: +jcea

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



[issue12951] List behavior is different

2011-09-09 Thread Ezio Melotti

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

I don't see where is the bug.  If you do
 lists = [[]] * 3
 lists
[[], [], []]

you are creating a list that contains 3 references to the same list, as you can 
see here:
 lists[0] is lists[1] is lists[2]
True
 [id(l) for l in lists]
[33714832, 33714832, 33714832]

so if you append an element to either of the inner list, it will show up 3 
times, because the 3 lists are really the same object:
 lists[0].append(3)
 lists
[[3], [3], [3]]

However, if you do
 lists[0] = 1
 lists
[1, [3], [3]]

you are replacing the first element of 'lists' with the int 1.  This doesn't 
mutate the inner list, and therefore the second and third elements are not 
affected.

See also http://python.net/crew/mwh/hacks/objectthink.html

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

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



[issue12902] help(modules) executes module code

2011-09-09 Thread Ezio Melotti

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

 Warning: gathering the results for the topic 'modules' can take
 considerable time and have side effects as it imports *every* module
 available to get at its doc string.

http://docs.python.org/documenting/style.html#affirmative-tone

--

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



[issue12913] Add a debugging howto

2011-09-09 Thread Ezio Melotti

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

FWIW I almost always use print for debugging, and find the use of a real 
debugger overkill in Python in most of the cases.  People coming from other 
languages often feel the need of using a debugger because that's what works 
best with the other languages, but it's not necessarily true for Python.

I'm not sure focusing on pdb is the best idea then.  While it should be 
mentioned and a quick overview should be presented, a more extensive guide 
should probably go alongside the pdb doc, or possibly in a pdb-specific howto.

Mentioning unittest and coverage as a way to find errors earlier might also be 
a good idea (and reply to the it's easier to debug compiled code because if I 
do something wrong the compiler gives me an error immediately argument).

But all this might not be what you had in mind :)
I'm wondering if, for this kind of work, it's better to set up a clone with the 
document and its outline, in order to allow different persons to work on it 
before pushing it.  Rietveld works well for corrections, but a clone is better 
if you actually want to add something (and faster if you want to make 
corrections).

--

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