Stefan Krah added the comment:
In general, the number of calls to PyObject_GetBuffer() must be equal to
the number of calls to PyBuffer_Release(), otherwise bad things will happen
in the same way as with malloc()/free().
Now, in my test case I omitted the call to PyObject_GetBuffer() *with*
Serhiy Storchaka added the comment:
The int=int is probably some sort of micro-optimization and perhaps should be
removed.
Agree, this micro-optimization has no effect here.
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
Alessandro Moura added the comment:
Sorry, here it is the patch.
--
keywords: +patch
Added file: http://bugs.python.org/file27082/random.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15837
Ezio Melotti added the comment:
The issues about weird signatures are being discussed on #15831.
However, this issue is about the docstring. Leave it incorrect?
Change it to the hard-to-parse one liner? Change it to a
two-line signature also?
For the docstring it's ok to use the double
Alessandro Moura added the comment:
test_bytes_glob_directory_with_trailing_slash already has a counterpart in the
main class, but it is not easily handled by overriding self.glob and self.norm.
Since it is only a single test, I just decided to override
test_glob_directory_with_trailing_slash
Petri Lehtinen added the comment:
Fixed, see #13769.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14042
___
___
Python-bugs-list mailing list
Ned Deily added the comment:
The problem here is in the libinstall Makefile target and that hidden
dependency within lib2to3 that, as Tomi notes, causes lib2to3 to try to
recreate the pickles anytime it runs if it thinks they are out of date. The
fixes for Issue15645 cause the recipes for
Trent Nelson added the comment:
Not really... the problem is that the chmod 0007 actually corrupts the ZFS
metadata regarding the symlink by always setting the length to 24.
Andriy did some debugging here:
http://lists.freebsd.org/pipermail/freebsd-fs/2012-August/015005.html
So, the link
Petri Lehtinen added the comment:
Techincally, converting to int is not necessary, because the number of digits
in the unix timestamp doesn't change until year 2286 :)
The patch looks good to me. I don't think comparing pairs would be any more
readable than what the proposed patch does.
Stefan Krah added the comment:
Here's a patch that enforces byte formats.
Does everyone agree on (or tolerate at least) allowing 'B', 'b' and 'c'?
I think we should at least commit the doc patch for 3.3.0. Otherwise
implementors of exporting objects might waste time on a feature that's
New submission from Ned Deily:
With the recent activity around making out-of-tree builds work, while
investigating Issue15822 I realized that the lib2to3 grammar pickle files are
being built in the source directory by the libinstall target step of the main
Makefile rather than in the build
Roundup Robot added the comment:
New changeset aef4a2ba3210 by Petri Lehtinen in branch '3.2':
#15802: Fix test logic in TestMaildir.test_create_tmp
http://hg.python.org/cpython/rev/aef4a2ba3210
New changeset 2370e331241b by Petri Lehtinen in branch '2.7':
#15802: Fix test logic in
Petri Lehtinen added the comment:
Fixed, thanks.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15802
Nick Coghlan added the comment:
+1 for docs patch for 3.3.0 and then enforcing the format restriction for 3.3.1.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15814
___
Changes by Alexey Boriskin sun.v...@gmail.com:
--
hgrepos: +147
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15795
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 895e123d9476 by Stefan Krah in branch 'default':
Issue #15814: Document planned restrictions for memoryview hashes in 3.3.1.
http://hg.python.org/cpython/rev/895e123d9476
--
nosy: +python-dev
___
Python
Roundup Robot added the comment:
New changeset 27b5bd5f0e4c by Victor Stinner in branch 'default':
Close #14223: Fix window.addch(curses.ACS_HLINE)
http://hg.python.org/cpython/rev/27b5bd5f0e4c
--
resolution: - fixed
status: open - closed
___
Python
Changes by R. David Murray rdmur...@bitdance.com:
--
hgrepos: -147
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15795
___
___
Python-bugs-list
Alexey Boriskin added the comment:
I'm attaching a patch, which solves the issue. Patch intoduces new argument
preserve_permissions for extract and extractall methods. That argument may
accept one of the three values: do not preserve permissions, preserve a safe
subset of them or preserve all
STINNER Victor added the comment:
I'm reopening this bug because I've noticed that in Python3.3rc1,
although trying to print curses.ACS_HLINE and other such characters
no long cause an Exception, only blank characters are printed to
the screen.
If the Python curses module is compiled in
STINNER Victor added the comment:
(keep the issue open until the fix is included in Georg's repository)
--
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14223
STINNER Victor added the comment:
@georg.brandl: Can you please include the important fix c58789634d22 into
Python 3.3 final?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15785
___
Martin v. Löwis added the comment:
Am 01.09.12 13:22, schrieb Stefan Krah:
Does everyone agree on (or tolerate at least) allowing 'B', 'b' and 'c'?
Why be more permissive than necessary? -0 on the committed version;
it should IMO further restrict it to 1D contiguous byte arrays.
--
New submission from Ramchandra Apte:
Running the erronous code:
class X:
super_object = super()
fails with a SystemError(super(): __class__ cell not found)
The exception should be a NameError or SystemError.
--
components: None
messages: 169634
nosy: ramchandra.apte
priority:
Changes by Ramchandra Apte maniandra...@gmail.com:
--
title: SystemError raised by super() should be NameError or RuntimeError -
SystemError raised by super() in erronous class should be NameError or
RuntimeError
___
Python tracker
Stefan Krah added the comment:
The FreeBSD machine decided to hang for 1h:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/3340/steps/test/logs/stdio
If I'm running the tests manually, they take over half an hour and I get:
Stefan Krah added the comment:
Martin v. L??wis rep...@bugs.python.org wrote:
Why be more permissive than necessary? -0 on the committed version;
it should IMO further restrict it to 1D contiguous byte arrays.
Does byte arrays include 'b' and 'c' or just 'B'? I don't see a reason
to allow
Stefan Krah added the comment:
I see that in the following build test_threading also fails, so I
wouldn't spend too much time on debugging test_threaded_import:
==
FAIL: test_waitfor_timeout
Alexander Belopolsky added the comment:
On Sep 1, 2012, at 10:24 AM, Stefan Krah rep...@bugs.python.org wrote:
The definition hash(m) == hash(m.tobytes()) is pretty straightforward.
I probably missed something from the early discussion, but doesn't this
definition only work for 1d (or 0d)
Antoine Pitrou added the comment:
I see that in the following build test_threading also fails, so I
wouldn't spend too much time on debugging test_threaded_import:
Did something change recently on that machine? It's supposed to be a
stable buildbot.
--
Stefan Krah added the comment:
Nothing changed on the buildbot. -- It appears that FreeBSD is unable to
handle the low switchinterval. With the patch test_threaded_import runs in
10s.
Since Linux has no problems whatsoever, I'm inclined to think that's
a FreeBSD issue.
I've yet to check if
Stefan Krah added the comment:
tobytes() is the same as the flattened multi-dimensional list representation
with all elements converted to bytes. If I'm not mistaken, that's how NumPy's
tostring() behaves.
--
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky added the comment:
On Sep 1, 2012, at 11:06 AM, Stefan Krah rep...@bugs.python.org wrote:
tobytes() is the same as the flattened multi-dimensional list representation
with all elements converted to bytes.
This is correct, but why is it desirable to have deliberate hash
Nick Coghlan added the comment:
Keep in mind that its OK if hash(m) == hash(m.tobytes()) in some cases where m
!= m.tobytes(). The only cases we really need to kill are those that break the
hash invariant.
I don't like the idea of making the definition of hash more complicated just to
rule
Stefan Krah added the comment:
why is it desirable to have deliberate hash collisions between views with
different shapes?
Since we're now restricting everything to bytes, the multi-dimensional case
is probably not useful at all. As I said above, I would leave it in because
it actually saves
Martin v. Löwis added the comment:
Am 01.09.12 16:24, schrieb Stefan Krah:
Does byte arrays include 'b' and 'c' or just 'B'? I don't see a reason
to allow 'B' but not the others.
Either type is fine with me. It's the multi-dimensional aspect I'd like
to ban.
My reasoning was: If
Charles-François Natali added the comment:
So when calling close_request to deallocate the socket, it will
always be waiting to read response until response data is available.
It seems like an issue in SokcetServer.py library.
Hum, I don't see what you mean.
Even if there is still data in
Georg Brandl added the comment:
+1 for multiple signatures.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15831
___
___
Python-bugs-list
Stefan Krah added the comment:
Disallowing non-contiguous arrays leads to very strange situations though.
I'm positive that there will be a bug report about this:
x = memoryview(b'abc')[::-1]
b = b'cba'
d = {b'cba': 101}
b in d
True
x == b
True
x in d
Traceback (most recent call last):
Chris Jerdonek added the comment:
(The double signature might be easier to understand, but the original issue
should probably be fixed in Sphinx, even if we decide to stop using this kind
of signature.)
I filed an issue for this in the Sphinx tracker here:
Martijn Pieters added the comment:
I note that the documentation still states a dictionary is required for
globals. Should that not be updated as well?
See http://docs.python.org/py3k/library/functions.html#exec
--
nosy: +mjpieters
___
Python
Martijn Pieters added the comment:
Apologies, I meant to link to the dev docs:
http://docs.python.org/dev/library/functions.html#exec
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14385
Chris Jerdonek added the comment:
I will prepare a patch (multiple signatures, for the Python fix).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15831
___
Michael Foord added the comment:
Yep, certainly worth fixing. When 3.3 is out the door I will look at applying
this to all branches.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15836
Martin v. Löwis added the comment:
Am 01.09.12 19:20, schrieb Stefan Krah:
Disallowing non-contiguous arrays leads to very strange situations though.
I don't find that strange. That two object compare equal doesn't imply
that they both hash - only that *if* they hash, they should hash equal.
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15836
___
___
Changes by Charles-François Natali neolo...@free.fr:
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11866
___
___
Antoine Pitrou added the comment:
Could we perhaps take a small poll? My own vote is:
1) Allow bytes hashing at all: +0.5
+10. The buffer() object in 2.x was hashable, and a very important use
case of memoryview is replacing buffer().
2) If 1) is allowed, then also non-contiguous hashing
Antoine Pitrou added the comment:
With or without Raymond's suggested change, global _counter is not necessary
anymore.
Note that this fix only works on implementations where itertools.count().next
is atomic.
--
___
Python tracker
Stefan Krah added the comment:
py x = memoryview(array.array('B',b'cba'))
I find the array example is different. The user has to remember one thing:
memoryviews based on arrays don't hash.
For memoryviews based on bytes one would have to remember:
- 'B', 'c' and 'b' hash
- only
R. David Murray added the comment:
Since it is a bugfix it can be applied at any time now. Checkins to default
will end up in 3.3.1 and 3.4. (Only features need to wait until after 3.3 is
branched in the main repo.)
--
___
Python tracker
Martin v. Löwis added the comment:
Am 01.09.12 20:06, schrieb Stefan Krah:
- b'abc'[::-1] hashes, but memoryview(b'abc')[::-1] does not
I find that memoryview(b'abc')[::-1] is a strange thing to have,
anyway, so I'm not bothered by it behaving different. I can accept
that it needs to be
New submission from Alexander Konovalenko:
Two pieces of the documentation for io.IOBase seem to contradict each other:
At http://docs.python.org/library/io.html#io.IOBase:
Note that calling any method (even inquiries) on a closed stream is undefined.
Implementations may raise IOError in this
Antoine Pitrou added the comment:
Since Linux has no problems whatsoever, I'm inclined to think that's
a FreeBSD issue.
Maybe. If you believe it's so, I guess the patch can be committed.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
I don't think this closure was appropriate. The idea was accepted twice and
argued against once, so it isn't dead (it's just resting).
--
assignee: barry -
nosy: +r.david.murray
resolution: wont fix -
status: closed - open
versions: +Python 3.4
Antoine Pitrou added the comment:
1) IOError and ValueError are not subclasses one of another. So what
should we expect an IOBase implementation to raise?
Ideally, ValueError should be raised, but I suspect some methods raise IOError
instead.
Undefined behavior means literally anything can
Antoine Pitrou added the comment:
Actually, I would suggest we standardize the docs on raising ValueError as the
official behaviour, and fix non-compliant behaviours as bugs.
--
___
Python tracker rep...@bugs.python.org
New submission from Antoine Pitrou:
f = io.StringIO()
f.close()
f.readable()
True
f.read()
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: I/O operation on closed file.
f = io.BytesIO()
f.close()
f.readable()
True
f.read()
Traceback (most recent call
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, hynek, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15841
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, hynek, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
New submission from Antoine Pitrou:
import socket
s = socket.socket()
f = s.makefile(rb, buffering=0)
f
socket.SocketIO object at 0x7f2f323cd790
f.close()
f.writable()
False
f.readable()
False
--
components: IO, Library (Lib)
messages: 169666
nosy: benjamin.peterson, hynek,
Antoine Pitrou added the comment:
Related: issue15841 and issue15842.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
hgrepos: +148
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2771
___
___
Python-bugs-list
R. David Murray added the comment:
I've modified your patch slightly (cosmetic only).
When I run it on default I get the following:
/home/rdmurray/python/p33/Lib/os.py:263: BytesWarning: Comparison between bytes
and string
if tail == curdir: # xxx/newdir/. exists if xxx/newdir
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file27089/b17f9a10235f.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2771
___
R. David Murray added the comment:
Added some review comments on issue-15510-4.patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15510
___
Stefan Krah added the comment:
The extreme slowness with a low switch interval is already present in
3430d7329a3b, so it's not related to the finer-grained import lock.
The other FreeBSD 9.0 bots don't seem to have that problem, so I'm not
sure any more if the patch is a good idea.
FWIW,
Changes by Chris Rebert pyb...@rebertia.com:
Added file: http://bugs.python.org/file27090/json.rst.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
Chris Rebert added the comment:
Attached updated patches.
--
Added file: http://bugs.python.org/file27091/json_init.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14570
___
Arfrever Frehtes Taifersar Arahesis added the comment:
- done
+ done; \
Not needed.
+ touch $(DESTDIR)$(LIBDEST)/lib2to3/*Grammar*.pickle || true
- prefix can be used to ignore failure of command:
+ -touch $(DESTDIR)$(LIBDEST)/lib2to3/*Grammar*.pickle
However maybe
New submission from Alastair Porter:
Passing a unicode filename to aifc.open() results in the argument being treated
like a filepointer instead of opening the file.
The argument check,
http://hg.python.org/cpython/file/default/Lib/aifc.py#l332
only checks if the argument is a str. Should this
Ned Deily added the comment:
I did it that way to ensure that the touch is executed after the copies. And
the touch needs to be optional because the creation of the pickles can
optionally fail.
--
___
Python tracker rep...@bugs.python.org
Alessandro Moura added the comment:
Im OK with the patch changes.
'''
/home/rdmurray/python/p33/Lib/os.py:263: BytesWarning: Comparison between bytes
and string
if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists
/home/rdmurray/python/p33/Lib/glob.py:63: BytesWarning:
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, hynek, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15744
___
Arfrever Frehtes Taifersar Arahesis added the comment:
And the touch needs to be optional because the creation of the pickles can
optionally fail.
If creation of pickles failed, then touch will create 1 file literally named
*Grammar*.pickle.
...
done; \
for i in
Ned Deily added the comment:
Right you are, thanks! I had that in an earlier version. Are you able to
verify the fix?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15822
___
Arfrever Frehtes Taifersar Arahesis added the comment:
libinstall target now contains:
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -c import lib2to3.pygram,
lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()
...
@for d in
Arfrever Frehtes Taifersar Arahesis added the comment:
I meant $$d == lib2to3 and $$a == $(srcdir)/Lib/lib2to3
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15645
___
New submission from Daniel Swanson:
I'm dealing with a bunch of nested folders and my imports have gone crazy. When
I try to test one of the lower level scripts that imports one of the higher
level one it gives me an error message. But, when I run the top one, (which
cascadingly imports just
Daniel Swanson added the comment:
correcting self.
And now I've got one trying to import something on the same level and it
says it doesn't exist!
Should have been:
And now I've got the top one importing one that's importing one on the same
level and saying it doesn't exist!
--
Nick Coghlan added the comment:
+1 for allowing bytes hashing. As Antoine noted, the 1D bytes variant of
memoryview() fills the role previously handled by buffer().
+1 for allowing 1D non-contiguous hashing. This is from a simplicity
perspective, as I don't want to have to explain to people
New submission from Alessandro Moura:
This is related to issue 15826.
When run with the -b option, some glob.py and os.py functions give warnings due
to byte-to-string conversions:
amoura@amoura-laptop:~/cpython$ ./python -b -c import glob;
glob.glob(b'cover*/glob.cover')
Benjamin Peterson added the comment:
Please provide a reproducable test case.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15844
___
Changes by Benjamin Peterson benja...@python.org:
--
versions: +Python 3.4 -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15839
___
___
Roundup Robot added the comment:
New changeset e2e4a0a49d2e by Benjamin Peterson in branch 'default':
Make super() internal errors RuntimeError instead of SystemError (closes #15839)
http://hg.python.org/cpython/rev/e2e4a0a49d2e
--
nosy: +python-dev
resolution: - fixed
stage: -
85 matches
Mail list logo