STINNER Victor added the comment:
I opened the issue #23605: Use the new os.scandir() function in os.walk().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
___
Steve Dower added the comment:
I didn't know about winerror_to_errno(), so that might help. But there are
other dependencies on _Py_fstat's error code throughout posixmodule.c, so I
don't think this is sufficient. (For example, patherror() is already switched
on OS to handle it correctly. I
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7
___
Martin Panter added the comment:
Okay I see your point about backwards compatibility now. Indeed, I have written
code myself before Python 3.3 that used to inspect err.args[0], and it would
suffer a similar problem if I had not updated it to use the new Python 3.3
exception subclasses.
Below
Antoine Pitrou added the comment:
Your interpretation of PyUnicode_Check() is correct. I don't know why your
program fails but I would suggest some kind of compiler bug or incompatibility.
You can find the definition of the unicode type in Objects/unicodeobject.c.
There you'll find that
Martin Panter added the comment:
It would make more sense and be more consistent if the str() and repr() used
one’s complement in all cases, i.e.:
self.assertEqual(str(Perm(~0)), ~0)
Also, the repr() seems to be doing a bad attempt at Python pseudo code. Instead
of
Perm.R|W: 3
maybe it
STINNER Victor added the comment:
test_os fails on Windows since the changeset 75aadb4450fd:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5798/steps/test/logs/stdio
==
FAIL: test_15261
STINNER Victor added the comment:
Oh oh, OpenIndiana doesn't support d_type: the dirent structure has no d_type
field and DT_xxx constants like DT_UNKNOWN are not defined.
gcc -Wsign-compare -g -O0 -Wall -Wstrict-prototypes
-I/usr/local/include/ncursesw -m64
Roundup Robot added the comment:
New changeset 60e5c34ec53a by Victor Stinner in branch 'default':
Issue #22524: Fix os.scandir() for platforms which don't have a d_type field in
https://hg.python.org/cpython/rev/60e5c34ec53a
--
___
Python tracker
Steve Dower added the comment:
This is because of the _Py_fstat change to use errno instead of GetLastError.
It seems other callers are relying on GetLastError to raise the correct
exception, and that seems to be the standard throughout posixmodule as far as
stat calls are concerned.
Best
STINNER Victor added the comment:
fstat_ebadf.patch: _Py_fstat() now also set errno on Windows.
It's a little bit different than your patch, because it still calls
SetLastError(ERROR_INVALID_HANDLE) to explicitly set the Windows error on bad
file descriptor. We must set errno et
STINNER Victor added the comment:
fstat_ebadf.patch: _Py_fstat() now also set errno on Windows.
It's a little bit different than your patch, because it still calls
SetLastError(ERROR_INVALID_HANDLE) to explicitly set the Windows error on bad
file descriptor. We must set errno et
Changes by STINNER Victor victor.stin...@gmail.com:
--
Removed message: http://bugs.python.org/msg237501
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23524
___
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file38383/fstat_ebadf.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23524
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
Removed message: http://bugs.python.org/msg237501
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23524
___
Changes by Martin Panter vadmium...@gmail.com:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23556
___
Ethan Furman added the comment:
The current patch is more along the lines of a proof-of-concept.
The final IntFlag type (if there is one) would be quite a bit more extensive
since part of the reason for its existence is to not lose type -- so pretty
much every __op__ would have to be
Martin Panter added the comment:
For the Python 3 case, the documentation is vague and probably wrong, depending
on what you understand “the current scope” to mean. I think it should read
something like
. . . raise re-raises the current exception that is being handled. If no
exception is
Martin Panter added the comment:
After understanding the Windows test failure in Issue 21619, I am starting to
believe that code relying on a BrokenPipeError or EPIPE is flawed. It is an
inherent unavoidable race condition with the receiving end of the pipe, as long
as another thread or
Roundup Robot added the comment:
New changeset d8e49a2795e7 by Steve Dower in branch 'default':
Issue #23524: Change back to using Windows errors for _Py_fstat instead of the
errno shim.
https://hg.python.org/cpython/rev/d8e49a2795e7
--
___
Python
Martin Panter added the comment:
A context manager here would seem a bit strange. Is there any precedent for
using context managers with feed parsers? The two others that come to mind are
ElementTree.XMLParser and email.parser.FeedParser. These two build an object
while parsing, and close()
Ben Darnell added the comment:
I agree that SSLError should have used a different attribute, but it's too late
for that - changing it would break any code currently relying on SSL errnos (in
particular asynchronous code using the SSL_ERROR_WANT_{READ,WRITE} error codes
for normal operation).
Ben Hoyt added the comment:
Attaching a first cut at this -- basically the implementation I use for walk()
in scandir.py on GitHub.
One thing that's really weird to me: are the os.walk() unit tests actually
being run? In test_os.py, I notice everything's in WalkTest.setUp, which is
kinda
New submission from Steve Dower:
With the changes to the CRT on Windows, it no longer makes any sense to call
find_library(c) or (m) as there is no single C Runtime DLL. The new
structure has a grouped and layered approach that is better for versioning, so
we now link to
eryksun added the comment:
Shouldn't find_library(c) return ucrtbase.dll or ucrtbased.dll (debug)?
Introducing the Universal CRT
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
--
nosy: +eryksun
___
Python
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
title: ssl blocking IO errors - ssl blocking IO errors should inherit
BlockingIOError
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22252
STINNER Victor added the comment:
I commited scandir-8.patch with the documentation of scandir-5.patch. I wanted
os.scandir() to be part of Python 3.5 alpha 2.
Thanks for your patience Ben ;-)
We should now watch buildbots to check how they appreciate os.scandir().
New submission from STINNER Victor:
The PEP 471 announces a huge speed up of the os.walk() function, but os.walk()
was not modified yet. I just merged the implementation of os.scandir() (issue
#22524), it's now time to work on os.walk().
We need a patch and benchmarks on Linux and Windows.
Demian Brecht added the comment:
After sleeping on this, I think that the best route to go would be to drop the
trailer implementation (if it's not practical it doesn't belong in the standard
library).
Also, to better preserve backwards compatibility it may be better to circumvent
the
Martin Panter added the comment:
Sorry I take back my claim that the error codes were undocumented; see the
example code in https://docs.python.org/3.2/library/ssl.html#ssl-nonblocking.
Perhaps the most compatible way to fix this would be to change the SSL error
codes to something (custom
101 - 130 of 130 matches
Mail list logo