Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
OK, but acceptance tests do not need to not try to get higher test coverage.
For instance, for testing disable() simply using it and making sure the
outcome
is as expected also works.
I can understand wanting to avoid some
New submission from blokeley bloke...@gmail.com:
It is a common need to find the grandparent or great-grandparent (etc.) of a
given directory, which results in this:
from os.path import dirname
mydir = dirname(dirname(dirname(path)))
Could a height parameter be added to os.path.dirname so
Christoph Gohlke cgoh...@uci.edu added the comment:
Actually, PyQt4 was not a good example since it is not build using distutils.
Pywin32 and wxPython extensions are the only ones on my system specifying a
dependency on Common Controls or MFC. No dependencies other than CRT, MFC, and
Common
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
This test is wrong::
if (!PyBool_Check(test_var) test_var == Py_False)
the second part is never executed.
if (test_var != Py_False)
is enough to test the return value.
--
___
Python
Yuriy iro...@mail.ru added the comment:
+test_var = Py_BuildValue(?, 0);
+if (PyBool_Check(test_var) test_var == Py_True) {
+PyErr_SetString(TestError, Failed to Create boolean);
+return NULL;
+}
+
+test_var = Py_BuildValue(?, 1);
+if
Daniel Urban urban.dani...@gmail.com added the comment:
I found another case, when this is a problem: if there are no **kwargs, but
there are some keyword-only arguments:
def f(*, a, b): pass
...
f(a=1, b=2)
getcallargs(f, a=1, b=2)
Traceback (most recent call last):
...
TypeError:
Yuriy iro...@mail.ru added the comment:
sorry ^_^
+test_var = Py_BuildValue(?, 0);
+if (!PyBool_Check(test_var) || test_var == Py_True) {
+PyErr_SetString(TestError, Failed to Create boolean);
+return NULL;
+}
+
+test_var = Py_BuildValue(?, 1);
+if
Nick Coghlan ncogh...@gmail.com added the comment:
I can definitely confirm that one:
~/devel/py3k$ gcc -I/usr/local/include/python3.3m -o issue11321 issue11321.c
-L/usr/local/lib/python3.3 -lpython3.3m -lm -lpthread -ldl -lutil -rdynamic
~/devel/py3k$ ./issue11321
START
Try import #0
Nick Coghlan ncogh...@gmail.com added the comment:
I haven't worked out where the error is happening yet, but the 13 allocated
static variables and the complete lack of a module cleanup function aren't
going to be helping matters.
--
___
Python
Nick Coghlan ncogh...@gmail.com added the comment:
Here's a sample stack trace of it blowing up:
Program received signal SIGSEGV, Segmentation fault.
0x00479404 in type_dealloc (type=0x76a82f20) at
Objects/typeobject.c:2523
2523_PyObject_GC_UNTRACK(type);
(gdb) bt
#0
Nick Coghlan ncogh...@gmail.com added the comment:
I like the idea, and it seems to work as expected (i.e. an empty __slots__
doesn't conflict with inheritance from a C defined type or a type with
non-empty __slots__).
However, __slots__ is one of the sections of the type machinery I'm least
Andreas Stührk andy-pyt...@hammerhartes.de added the comment:
It's because the _pickle module doesn't incref Pickler_Type and Unpickler_Type
before calling `PyModule_AddObject()` (which steals a reference).
The attached patch fixes the issue.
--
keywords: +patch
nosy: +Trundle
Added
Jonas H. jo...@lophus.org added the comment:
Humm. Would be great to have the `ldconfig -p` output of such a machine... I
can't get ldconfig to recognize 64-bit libraries on my 32-bit machines, so I
have no output to test against...
--
___
Python
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11329
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Can you write a patch for the documentation?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11329
___
New submission from Jonas H. jo...@lophus.org:
I guess this should be a link.
--
assignee: docs@python
components: Documentation
files: fix-json-link.diff
keywords: patch
messages: 129629
nosy: docs@python, jonash
priority: normal
severity: normal
status: open
title: Fix a link in
Antoine Pitrou pit...@free.fr added the comment:
Here is an excerpt:
libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.9) = /lib64/libc.so.6
libc.so.6 (libc6, OS ABI: Linux 2.6.9) = /lib/libc.so.6
The OS ABI thing is not always there:
libdrm.so.2 (libc6,x86-64) =
New submission from Atsuo Ishimoto ishim...@gembook.org:
In the gc.garbage of the library ref of gc module,
... this list contains only objects with __del__() methods.
This is not true, since gc.garbage will contain generator object with
try-finally block.
--
assignee:
Éric Araujo mer...@netwok.org added the comment:
Does the attached patch fix the issue?
--
assignee: tarek - eric.araujo
components: +Distutils2
keywords: +patch
nosy: +alexis
versions: +3rd party, Python 2.7, Python 3.1, Python 3.3
Added file:
Charles-Francois Natali neolo...@free.fr added the comment:
Aaron Sherman a...@ajs.com added the comment:
That's why I asked for absolute numbers for the overhead difference.
Did you not follow the link in my first post? I got pretty detailed, there.
By the way, strace has a '-T' flag
Benjamin Peterson benja...@python.org added the comment:
r88668
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11345
___
R. David Murray rdmur...@bitdance.com added the comment:
I'm -1 on this feature request. I think it is an unnecessary complication of
the API, especially since dirname corresponds to the unix shell 'dirname'
command, which doesn't have such a feature. If you need this feature in a
Antoine Pitrou pit...@free.fr added the comment:
Well, on the other hand, it *is* a common need.
(and I don't think mimicking the shell is a design principle for Python)
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
Changes by Daniel Stutzbach stutzb...@google.com:
--
nosy: +stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4600
___
___
Python-bugs-list
Andreas Stührk andy-pyt...@hammerhartes.de added the comment:
@Éric: You should probably strip the colour from your diff :-)
--
nosy: +Trundle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11342
Changes by Andreas Stührk andy-pyt...@hammerhartes.de:
--
nosy: +Trundle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4600
___
___
Changes by Éric Araujo mer...@netwok.org:
Removed file: http://bugs.python.org/file20933/distutils-files.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11342
___
Changes by Éric Araujo mer...@netwok.org:
Added file: http://bugs.python.org/file20934/distutils-files.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11342
___
Jonas H. jo...@lophus.org added the comment:
the orig impl matches the abi_type at the beginning of the parentheses,
yours simply ignores the abi_type (that should have caught my eye, but that
regex looked so much like magic that I didn't try to make sense of it :-))
Same here. :)
The
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11282
___
Filip Gruszczyński grusz...@gmail.com added the comment:
Test for releasing unacquired lock and aliasing exception.
--
keywords: +patch
nosy: +gruszczy
Added file: http://bugs.python.org/file20936/11140.patch
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
No, it isn't a design principle. My point was that unix hasn't found it useful
to add a level option to the dirname API.
I don't know that I personally have ever had occasion to peel off more than one
directory level without also
Guido van Rossum gu...@python.org added the comment:
I think the idea is reasonable. (I haven't checked the patch.)
--
assignee: gvanrossum - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11333
Jonas H. jo...@lophus.org added the comment:
Here comes a patch, changing the behaviour to:
./python -q
class C:
... pass
...
(1).__class__ = 1
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: __class__ must be set to a class defined by a class statement, not
Antoine Pitrou pit...@free.fr added the comment:
Ok, great !
The hg builders are temporary - or, rather, the SVN builders will get removed
once the transition is over.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
Dj Gilcrease digitalx...@gmail.com added the comment:
Correct the tests. They passed before but had a logic flaw that caused them to
never test that the correct boolean value was being returned.
--
Added file: http://bugs.python.org/file20938/issue10880_68064.patch
Changes by Dj Gilcrease digitalx...@gmail.com:
Removed file: http://bugs.python.org/file20929/issue10880_rev68064.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10880
___
Benjamin Peterson benja...@python.org added the comment:
This is not really accurate:
class x(int): pass
...
class y(object): pass
...
x().__class__ = y
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: __class__ assignment: 'x' object layout differs from 'y'
Ezio Melotti ezio.melo...@gmail.com added the comment:
The patch turned out to be less trivial than I initially thought.
The current algorithm checks for invalid continuation bytes in 4 places:
1) before the switch/case statement in Objects/unicodeobject.c when it checks
if there are enough
Oliver Drake obdrak...@gmail.com added the comment:
Thanks for the comments and prompt response :) I think I misunderstood the
nature and level of these unit tests. I will fix the specific issues you
mentioned, and either cut or modify the less useful/too low level tests (e.g.
disable). In
New submission from Arfrever Frehtes Taifersar Arahesis
arfrever@gmail.com:
1. libpython3.so has soname llibpython3.so due to needless l in -Wl,-hl$@.
2. libpython3.so is not linked against libpython$(LDVERSION).so when
-Wl,--as-needed flag is used. -Wl,--as-needed flag is used by default
Changes by Georg Brandl ge...@python.org:
--
assignee: - loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11347
___
___
Python-bugs-list
Brett Cannon br...@python.org added the comment:
Testing the documented API is definitely wanted, Oliver. Any change in
behaviour needs to be detected to ensure there is not backwards-compatibility
regressions without it being intentional.
--
___
Brett Cannon br...@python.org added the comment:
Can you provide the test's failing report and traceback?
--
nosy: +brett.cannon
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11340
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
Regardless of this patch, such a libpython3.so regular file cannot exist in
Gentoo. Gentoo package manager disallows installation, when it detects file
collisions. If I rename libpython3.so of Python 3.2 to
Brett Cannon br...@python.org added the comment:
My mistake; missed the attachment.
--
status: pending - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11340
___
New submission from Arfrever Frehtes Taifersar Arahesis
arfrever@gmail.com:
$ nice -n20 python3.3 -m test.test_os
...
test_set_get_priority (__main__.ProgramPriorityTests) ... FAIL
==
FAIL: test_set_get_priority
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Of course the test fails: a process can't have a nice value higher than a
certain limit, which I think can vary depending on the UNIX variant in use. The
fix is not to use nice -n20.
--
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This would be an important fix-up if we could find some way to implement it.
The basic problem is that the class object is defined after the class
definitions have been made, so the target of the Graph reference isn't known
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
Removed message: http://bugs.python.org/msg129656
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11339
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This would be an important fix-up if we could find some way to implement it.
The basic problem is that the class object is defined after the class
definitions have been made, so the target of the Graph reference isn't known
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:
I actually wanted to use 'nice -n19 python3.3 -m test.test_os', which also
fails.
Test suite of Python can be run be a package manager, which automatically sets
high niceness.
If niceness is high, then maybe this
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
Removed message: http://bugs.python.org/msg129657
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11339
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
class Prepared(type):
'Preload the class with a reference to itself'
@classmethod
def __prepare__(mcl, name, bases):
return {name: type(name, bases, {})}
def __new__(mcl, name, bases, mapping):
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
Removed message: http://bugs.python.org/msg129659
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11339
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This would be an important fix-up if we could find some way to implement it.
The basic problem is that the class object is defined after the class
definitions have been made, so the target of the Graph reference isn't known
Changes by Armin Rigo ar...@users.sourceforge.net:
--
nosy: -arigo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11339
___
___
Python-bugs-list
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +durban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11339
___
___
Python-bugs-list
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11348
___
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
It looks like everyone is in favor of the change. I'll apply the patch after
adding some comments and tests.
--
assignee: ncoghlan - rhettinger
___
Python tracker
Boris FELD lothiral...@gmail.com added the comment:
Bug confirmed on python2.5+ and python3.2-.
If it works with the dash, is agree with the Marc-Andre solution.
--
nosy: +Boris.FELD
versions: +Python 2.5, Python 2.6
___
Python tracker
Filip Gruszczyński grusz...@gmail.com added the comment:
But this is exactly how strptime in C. Consider this:
#include time.h
#include stdio.h
#include stdlib.h
#include string.h
int main(){
char buf[255];
struct tm tm;
memset(tm, 0, sizeof(tm));
strptime(123, %m%d,
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Until and unless this gets fixed, perhaps we should document some sort of
workaround. One possibility is attached.
--
Added file: http://bugs.python.org/file20940/annotations_workaround.py
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
Removed message: http://bugs.python.org/msg129664
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11333
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
Removed file: http://bugs.python.org/file20940/annotations_workaround.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11333
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Until and unless this gets fixed, perhaps we should document some sort of
workaround. One possibility is attached.
--
Added file: http://bugs.python.org/file20941/annotations_workaround.py
Filip Gruszczyński grusz...@gmail.com added the comment:
Here is a simple patch, that sets metadata version in PKG-INFO to 1.1, if finds
classifier or download_url parametres in setup. If it's any good, I'll try to
write a test. If not, I'll be happy to get some advice on how to provide a
Éric Araujo mer...@netwok.org added the comment:
Thanks for your help. Tests would be very much appreciated; we don’t strictly
follow the test-before-code method, but in this case it’s the best method to
make sure we comply with the PEP: I can review the test against the PEP, then
check if
Atsuo Ishimoto ishim...@gembook.org added the comment:
Oh, Not only try-finally block, generators contains try-except or with block
will be added to gc.garbage.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11346
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Does the patch for issue11321 fix this issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9197
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The patch looks good. It may also fix issue9197, which fails in a similar
fashion
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11321
LW cjejuni2...@yahoo.com added the comment:
hi eric: thanks for the reply. here is what i'm getting from 'patch --dry-run'
command:
les@Liquid:~/Desktop$ patch -i ~/Desktop/distutils_files.diff -d
~/Downloads/Python-3.2/Lib/distutils --dry-run --backup
patching file bdist_wininst.py
Hunk #1
Hoyt Koepke hoy...@gmail.com added the comment:
Okay, finally got to test this on a system with python 2.7.1+ (development
branch, r88606, and indeed, the same crash occurs. This one was compiled from
scratch with gcc 4.5.2.
--
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
Can you test with a checkout of the py3k branch?
http://docs.python.org/devguide/setup#checking-out-the-code
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11342
Nick Coghlan ncogh...@gmail.com added the comment:
While Andreas's patch does indeed prevent the crash, there is something more
going on here.
I modified his patch to print out the reference counts immediately after the
new INCREF commands.
With the INCREF commands commented out, it looks
Andreas Stührk andy-pyt...@hammerhartes.de added the comment:
That initial increase you can see happens because the module's dict is copied
in `_PyImport_FixupExtensionUnicode()`.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
Merging this into issue11321 since that relates to the same underlying problem
and includes a simpler test case.
--
nosy: +ncoghlan
resolution: - duplicate
status: open - closed
superseder: - 9th import of module _pickle always
New submission from Nick Coghlan ncogh...@gmail.com:
As discussed in issue11321, _pickle allocates a number of module level objects,
but doesn't use the appropriate PEP 3121 mechanisms to manage their lifecycle.
It should be updated to follow the relevant development guidelines in the
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +barry, dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11347
___
___
Python-bugs-list
Changes by Andreas Stührk andy-pyt...@hammerhartes.de:
--
nosy: +Trundle
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11349
___
___
Nick Coghlan ncogh...@gmail.com added the comment:
Looking at the example of _struct.c, I'll withdraw my objection to the patch.
The segfault is due to the attempt to destroy a statically allocated type
object, and the only viable solution to that is to ensure the reference count
never drops
Benjamin Peterson benja...@python.org added the comment:
Unfortunately proper module finalization is an invitation to more segfaults
because modules can be finalized before objects in them are, resulting in
segfaults when its attempted to access modules.
--
nosy: +benjamin.peterson
On Tue, Feb 22, 2011 at 08:48:20AM +, wesley chun wrote:
The fix is to add the end char '$' to the regex to get all 4 working:
Better would be a regex for white-space '\s' which would achieve the
same purpose plus it would satisfy the other requirement for using it
with search and can do
LW cjejuni2...@yahoo.com added the comment:
seemed no errors. end of check attach:
U py3k
Checked out revision 88674.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11342
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Having the soname be libpython3 is the whole point of the library, it serves no
other reason.
It is intentional that there are file collisions with that file, and either the
local admin or the distributor must make an explicit choice which
Georg Brandl ge...@python.org added the comment:
The -hl - -h part seems correct though.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11347
___
Charles-Francois Natali neolo...@free.fr added the comment:
If niceness is high, then maybe this test could try to decrease it instead of
increasing.
You must be root or have CAP_SYS_NICE to do that.
--
nosy: +neologix
___
Python tracker
87 matches
Mail list logo