Ross Lagerwall rosslagerw...@gmail.com added the comment:
Thanks!
--
assignee: - rosslagerwall
nosy: +rosslagerwall
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Charles-François Natali neolo...@free.fr added the comment:
This is a hairy issue
Indeed.
Performing partial read/write may sound imperfect, but using buffered I/O
around non-blockind FD is definitely not a good idea.
Also, the advantage of the current approach is that at least, no data is
Changes by Florent Xicluna florent.xicl...@gmail.com:
Removed file: http://bugs.python.org/file23586/issue13254_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13254
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
keywords: -needs review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13254
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5f49b496d161 by Victor Stinner in branch 'default':
Issue #12342: Fix compilation on Mac OS X
http://hg.python.org/cpython/rev/5f49b496d161
--
___
Python tracker
New submission from Carl Friedrich Bolz cfb...@gmx.de:
The list.index method does not accept None as start and stop, which makes the
error message quite confusing:
[1, 2, 3].index(2, None, None)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: slice indices must
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset f09e3b1603ee by Florent Xicluna in branch '2.7':
Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
http://hg.python.org/cpython/rev/f09e3b1603ee
New changeset 94017ce9304d by Florent Xicluna in
New submission from Ilya Novoselov ilya.novose...@gmail.com:
Documentation states that u format unit returns buffer of 16-bit Unicode
(UTF-16) data while it returns pointer to internal buffer of unicode data,
which is either UCS-16 or UCS-32
http://docs.python.org/c-api/arg.html
--
Antoine Pitrou pit...@free.fr added the comment:
Also, the advantage of the current approach is that at least, no data
is ever lost
But what about the buggy readline() behaviour?
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Note that Java's BufferedInputStream and ReadableByteChannel also
return partial reads.
Apparently, they are specified to, even for blocking streams (which I find a
bit weird, and the language in the docs seems deliberately vague). Python's
New submission from stefanholek ste...@epy.co.at:
The input builtin always uses strict error handling for Unicode conversions.
This means that when I enter a latin-1 string in a utf-8 environment, input
breaks with a UnicodeDecodeError. Now don't tell me not to do that, I have a
valid
Lucas Sinclair blastoc...@mac.com added the comment:
I'm on 10.7.2, with XCode is 4.2 and the problem is still present. The command
ggc -v produces the following output:
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
The command ./configure --with-pydebug make -j2
Benjamin Peterson benja...@python.org added the comment:
There's no reason you couldn't write your own input() function in Python to do
this.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
stefanholek ste...@epy.co.at added the comment:
I am not quite sure how I would write a custom, readline-using input function
in Python (access to PyOS_Readline seems required), that's why I did it in C.
Have an example?
--
___
Python tracker
sbt shibt...@gmail.com added the comment:
No one has suggested raising BlockingIOError and DISCARDING the data when a
partial read has occurred. The docs seem to imply that the partially read data
should be returned since they only say that BlockingIOError should be raised if
there is
Antoine Pitrou pit...@free.fr added the comment:
There cannot be a reason input() should be confined to strict, or can
there? ;-)
Actually, there's a good reason: in the non-interactive case, input() simply
calls sys.stdin.read(), which doesn't have encoding or errors attributes. You
want
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
___
___
sbt shibt...@gmail.com added the comment:
But what about the buggy readline() behaviour?
Just tell people that if the return value is a string which does not end in
'\n' then it might caused by EOF or EAGAIN. They can just call readline()
again to check which.
--
sbt shibt...@gmail.com added the comment:
The third arg of BlockingIOError is used in two quite different ways.
In write(s) it indicates the number of bytes of s which have been consumed
(ie written to the raw file or buffered).
But in flush() and flush_unlocked() (in _pyio) it indicates the
Charles-François Natali neolo...@free.fr added the comment:
Apparently, they are specified to, even for blocking streams (which
I find a bit weird, and the language in the docs seems deliberately
vague).
As an additional convenience, it attempts to read as many bytes as possible by
Ned Deily n...@acm.org added the comment:
Lucas, exactly what source version of Python are you trying to build (i.e what
does hg summary say)?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13241
Éric Araujo mer...@netwok.org added the comment:
Our policy is to not commit code cleanup patches that are not strict bug fixes;
see thread at
http://mail.python.org/pipermail/python-dev/2011-October/114281.html and
http://mail.python.org/pipermail/python-dev/2011-November/114301.html
Xavier de Gaye xdeg...@gmail.com added the comment:
Attached yet another patch.
This patch does not use a while loop in handle_close() and handles
POLLHUP as suggested by Charles-François. No changes have been made to
both tests (test_half_duplex_close).
--
Added file:
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 33680de042e7 by Éric Araujo in branch '2.7':
Revert commit that was not a bugfix (#5301).
http://hg.python.org/cpython/rev/33680de042e7
--
___
Python tracker
Lucas Sinclair blastoc...@mac.com added the comment:
I just cloned cpython today. The output of hg summary is:
parent: 73351:2bec7c452b39 tip
Fix C89 incompatibility.
branch: default
commit: (clean)
update: (current)
--
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
With the raise of virtualenv and its inclusion in CPython for 3.3, this is even
less a concern, even for UNIX. I’m withdrawing the idea and will continue to
advertise --user and warn against sudo in documentation and other venues.
--
Antoine Pitrou pit...@free.fr added the comment:
Here is a patch. The bugfix itself is quite pedestrian, but the test is more
interesting. I did what I could to fork a subprocess into a pseudoterminal so
as to trigger the GNU readline code path. The only limitation I've found is
that I'm
Rob Bairos rbai...@gmail.com added the comment:
Yah, thinking about this further, the real error is that sys.meta_path allows
processing of names with #,?* etc.
I can see why this would cause problems, as python names must only be _ and
alphanumeric characters.
I'll re-implement this.
Charles-François Natali neolo...@free.fr added the comment:
Since this patch may break existing valid code, I think it should be
closed as invalid.
Yes. Since the benefit is not clear and it may break existing code, it's
probably wiser.
--
resolution: - rejected
stage: patch review
sbt shibt...@gmail.com added the comment:
Currently a BlockingIOError exception raised by flush() sets
characters_written to the number of bytes fushed from the internal
buffer. This is undocument (although there is a unit test which tests
for it) and causes confusion because characters_written
STINNER Victor victor.stin...@haypocalc.com added the comment:
Can you write a patch?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13341
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
test_urllib2.test___all__() is failing on Windows. Example:
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/5498/steps/test/logs/stdio
==
New submission from Joshua Landau joshua.landau...@gmail.com:
When setting defaults to keyword-only arguments in lambdas which are inside
non-global scopes, cPython doesn't push the name to it's closure's co_freevars.
EXAMPLE:
global_variable = None
(lambda: (lambda *,
Antoine Pitrou pit...@free.fr added the comment:
But what about the buggy readline() behaviour?
Just tell people that if the return value is a string which does not
end in '\n' then it might caused by EOF or EAGAIN. They can just call
readline() again to check which.
Sounds
Charles-François Natali neolo...@free.fr added the comment:
But then what's the point of using buffered I/O at all? If it can't
offer anything more than raw I/O, I'd rather do something like raise
a RuntimeError(buffered I/O doesn't work with non-blocking streams)
when the raw stream returns
Charles-François Natali neolo...@free.fr added the comment:
The bugfix itself is quite pedestrian, but the test is more interesting.
Indeed. Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
Changes by Mark Dickinson dicki...@gmail.com:
--
priority: normal - critical
stage: - needs patch
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 931ae170e51c by Petri Lehtinen in branch '3.2':
Issue #3067: Fix the error raised by locale.setlocale()
http://hg.python.org/cpython/rev/931ae170e51c
New changeset d90d88380aca by Petri Lehtinen in branch 'default':
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Here is a patch, with a minimal test.
--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file23611/issue13343.patch
___
Python tracker rep...@bugs.python.org
Petri Lehtinen pe...@digip.org added the comment:
Terry: Do you still think there's need for a doc update?
--
resolution: - fixed
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3067
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
same patch, without tabs.
--
Added file: http://bugs.python.org/file23612/issue13343.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
Changes by Amaury Forgeot d'Arc amaur...@gmail.com:
Removed file: http://bugs.python.org/file23611/issue13343.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
___
Changes by Petri Lehtinen pe...@digip.org:
--
resolution: - wont fix
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13321
___
Petri Lehtinen pe...@digip.org added the comment:
Closing as wontfix.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13321
___
___
stefanholek ste...@epy.co.at added the comment:
Thank you Antoine, this looks good.
However when I try your example I get
sys.stdin = io.TextIOWrapper(
sys.stdin.detach(), 'ascii', 'replace')
ValueError: underlying buffer has been detached
/helpforum
--
Antoine Pitrou pit...@free.fr added the comment:
However when I try your example I get
sys.stdin = io.TextIOWrapper(
sys.stdin.detach(), 'ascii', 'replace')
ValueError: underlying buffer has been detached
Which version of Python (and which OS?). It works fine here on latest
3.2 and
Mark Dickinson dicki...@gmail.com added the comment:
Patch looks good to me.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
___
Stefan Holek ste...@epy.co.at added the comment:
This is with Python 3.2.2 on Mac OS X 10.6 (SL). I have built Python from
source with: ./configure; make; make install.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
New submission from Antoine Pitrou pit...@free.fr:
This decrepancy between 2.x and 3.x is witnessed under Windows:
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on
win32
Type help, copyright, credits or license for more information.
import socket
sock =
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset ca78ed7393bf by Florent Xicluna in branch 'default':
Fix test_urllib2 error on Windows in relation with issue #13287.
http://hg.python.org/cpython/rev/ca78ed7393bf
--
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13287
___
___
Antoine Pitrou pit...@free.fr added the comment:
discrepancy, not decrepancy :S
(10038 is WSAENOTSOCK, by the way)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13344
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think this thread is becoming a little messy and since asyncore/asynchat are
in a situation where even the slightest change can break existent code I
recommend to be really careful.
I see 3 different issues here:
1 -
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13344
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 1e0e821d2626 by Amaury Forgeot d'Arc in branch '3.2':
Issue #13343: Fix a SystemError when a lambda expression uses a global
http://hg.python.org/cpython/rev/1e0e821d2626
New changeset bddb455439d0 by Amaury Forgeot
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
It was a bug in Python compiler, thanks for the report!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
Stefan Holek ste...@epy.co.at added the comment:
Python 3.2.2 (default, Nov 4 2011, 22:28:55)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
import sys, io
w = io.TextIOWrapper(sys.stdin.detach(), 'ascii', 'replace')
Joshua Landau joshua.landau...@gmail.com added the comment:
Glad to help :)
It's made my day. I get to boast at school now!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13343
___
Stefan Holek ste...@epy.co.at added the comment:
Oops, the last one wasn't meant for the bug tracker. blush
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
___
sbt shibt...@gmail.com added the comment:
Another possibility would be that, since lines are usually reasonably
sized, they should fit in the buffer (which is 8KB by default). So we
could do the extra effort of buffering the data and return it once the
line is complete: if the buffer fills
Stefan Holek ste...@epy.co.at added the comment:
I can make it work at the interpreter prompt with your patch applied. Sorry for
cluttering up the ticket. ;-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13342
Antoine Pitrou pit...@free.fr added the comment:
I can make it work at the interpreter prompt with your patch applied.
Sorry for cluttering up the ticket. ;-)
That's ok, thanks a lot for testing.
--
___
Python tracker rep...@bugs.python.org
Terry J. Reedy tjre...@udel.edu added the comment:
New features only go in future versions: Given the doc: With a module, class
or class instance object as argument (or anything else that has a __dict__
attribute), return that attribute. So you are proposing a change in the
definition of
New submission from Jon Bryan jrbr...@sandia.gov:
Running 32-bit Python in 64-bit Windows 7 Enterprise. I am very much a Python
noob.
A .dll in c:\Windows\System32 that I need to access can't be found by
ctypes.WinDLL(). Upon further investigation I have found that the file, along
with
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13298
___
___
Python-bugs-list
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13300
___
___
Python-bugs-list
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13306
___
___
Python-bugs-list
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Does the file exist at all? Does it have some specific properties? a Hidden
flag?
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13345
Terry J. Reedy tjre...@udel.edu added the comment:
The conflict is not fatal for keyboard users because repeating alt-o switches
between Format and Options. To resolve the conflict, I would prefer to keep
alt-o for Options, both because it is the first letter of Options and because
Options
Ilya Novoselov ilya.novose...@gmail.com added the comment:
No, I don't feel like I'm up to standard yet.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13341
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +rhettinger, terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Terry J. Reedy tjre...@udel.edu added the comment:
2.5 in no longer maintained. 2.6 only gets security patches.
So please test with the latest 2.7 (currently 2.7.2).
If you cannot do that, please close.
--
nosy: +terry.reedy
versions: -Python 2.6
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13337
___
João Bernardo jbv...@gmail.com added the comment:
Oh, sorry for the full file. Yes, I only changed after
d = PyObject_GetAttrString(v, __dict__);
if (d == NULL) {
I was searching for uses of slots other than __slots__ = (a, b) and I saw a guy
saying that dicts may have
Charles-François Natali neolo...@free.fr added the comment:
There's a race:
--- Lib/shutil.py 2011-11-05 00:11:05.745221315 +0100
+++ Lib/shutil.py.new 2011-11-05 00:11:01.445220324 +0100
@@ -307,6 +307,7 @@
try:
mode = os.fstatat(dirfd, name,
Antoine Pitrou pit...@free.fr added the comment:
Finally, since writting a such code is tricky, what do you - all -
think of making this a generic walker method that would take as
argument the methods to call on a directory and on a file (or link),
so that we could reuse it to write
Terry J. Reedy tjre...@udel.edu added the comment:
Yes. I think in locale.rst (assuming that is the name)
'''
exception locale.Error
Exception raised when setlocale() fails.
locale.setlocale(category, locale=None)
If *locale* is specified, it may be a string, a tuple of the form (language
sbt shibt...@gmail.com added the comment:
The attached patch makes BufferedWrite.write() raise BlockingIOError when the
raw file is non-blocking and the write would block.
--
keywords: +patch
Added file: http://bugs.python.org/file23613/write_blockingioerror.patch
Roger Serwy roger.se...@gmail.com added the comment:
Which platform are you running?
On Linux (Ubuntu 11.10, Python 3.2, Tk 8.5), Alt-o does not toggle between
Format and Options. The first Alt-o selects Format and the second Alt-o
selects Comment Out Region.
Changing Format's accelerator
Terry J. Reedy tjre...@udel.edu added the comment:
PyUnicode_Check may still be correct. I have not examined PEP393 in detail.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13290
___
Terry J. Reedy tjre...@udel.edu added the comment:
Py 3.2 on Win 7. 'Comment out region' is Alt-3 here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13319
___
Roger Serwy roger.se...@gmail.com added the comment:
Alt-3 is comment-out region on Linux as well. The problem is that o is an
accelerator for Comment Out Region under the Format menu. Pressing Alt-o and
o under Linux is equivalent to Alt-o and Alt-o.
This toggling between Format and Options
New submission from Alan Grow alangrow+pythonb...@gmail.com:
If you split a string in a maximum of zero places, you should get the original
string back. .split(s,0) behaves this way. But re.split(r,s,0) performs an
unlimited number of splits in this case.
To get an unlimited number of splits,
Ezio Melotti ezio.melo...@gmail.com added the comment:
This is a known issue, but I don't think it can be fixed without breaking
backward compatibility. The behavior with negative values is not explicitly
documented, so I would consider it an implementation detail. The behavior with
positive
Changes by Mike Hoy mho...@gmail.com:
--
nosy: +mikehoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13341
___
___
Python-bugs-list mailing list
Steve Holden st...@holdenweb.com added the comment:
ValueError: (11, 'Resource temporarily unavailable') looks to me like a Cygwin
error relating to Windows' DLLs and the difficulty of mapping them to unique
memory locations. I very much doubt it's a real issue with Python, so closing
the
86 matches
Mail list logo