Stefan Krah added the comment:
With -F -j16 I get these failures both on FreeBSD and Linux, but not
the original failure:
==
FAIL: test_parallel_meta_path (test.test_threaded_import.ThreadedImportTests
Stefan Behnel added the comment:
We are continuously testing Cython against all CPython versions starting from
2.4, so I can assure you that it's still working for all other versions. Here's
our CI server:
https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/618/
I
Stefan Behnel added the comment:
That's the module init code, yes, including the setting of __file__ and
__path__ that I mentioned (due to issue13429). Setting at least one of the two
is required in previous CPython versions to make relative imports
Stefan Krah added the comment:
Martin v. L??wis wrote:
> Here is a more formal definition of my last proposal,
>
> v and w are equal iff
> v.shape() == w.shape() and
> ((v.format == w.format and v.tobytes() == w.tobytes()) or
>v.tolist() == w.tolist())
> if tolist ra
Stefan Krah added the comment:
To be specific, after a quick look the only function from _testbuffer.c
that would be needed is unpack_single(). This really does not look very
complex.
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
Closing since the remaining issue is almost certainly a platform bug.
--
keywords: -3.2regression, patch
resolution: -> wont fix
stage: needs patch -> committed/rejected
status: open -> closed
___
Pytho
Stefan Krah added the comment:
Thanks, Nick. I'll work on a struct module patch then. At this point for me
this is the only satisfying solution.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
I'm almost done with my (second) self-review of mpdecimal.c. The only
functions missing are all Karatsuba functions and mpd_qpowmod().
If there are any takers, I would be very happy. For the Karatsuba functions
you'll probably need Roman Maeder's
New submission from Stefan Krah:
With the -R option, test_buffer.py needs an additional warm-up for
the unicode_latin1 cache. Patch attached.
--
components: Tests
files: warm_latin1_cache.diff
keywords: patch
messages: 168063
nosy: skrah
priority: normal
severity: normal
stage: patch
Stefan Krah added the comment:
I'm attaching a test case. You're right, in test_buffer it's
hard to reproduce but I've encountered the "leak" several times
in the past months.
Today I realized that the "leak" always occurred with format code
'c&
Stefan Behnel added the comment:
Interesting. I didn't know that. The .py file is always installed automatically
next to the .so file by distutils.
Here's what strace gives me:
Python 2.7:
stat("my_test_package", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
stat("
New submission from Stefan Holek:
After upgrading 3.3.0b1 to b2 (make install to same location) I noticed that
the Grammar pickles for beta.2 were missing (the beta.1 pickles still being
there).
The result is permission errors and/or virtualenv SandboxViolations, when 2to3
is used for the
Stefan Krah added the comment:
Should we go all the way and also explicitly fill the small int cache?
Integers 0-255 should be initialized already, but I'm not sure
about [-5..-1] and 256. I haven't been able to create a test case
for integers though.
--
Added
Stefan Krah added the comment:
Here is a patch implementing by-value comparisons for all format strings
understood by the struct module. It is slightly longer than promised, since
for larger arrays it is necessary to cache an unpacking object for acceptable
performance. The fast path for
Stefan Mihaila added the comment:
Maybe we could postpone the review process for a few days
until I fix some known issues
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
I didn't get my own comments as mail, so this is just a notification that I've
answered Nick's comments.
--
___
Python tracker
<http://bugs.pyt
Stefan Behnel added the comment:
I tried it and it works to just insert the package module into sys.modules
after creation if it's not there yet:
#if PY_MAJOR_VERSION < 3
__pyx_m = Py_InitModule4(__Pyx_NAMESTR("my_test_package"), __pyx_methods, 0,
0, PYTHON_API_VERSION);
Stefan Krah added the comment:
Here is a new patch that hopefully addresses all comments.
--
Added file: http://bugs.python.org/file26831/issue15573-struct-2.diff
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
Nick's comment in msg167963 got me thinking. Indeed, in Numpy the 'U'
specifier is similar to the struct module's 's' format code, only for
UCS4. So I'm questioning whether the current semantics of 'u' and 'w&
Stefan Krah added the comment:
Martin v. Loewis wrote:
> I would be fine with deprecating the 'u' type arrays, acknowledging
> that the Py_UNICODE element type is even more useless now than before.
> If that is done, there is no point in fixing anything about it. If
> i
Stefan Krah added the comment:
Well, apparently people do use 'u', see #15035.
--
nosy: +ronaldoussoren
___
Python tracker
<http://bugs.python.o
Stefan Krah added the comment:
This one should be fixed by #13072. Could you check again?
--
___
Python tracker
<http://bugs.python.org/issue15035>
___
___
Pytho
Stefan Krah added the comment:
Martin v. L??wis wrote:
> #15035 indicates that there is a need for UCS-2 arrays, using 'u' arrays was
> technically incorrect, since it is based on Py_UNICODE, whereas the API in
> question uses UniChar (which apparently is a two-byte type).
Stefan Krah added the comment:
There is still one corner case involving NaNs: Released memoryviews always
compare equal. I took that over from the 3.2 implementation.
>>> import array
>>> a = array.array('d', [float('nan')])
>>> m = memoryview(a)
&
Stefan Holek added the comment:
Mac OS X 10.6.8 (Snow Leopard)
Xcode Tools 3.2.6
./configure --prefix=/usr/local/python3.3
make
sudo make install
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
Reproduced by another FreeBSD bot:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.x/builds/238/steps/test/logs/stdio
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
Thank you for the patch and the big amount of work that you are doing on so
many modules!
I'm afraid though that the patch is not acceptable in its current state:
1) The unit tests do not pass. This could be fixed.
2) The patch slows down _decimal
Changes by Stefan Krah :
--
assignee: -> skrah
___
Python tracker
<http://bugs.python.org/issue15722>
___
___
Python-bugs-list mailing list
Unsubscri
Stefan Krah added the comment:
I tried to benchmark this patch but I'm getting a segfault:
Python 3.3.0b2+ (default:dc18d73e67a5, Aug 18 2012, 15:37:04)
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more info
Changes by Stefan Krah :
--
assignee: -> skrah
___
Python tracker
<http://bugs.python.org/issue15672>
___
___
Python-bugs-list mailing list
Unsubscri
Stefan Krah added the comment:
Thanks, Mark. With your change applied I can't measure any performance
differences either.
--
___
Python tracker
<http://bugs.python.org/is
Stefan Mihaila added the comment:
Maybe you can set this issue as the superseder of issue9269, because the
patches there have already been applied here.
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
The test suite is not a good benchmark: it also tests decimal.py. For
numerical performance I'm running:
cd Modules/_decimal/tests
../../../python bench.py
You can hit Ctrl-C after the first cdecimal result, since that's usually
already a p
Stefan Krah added the comment:
> What specific decimal test is failing?
# Attributes cannot be deleted
for attr in ['prec', 'Emax', 'Emin', 'rounding', 'capitals', 'clamp',
'flags', 'traps']
Stefan Krah added the comment:
If everyone agrees on deprecating 'u', here's a patch. I think
that should be sufficient to close this issue (unless we absolutely
need deprecation warnings).
--
Added file: http://bugs.python.org/file26892/array_d
Stefan Krah added the comment:
I think issue15573-struct-2.diff is ready to go and I'd rather commit
sooner than later. Nick, can I interpret your last review comment
as "go ahead"? :)
--
___
Python tracker
<http://bugs.pyt
New submission from Stefan Krah:
There are a couple of places in the memoryview docs that still
need a "versionchanged" tag.
Other places might need explanations what exactly has changed.
--
assignee: docs@python
components: Documentation
messages: 168563
nosy: docs@pyt
Stefan Krah added the comment:
Right. I'm tracking all "versionchanged" issues in #15724.
--
___
Python tracker
<http://bugs.python.org/issue15573>
___
__
Stefan Krah added the comment:
The patch looks good in every detail. +1 for committing.
--
___
Python tracker
<http://bugs.python.org/issue15544>
___
___
Pytho
Stefan Krah added the comment:
Since actual removal is only scheduled for 4.0, I think user warnings
can wait until 3.4.
By then, we should have sorted out the struct format codes. In this
scenario we would be sort of forced to use 'C', 'U' and 'W' as the
new
New submission from Stefan Krah:
Coverity found a leak in PyUnicode_AsWideCharString(). Patch attached.
--
components: Interpreter Core
files: aswidechar-leak.diff
keywords: patch
messages: 168584
nosy: haypo, skrah
priority: normal
severity: normal
stage: patch review
status: open
Stefan Krah added the comment:
Thanks!
--
___
Python tracker
<http://bugs.python.org/issue15728>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Stefan Krah :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Stefan Mihaila added the comment:
There are still some upcoming changes.
--
___
Python tracker
<http://bugs.python.org/issue15642>
___
___
Python-bugs-list mailin
New submission from Stefan Krah:
Coverity found an unchecked return value in _PySequence_BytesToCharpArray().
Patch attached.
A demonstration:
import _posixsubprocess
class Z(object):
def __len__(self):
return 1
_posixsubprocess.fork_exec(1,Z(),3,[1, 2
Stefan Krah added the comment:
Thanks for reviewing!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.2
___
Python tracker
<http://bugs.python.or
New submission from Stefan Krah:
A Py_ssize_t overflow can be constructed in _PySequence_BytesToCharpArray().
Patch attached.
Demonstration (requires revision >= 2af78f8a98e1):
Python 3.3.0b2+ (default:2af78f8a98e1, Aug 20 2012, 11:38:54)
[GCC 4.4.3] on linux
Type "help"
New submission from Stefan Krah:
There's a use of an unchecked return value in zipimport.c. Patch attached.
--
components: Extension Modules
files: zipimport_null_dereference.diff
keywords: patch
messages: 168644
nosy: skrah
priority: normal
severity: normal
stage: patch review
s
New submission from Stefan Krah:
Coverity found a missing NULL check in subprocess_fork_exec(). Patch attached.
Demonstration:
import _posixsubprocess
class Z(object):
def __len__(self):
return 1
_posixsubprocess.fork_exec(Z(),[b'1'],3,[1,
2],5,6,7,8,9,10,11,12,13,1
Stefan Krah added the comment:
Thanks again!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.2
___
Python tracker
<http://bugs.python.or
New submission from Stefan Krah:
Coverity found a missing NULL check in builtin_compile(). Patch attached.
--
components: Interpreter Core
files: builtin-compile-check-null.diff
keywords: patch
messages: 168664
nosy: skrah
priority: normal
severity: normal
stage: patch review
status
Stefan Krah added the comment:
issue15736.diff shows what I meant in the comments. I find this
slightly more readable than casting the big RHS expression.
--
Added file: http://bugs.python.org/file26931/issue15632.diff
___
Python tracker
<h
Changes by Stefan Krah :
Removed file: http://bugs.python.org/file26931/issue15632.diff
___
Python tracker
<http://bugs.python.org/issue15736>
___
___
Python-bugs-list m
Stefan Krah added the comment:
Sorry, the right diff this time.
--
Added file: http://bugs.python.org/file26932/issue15736.diff
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
Thanks, done.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.or
Stefan Krah added the comment:
Thanks for the warning. I see you've already committed, so my natural
inertia has protected me from additional merge work. :)
--
___
Python tracker
<http://bugs.python.org/is
Stefan Krah added the comment:
Bad news: gcc-4.6.3 needs the size_t cast, otherwise it warns with
both the assert() and the (argc < 0) version.
So I suggest using the size_t cast and a comment.
--
___
Python tracker
<http://bugs.pyth
Stefan Krah added the comment:
I used the cast for gcc >= 4.6 and the assert() as a courtesy to
authors of buggy sq_length() functions. Thanks for the comments!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open
Stefan Krah added the comment:
Looks like a ZFS/nanosecond issue. My FreeBSD buildbot uses FFS and does not
have the failures.
--
___
Python tracker
<http://bugs.python.org/issue15
Stefan Krah added the comment:
> So, looks like FreeBSD's /usr/share/mk/sys.mk is to blame here.
> It unconditionally sets CFLAGS to `-O2 -pipe`.
I've been debugging this once, too. My conclusion was that if the OS is set up
that way, we shouldn't do anything about it in t
Stefan Mihaila added the comment:
>- I don't really like the idea of changing the semantics of the PUT and GET
>opcodes. I would prefer new opcodes if possible.
Well, the semantics of PUT and GET haven't really changed. It's just that the
PUT opcode is not generated anymo
Stefan Krah added the comment:
The timeouts on NetBSD and OpenBSD are very likely related to
bugs in the user-space thread libraries. See also #8714.
I would recommend running these bots --without-threads.
--
nosy: +skrah
___
Python tracker
<h
Stefan Krah added the comment:
Thanks, fixed.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Stefan Mihaila added the comment:
Are there also some known techniques on tracking down memory leaks?
I've played around with sys.gettotalrefcount to narrow down
the place where the leaks occur, but they seem to only occur in v4,
i.e. pickle.dumps(3.0+1j, 4) leaks but pickle.dumps(3.0+
New submission from Stefan Mihaila:
Here are a few counter-intuitive outputs:
>>> dict.fromkeys is dict.fromkeys
False
>>> id(dict.fromkeys) == id(dict.fromkeys)
True
>>> x=dict.fromkeys; id(x) == id(x)
True
>>> x=dict
Changes by Stefan Mihaila :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue15773>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Stefan Holek:
With virtualenv I can do
$ virtualenv .
but with pyvenv I get
$pyvenv .
Error: Directory exists: /Users/stefan/sandbox/foo
Please allow pyvenv to apply to existing directories.
--
components: None
messages: 168990
nosy: stefanholek
Stefan Krah added the comment:
I agree with Mark's arguments. Yesterday I tried to use as_decimal() in
a small program and it did not feel natural to me. I'll probably continue
to use Decimal(f.numerator) / f.denominator.
If this goes in, I'd prefer that as_decimal() always uses
Stefan Holek added the comment:
Hm. What I am actually after is to "bless" an existing directory – source files
and all – with a virtualenv (or pyvenv). I am not interested in the command
deleting anything from anywhere, why thank you.
Workflow:
$ git clone g...@github.com:s
Stefan Krah added the comment:
Good, I think this can be closed then.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type: -> behavior
___
Python tracker
<http://bugs.python
Stefan Holek added the comment:
Sorry for being late. I'll make a feature request for 3.4 then.
--
___
Python tracker
<http://bugs.python.org/issue15776>
___
___
Stefan Krah added the comment:
The effect of the change is pretty minimal though: Previously
"not equal" was returned for unknown formats, now the struct
module figures it out.
memoryobject.c has 100% coverage except for a couple of lines
that are either impossible to reach or ve
Stefan Krah added the comment:
> You can look at the attached memoryobject.c.gcov: *All* failure paths
> are taken since Python API functions are wrapped in macros that
> set PyExc_FailAPIError and return failure at predefined points
> the test suite.
That should read: With a patc
Stefan Krah added the comment:
Great, give me 20 minutes or so.
--
___
Python tracker
<http://bugs.python.org/issue15573>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
Except for Misc/NEWS the patch can be committed unchanged. Please
go ahead!
[The remaining doc changes are tracked elsewhere.]
--
___
Python tracker
<http://bugs.python.org/issue15
New submission from Stefan Krah:
test_parallel_module_init() fails on Windows-64:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/553/steps/test/logs/stdio
==
FAIL: test_parallel_module_init
Stefan Krah added the comment:
The buildbot in question uses -j4, and I can reproduce this on Linux
with:
./python -m test -uall -F -j4 -v test_threaded_import
==
FAIL: test_parallel_meta_path
Stefan Krah added the comment:
I completely forgot about that issue. The patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue15765>
___
___
Stefan Krah added the comment:
I agree that for 3.2 this isn't so important given that non-contiguous
arrays have multiple issues there.
Christian, does a fix for 3.2 benefit FreeImage? Don't you run into
other problems with memoryview?
If it helps, I can try to write a pat
Stefan Krah added the comment:
I can only reproduce this on a Core i7. Native OS is Debian Wheezy,
also reproduced earlier on a FreeBSD VM hosted on that machine
(see msg167989). The machine has 4 physical cores, perhaps we
can blame hyper-threading. ;)
$ cat /proc/cpuinfo | grep "model
Stefan Krah added the comment:
This was less work than expected. I suppose docs can always go in
even after rc1 is out, so I'll wait for that.
--
keywords: +patch
Added file: http://bugs.python.org/file26994/issue15724.diff
___
Python tracker
Stefan Krah added the comment:
I can also reproduce it on the Core 2 machine with a ridiculuously
low switch interval:
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -198,6 +198,8 @@
except ImportError:
multiprocessing
Stefan Krah added the comment:
Oh, and as usual, my machines have all CPUs at 100% load.
--
___
Python tracker
<http://bugs.python.org/issue15781>
___
___
Pytho
Stefan Krah added the comment:
The feature is undocumented though. Is it a regression?
There are other places as well. The topic was raised in msg153447 and
msg153506, with no further comments. So I concluded that None argument
support wasn't impo
Stefan Krah added the comment:
Here's a patch deprecating watchexp.
--
___
Python tracker
<http://bugs.python.org/issue10650>
___
___
Python-bugs-list m
Changes by Stefan Krah :
--
keywords: +patch
Added file: http://bugs.python.org/file26996/issue10650.diff
___
Python tracker
<http://bugs.python.org/issue10
Stefan Krah added the comment:
OK, but for example:
Help on function __truediv__ in module decimal:
__truediv__(self, other, context=None)
Return self / other.
Here I think it's undisputed that a C version should not cram a context
argument into a number method. There are many func
Stefan Krah added the comment:
> Can't this be fixed in the CONTEXT_CHECK_VA macro?
No, the macro should only allow contexts. E.g. in the case of localcontext(None)
context_copy(local, NULL) would be called on local=Py_None, which is undefined.
What would perhaps be needed for a nice
Stefan Krah added the comment:
This is the complete list of context=None divergences. It would
be possible to change that, since most of the functions are
generated by macro wrappers.
# This is the only place where 'ctx' is used
localcontext(ctx=None)
canonical(self, context=Non
Stefan Krah added the comment:
On the i7 machine with hyper-threading the issue occurs since
edb9ce3a6c2e.
The tests also got slower:
3430d7329a3b:
$ time ./python -m test -uall -v test_threaded_import
real0m3.195s
user0m0.656s
sys 0m0.284s
edb9ce3a6c2e:
$ time ./python -m
Changes by Stefan Krah :
--
nosy: +skrah
___
Python tracker
<http://bugs.python.org/issue15787>
___
___
Python-bugs-list mailing list
Unsubscribe:
Stefan Krah added the comment:
Nice, on the finicky i7 machine test_threaded_import is fixed.
I'm getting another error in test_importlib, both with and without
the patch. I can open another issue for that if you think it's
completely unrelated:
$ ./python -m test -uall -F test
New submission from Stefan Krah:
On the obstinate i7 machine (see #15781), test_importlib fails
sporadically (after 10 repetitions or so).
$ ./python -m test -uall -F test_importlib
[ 1] test_importlib
Stefan Krah added the comment:
Also reproduced on Ubuntu Lucid/Core 2 Duo with a very low switch
interval and -j4. It takes more repetitions than on the i7:
$ ./python -m test -uall -F -j4 test_importlib
[...]
[224] test_importlib
[225] test_importlib
[226/1] test_importlib
test
Stefan Krah added the comment:
The patch works fine here (as expected).
--
___
Python tracker
<http://bugs.python.org/issue15794>
___
___
Python-bugs-list mailin
Stefan Krah added the comment:
Nick Coghlan wrote:
> Any third party Decimal manipulating function that accepts an
> optional context and passes it down to the standard Decimal API
> will be confronted with the same problem in 3.3: passing None
> as the context no longer means the s
Stefan Krah added the comment:
I don't want to block this, BTW. Personally I'm +-0 on the issue.
If more people think this is needed for backwards compatibility, I'll
write a patch for localcontext. But I'd rather do that *very* soon.
FWIW, none of the cdecimal users has e
Stefan Krah added the comment:
We overlooked one thing. Since hashing is defined in terms of
tobytes(), the equality-hash invariant is now broken:
>>> from _testbuffer import ndarray
>>> x = ndarray([1,2,3], shape=[3], format='f')
>>> y = ndarray(
Stefan Krah added the comment:
I'm trying to think of an optimization for the native types. It should
be possible to cast any native type element to unsigned char and use the
truncated value for the bytes hash.
Well, for double probably it's required to go from double -> int64_
New submission from Stefan Krah:
The new PEP-3118 equality definition from #15573 that is based
on element-wise comparisons breaks the equality-hash invariant:
>>> from _testbuffer import ndarray
>>> x = ndarray([1,2,3], shape=[3], format='f')
>>> y =
2601 - 2700 of 4951 matches
Mail list logo