Roundup Robot added the comment:
New changeset 63f2941477d3 by Ezio Melotti in branch '2.7':
#17833: add debug output to investigate buildbot failure.
http://hg.python.org/cpython/rev/63f2941477d3
--
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
Removed message: http://bugs.python.org/msg188621
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17833
___
Roundup Robot added the comment:
New changeset 5dd076d441ec by Ezio Melotti in branch '3.3':
#17871: fix unittest.TextTestRunner signature in the docs. Patch by Yogesh
Chaudhari.
http://hg.python.org/cpython/rev/5dd076d441ec
New changeset 15ed67602ddf by Ezio Melotti in branch 'default':
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
assignee: docs@python - ezio.melotti
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
I also vote +1 for returning None when the information is unknown.
I still don't like it.
If a function returns a number of CPU, it should either return an
integer = 1, or raise an exception.
None is *not* an integer.
And returning an exception is
Charles-François Natali added the comment:
PC/_msi.c: Oh, here you should remove cast to int. Example:
PyModule_AddIntMacro(m, (int)MSIDBOPEN_CREATEDIRECT);
I'm surprised that the does compile. You may have a
(int)MSIDBOPEN_CREATEDIRECT variable :-)
Probably, good catch ;-)
I'll fix
STINNER Victor added the comment:
I don't see exactly what this C implementation brings over the one
in multiprocessing (which is written in Python)?
multiprocessing.cpu_count() creates a subprocess on BSD and Darwin to get the
number of CPU. Calling sysctl() or sysctlnametomib() should be
Charles-François Natali added the comment:
Fair enough, I guess we should use it then.
We just have to agree on the value to return when the number of CPUs
can't be determined ;-)
--
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
Returning None sounds reasonable to me.
Raising an exception pretty much means that the function should always be
called in a try/except (unless you are sure that the code is running on an OS
that knows the number of CPUs). Returning -1 is not very Pythonic,
New submission from Jan Safranek:
I have Python 2.7.4 running on Fedora Rawhide and I get segmentation fault with
following backtrace:
#0 0x7f73f69ca5f1 in clear_weakref (self=0x7f73ff515c00) at
Objects/weakrefobject.c:56
#1 weakref_dealloc (self=0x7f73ff515c00) at
Jan Safranek added the comment:
I can reproduce the crash in very unusual setup:
1. OpenPegasus (http://www.openpegasus.org/), for this bug we may consider it
just a network daemon, listening on TCP port. When a request comes, it is
eventually processed by a provider (= something like plugin).
Jan Safranek added the comment:
Bisecting Python mercurial repository, I found the patch which causes the crash:
changeset: 80762:7e771f0363e2
branch: 2.7
parent: 80758:29627bd5b333
user:Antoine Pitrou solip...@pitrou.net
date:Sat Dec 08 21:15:26 2012 +0100
summary:
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +benjamin.peterson, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17922
___
___
Roundup Robot added the comment:
New changeset 8b764c3521fa by Ezio Melotti in branch '2.7':
#17714: document that the base64 codec adds a trailing newline.
http://hg.python.org/cpython/rev/8b764c3521fa
--
nosy: +python-dev
___
Python tracker
Ezio Melotti added the comment:
The str.encode() doc is the wrong place where to document this, since the '\n'
is added only for the base64 codec. I added a note about this in the codecs
docs[0].
[0]: http://docs.python.org/2/library/codecs.html#standard-encodings
--
assignee:
Roundup Robot added the comment:
New changeset cbb23e40e0d7 by Ezio Melotti in branch '3.3':
#17714: document that the base64 codec adds a trailing newline.
http://hg.python.org/cpython/rev/cbb23e40e0d7
New changeset b3e1be1493a5 by Ezio Melotti in branch 'default':
#17714: merge with 3.3.
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13515
___
___
New submission from Delhallt:
test_glob's trailing_slash tests fails on AIX 6.1/Python 2.7.4:
The code section for no_magic/slash case seems to be the issue.
Attached patch resolves issue.
FAIL: test_glob_directory_with_trailing_slash (test.test_glob.GlobTests)
Antoine Pitrou added the comment:
Hi Jan,
First, have you seen the following message on that bug report:
http://bugs.python.org/issue16602#msg177180
Second, I would suggest you build a debug build of Python (./configure
--with-pydebug), it should give you more information in the stack trace,
Nick Coghlan added the comment:
I checked in the missing file after I woke up this morning. Maybe I'll learn to
use hg import instead of patch some day...
Sorry for the noise.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
There are a couple other places, IIRC. That said, I'm not sure what the
point is, since a linked list is quite a simple structure anyway?
Well, it was just to avoid code duplication, and gain a nice iteration macro ;-)
Anyway, I'll submit a patch
Jan Safranek added the comment:
First, have you seen the following message on that bug report:
http://bugs.python.org/issue16602#msg177180
I'm reading it now... I searched for PyWeakref_GET_OBJECT in cmpi-bindings and
both occurrences generated by SWIG and both look safe.
Is it
Serhiy Storchaka added the comment:
It is not working fine on Python 3.3.0.
with codecs.open('/tmp/test.txt', 'w', encoding='iso-8859-1') as f:
... xml = XMLGenerator(f, encoding='iso-8859-1')
... xml.startDocument()
... xml.startElement('root', {'attr': u'\u20ac'})
...
New submission from Christian Heimes:
Related to #11016
I like to deprecate the S_IF* constants in favor of the S_IS*() functions.
rationals:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
No new S_IFMT symbolic names for the file type values of mode_t will be defined
STINNER Victor added the comment:
Accepting of text streams in XMLGenerator should be deprecated in future
versions.
I agree that the following pattern is strange:
with codecs.open('/tmp/test.txt', 'w', encoding='iso-8859-1') as f:
xml = XMLGenerator(f, encoding='iso-8859-1')
Why would
Antoine Pitrou added the comment:
Debugging with gdb is quite a problem, I have gdb linked with distribution
Python
2.7.4 and it doesn't cooperate with my custom built python, which I have in
LD_LIBRARY_PATH
Ok. Still, you should be able to inspect the variables at the crash point.
Could
R. David Murray added the comment:
As for why to not return 1, I can imagine code that checks cpu_count, and only
if it returns the don't know result would it invoke some more expensive
method of determining the CPU count on platforms that cpu_count doesn't
support. Since the os module is
Nick Coghlan added the comment:
The new section looks good to me.
Would it be appropriate to explicitly note that this is a relatively recent
change of policy, so most of the stdlib docs don't actually follow it? (and
patches to bring them into line would be reasonable)
--
R. David Murray added the comment:
Probably. Otherwise people are going to go look at the subprocess docs as an
example...and they don't follow it.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13515
Antoine Pitrou added the comment:
Patch looks fine to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13515
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
You may want two pieces of stack: the piece of stack that is above and
including the catch point, and the piece of stack that is below it. The former
is what gets traditionally printed in tracebacks, but the latter can be useful
as well (see issue1553375 for
Nick Coghlan added the comment:
I've added 2.7 to the affected versions - the core unittest framework should be
present in all 3 versions, so the choice of if/when to backport a fix and its
test can be made on a case-by-case basis, rather than being a foregone
conclusion due to the lack of
Serhiy Storchaka added the comment:
Here is a patch which adds explicit checks for codecs stream writers and adds
tests for these cases. The tests are not entirely honest, they test only that
XMLGenerator works with some specially prepared streams. XMLGenerator doesn't
work with a stream with
Richard Oudkerk added the comment:
The test seems to be failing on Windows.
--
nosy: +sbt
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1545463
___
New submission from Pierrick Koch:
Dear,
del deque[0] is not safe, see the attached patch for the
asynchat.async_chat.initiate_send method.
fix the IndexError: deque index out of range of del self.producer_fifo[0]
Best,
Pierrick Koch
--
components: Library (Lib)
files:
Nick Coghlan added the comment:
Marking this as Library as well, since the traceback module should also be
updated.
--
components: +Library (Lib)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12535
Serhiy Storchaka added the comment:
Of course, if this patch will be committed, perhaps it will be worth to apply
it also for 3.2 which has the same regression.
--
components: +XML
stage: needs patch - patch review
versions: +Python 3.2
___
Python
Roger Serwy added the comment:
I'm pinging this issue to see if anyone has had any problems with the
Windows-specific workaround for highlighting the selection tags. Issue17511
depends on this fix.
--
assignee: - roger.serwy
___
Python tracker
Kushal Das added the comment:
I have been able to get the logical line details (start of it), now working on
to print the required lines.
The current way of showing source lines removes any indentation, but to show
all the physical lines (related to the logical line) one should show the
Serhiy Storchaka added the comment:
Perhaps we should add a deprecation warning for codecs streams right in this
patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17915
___
Ezio Melotti added the comment:
We could use the SSL docs[0] as example instead of subprocess.
[0]: http://docs.python.org/3/library/ssl.html#security-considerations
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13515
Jan Safranek added the comment:
Could you try to inspect the `self` variable inside weakref_dealloc,
especially `self-wr_object` and its Py_TYPE() value? Also, what is the
value of Py_REFCNT(self-wr_object)?
in weakref_dealloc at Objects/weakrefobject.c:106:
(gdb) p *self
$1 = {_ob_next =
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4831
___
___
Python-bugs-list
Antoine Pitrou added the comment:
(gdb) p *((PyWeakReference*)self)-wr_object
$9 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x0}
If I am reading Py_TYPE right, Py_TYPE(self-wr_object) must be 0
(=NULL).
Well, no, it should *always* be non-NULL (and it's a strong
Amaury Forgeot d'Arc added the comment:
swigpyobject_type is a static PyTypeObject variable (similar to all static
PyTypeObject structures we write in extension modules, but inside a function)
It should never be deallocated... There may be a refcount issue with this
object.
--
nosy:
R. David Murray added the comment:
Can you preserve just the *additional* indentation? That is, strip the excess
leading whitespace, but preserve the logical indentation, like textwrap.dedent
does?
--
___
Python tracker rep...@bugs.python.org
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17925
___
___
Antoine Pitrou added the comment:
swigpyobject_type is a static PyTypeObject variable (similar to all
static PyTypeObject structures we write in extension modules, but
inside a function)
It should never be deallocated... There may be a refcount issue with
this object.
Even if it's
Antoine Pitrou added the comment:
The test seems to be failing on Windows.
Yes. I'll try to setup a new Windows dev environment and take a look :-/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1545463
Amaury Forgeot d'Arc added the comment:
Right. But this is an embedded interpreter, and SWIG does not call
PyType_Ready() again; the old type is returned instead.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17922
Changes by David Edelsohn dje@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
___
___
Python-bugs-list
New submission from David Edelsohn:
The PowerLinux buildslave fails in test_dbm:test_keys() because of a problem
with the in operator.
import dbm
d = dbm.open('t','c')
a = [('a', 'b'), ('12345678910', '019237410982340912840198242')]
for k,v in a:
... d[k] = v
...
print d
dbm.dbm
Changes by David Edelsohn dje@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
But this is an embedded interpreter, and SWIG does not call
PyType_Ready() again; the old type is returned instead.
Yuk. Perhaps Dave Beazley can give us some insights here?
Jan, one possibility would be for Pegasus to stop unloading Python, it seems.
Jan Safranek added the comment:
Right. But this is an embedded interpreter, and SWIG does not call
PyType_Ready() again; the old type is returned instead.
Python crashes in Py_Initialize(). SWIG_init() is called right after it.
So even if SWIG calls PyType_Ready, it would be too late.
Why
Antoine Pitrou added the comment:
Can you try the other dbm methods? e.g. has_key(), get()...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
___
Amaury Forgeot d'Arc added the comment:
Python remembers SWIG types because SWIG generates code like this:
PyTypeObject * SwigPyObject_TypeOnce(void) {
static PyTypeObject swigpyobject_type;
static int type_init = 0;
if (!type_init) {
// ... initialization code ...
Antoine Pitrou added the comment:
Forget it, can you just try the following patch?
diff --git a/Modules/dbmmodule.c b/Modules/dbmmodule.c
--- a/Modules/dbmmodule.c
+++ b/Modules/dbmmodule.c
@@ -168,11 +168,13 @@
dbm_contains(register dbmobject *dp, PyObject *v)
{
datum key, val;
+
New submission from Guido van Rossum:
This came out of some investigations into Tulip reference cycles. I've only
confirmed this with 3.3 and 3.4, but I suspect it's a problem in earlier
versions too.
The scenario is as follows.
Consider a object with a method that ends up catching an
Antoine Pitrou added the comment:
Why python remembers SWIG types after Py_Finalize() in the first
place?
I want to destroy it and start with fresh instance.
Because a significant amount of static data inside CPython actually
survives Py_Finalize :-/
--
David Edelsohn added the comment:
My example and test_dbm succeeds on Python2.7 with your patch applied.
Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
___
Antoine Pitrou added the comment:
Ok. This is a classic example of why a big-endian buildbot is useful :)
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
___
Changes by Charles-François Natali cf.nat...@gmail.com:
Added file: http://bugs.python.org/file30167/ins_macro-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
Changes by Charles-François Natali cf.nat...@gmail.com:
--
keywords: +needs review, patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file30168/pystate.diff
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg176850
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16569
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
Removed message: http://bugs.python.org/msg176851
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16569
___
Ezio Melotti added the comment:
Here's the traceback:
http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7/builds/435/steps/test/logs/stdio
==
ERROR: testLoadWithUNC (test.test_tcl.TclTest)
New submission from David Edelsohn:
Another endianness bug that causes a failure in test_structmembers.py.
_testcapi reports string too long because
getargs.c:PyArg_ParseTupleAndKeywords() incorrectly returns a huge value for
string_len.
The problem is FETCH_ARGS is passing the wrong type to
Richard Oudkerk added the comment:
I think the problem is that the __del__ method fails on Windows, maybe because
sys.stdout and sys.__stderr__ have been replaced by None.
Consider the following program:
import os
class C:
def __del__(self, write=os.write):
write(1,
Richard Oudkerk added the comment:
I will try a fix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1545463
___
___
Python-bugs-list mailing
Glenn Linderman added the comment:
Paul, thanks for your continued work.
I had reworked your prior patch into a subclass of Argument Parser, and
tweaking the code to get parse_intermixed_args to adjust the behaviors I had
reported.
Now substituting exactly your more flexible new code into my
Changes by Yuval Greenfield ubershme...@gmail.com:
--
nosy: +ubershmekel
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17927
___
___
Richard Oudkerk added the comment:
On Windows my encoding for stdout, stderr is cp1252 which is implemented in
pure python.
By the time that _PyGC_DumpShutdownStats() runs the encoding.cp1252 module has
been purged so stdout and stderr are broken.
I am afraid I will have to leave this to you
New submission from Firstname Lastname:
Trying to work with tarfile library and python 3.3 (Ubuntu 13.04 64-bit)
While everything works quite well using StringIO.StringIO() and python 2.7.4,
the equivalent code with io.StringIO() and python 3.3.1 doesn't. Is that a bug
or am I doing something
Till Maas added the comment:
When might this be patched in Python 2.X? This Exception makes the function
pretty useless for me, since it makes by custom compare script crash.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Basic questions like this aren't really suitable for the tracker, you should
use other forums such as the python-list mailing list or the #python irc
channel.
In Python3, bytes and strings are different classes, but in Python2 they are
not. You need to be
R. David Murray added the comment:
Bah, I should reread my messages *before* I hit submit. A better phrasing
would be questions like this aren't what the tracker is intended to answer,
you will get more and better help from... :)
(The bytes/string split is the most important thing to
New submission from Tim Peters:
Each time thru, CWR searches for the rightmost position not containing the
maximum index. But this is wholly determined by what happened the last time
thru - search isn't really needed. Here's Python code:
def cwr2(iterable, r):
pool = tuple(iterable)
Tim Peters added the comment:
Oops! Last part should read
since the indices vector is non-decreasing, if indices[j] was n-2 then
indices[j-1] is also at most n-2
That is, the instances of r-2 in the original should have been n-2.
--
___
Python
New submission from STINNER Victor:
The issue #1983 was not fixed on Windows: pid_t is HANDLE on Windows, which is
a pointer. SIZEOF_PID_T is not defined in PC/pyconfig.h and so longobject.h
takes the default implementation (use C long type):
/* Issue #1983: pid_t can be longer than a C long
STINNER Victor added the comment:
@Mark: any opinion on my patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17870
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Your diagnosis seems right about test_garbage_at_shudown
(I can reproduce under Linux using `PYTHONIOENCODING=iso8859-15 ./python -m
test -v test_gc`).
--
___
Python tracker rep...@bugs.python.org
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1545463
___
___
Python-bugs-list
STINNER Victor added the comment:
I don't know how to create an iterator object. How can I do that?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17932
___
New submission from STINNER Victor:
seqiterobject.it_index type is long, whereas iter_setstate() uses a Py_ssize_t.
It would be safer to use Py_ssize_t type for seqiterobject.it_index.
The issue emits a compiler warning on Windows 64-bit.
iterator.__getstate__() was introduced in Python 3.3,
Roundup Robot added the comment:
New changeset 53da3bad8554 by Antoine Pitrou in branch '2.7':
Issue #17926: Fix dbm.__contains__ on 64-bit big-endian machines.
http://hg.python.org/cpython/rev/53da3bad8554
--
nosy: +python-dev
___
Python tracker
Antoine Pitrou added the comment:
Committed, thank you.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17926
Antoine Pitrou added the comment:
Is it 2.7-only?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17928
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset a199ec80c679 by Antoine Pitrou in branch '2.7':
Issue #17928: Fix test_structmembers on 64-bit big-endian machines.
http://hg.python.org/cpython/rev/a199ec80c679
--
nosy: +python-dev
___
Python tracker
Antoine Pitrou added the comment:
Here is a patch, it seems to work on the custom buildbots. The problem was
two-fold:
- PyErr_Warn() is too high-level, it will invoke linecache and others
- encodings and codecs shouldn't be cleared before the final shutdown
--
Added file:
Antoine Pitrou added the comment:
Fixed. _testcapi was actually the culprit.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17928
New submission from Antoine Pitrou:
The following error appeared on some buildbots:
http://buildbot.python.org/all/builders/x86%20Gentoo%203.x/builds/4195/steps/test/logs/stdio
==
ERROR: test_ftp
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17931
___
___
Python-bugs-list
R. David Murray added the comment:
Review comments added.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue995907
___
___
Changes by Rajanikanth Jammalamadaka rajanika...@gmail.com:
--
nosy: +Raj
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5492
___
___
wim glenn added the comment:
The implementation suggested by the OP
def choice(self, seq):
Choose a random element from a non-empty
sequence.
idx = int(self.random() * len(seq))
try:
result = seq[idx] # raises IndexError if seq
is empty
except TypeError:
wim glenn added the comment:
How about
if isinstance(seq, collections.Sequence):
# do it the usual way ..
else:
return choice(list(seq))
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1551113
97 matches
Mail list logo