STINNER Victor added the comment:
bench_scandir.py: dummy benchmark to compare listdir+stat vs scandir+is_dir.
os.scandir() is always slower than os.listdir() on tmpfs and ext4 partitions of
a local hard driver.
I will try with NFS.
Results with scandir-5.patch on Fedora 21 (Linux).
---
Antoine Pitrou added the comment:
Yes, this is a bug indeed. A patch would be welcome ;-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23146
___
eryksun added the comment:
Given super(cls, obj), cls needs to be somewhere in type(obj).__mro__. Thus the
implementation checks PyType_IsSubtype instead of the more generic
PyObject_IsSubclass.
In this case int's MRO is unrelated to numbers.Number:
print(*int.__mro__, sep='\n')
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9698
___
___
New submission from Andrew Dalke:
The file iterator is deemed broken. As I don't think it should be made
non-broken, I suggest the documentation should be changed to point out when
file iteration is broken. I also think the term 'broken' is a label with
needlessly harsh connotations and
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23455
___
___
Python-bugs-list
Changes by Berker Peksag berker.pek...@gmail.com:
Added file: http://bugs.python.org/file38115/issue21717_tarfile_v5.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21717
___
STINNER Victor added the comment:
The 64-bit support of Windows is still incomplete :-/ We tried to fix most of
them, but there are still remaining issues.
The main issue is #9566. I opened for example the issue #18295: Possible
integer overflow in PyCode_New().
--
Mark Lawrence added the comment:
Could someone review the patch please, it doesn't appear to contain anything
that's contentious.
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
Mark Lawrence added the comment:
@Serhiy/Victor I believe that you're both interested in this type of problem.
--
nosy: +BreamoreBoy, haypo, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20947
STINNER Victor added the comment:
When we completely switch Windows builds over to VC14, we're going to
encounter some new assert dialogs from the CRT. (...) A number of tests attempt
operations on bad file descriptors, which will assert and terminate in MSVCRT
(I have a fix for the
New submission from Carl Chenet:
I'm trying to use a tar stream to a Python tarfile object but each time I do
have a TypeError: can't concat bytes to str error
Here is my test:
-8-
#!/usr/bin/python3.4
import tarfile
import sys
tarobj = tarfile.open(mode='r|', fileobj=sys.stdin)
Serhiy Storchaka added the comment:
In _testbuffer.c: ndim = 64, so the changes aren't really necessary.
Indeed, I'll remove these changes.
The reason is of course that even an array with only 2 elements per
dimension gets quite large with ndim=64. :)
But an array can be with 1 element per
Mark Lawrence added the comment:
Sorry folks I can't try this myself as I'm not running 2.7 and I don't know how
to create the test.msi file.
--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware
___
Python tracker rep...@bugs.python.org
Martin Panter added the comment:
Using fileobj=sys.stdin.buffer instead should do the trick. The “tarfile”
module would expect a binary stream, not a text stream.
Given the documentation currently says, “Use this variant in combination with
e.g. sys.stdin, . . .”, I presume that is why you
STINNER Victor added the comment:
signal_cast_socket_t.patch: Fix warning in signal.set_wakeup_fd(). I introduced
recently the warning when I added support for sockets in this function on
Windows.
--
Added file: http://bugs.python.org/file38109/signal_cast_socket_t.patch
Martin Panter added the comment:
Posting patch v2:
* Changed readinto() argument descriptions to “a pre-allocated, writable
bytes-like buffer”, for both RawIOBase and BufferedIOBase
* Integrated the single-use test_memoryio.BytesIOMixin test class, which
tricked me when I did the first patch
Mark Lawrence added the comment:
Having read
https://docs.python.org/3/using/windows.html#customizing-default-python-versions
I'm not convinced that this is needed, as the first sentence of the fifth
paragraph states On 64-bit Windows with both 32-bit and 64-bit implementations
of the same
STINNER Victor added the comment:
scandir-3.patch: New implementation based on scandir-2.patch on Ben's github
repository.
Main changes with scandir-2.patch:
* new DirEntry.inode() method
* os.scandir() doesn't support bytes on Windows anymore: it's deprecated since
python 3.3 and using
Mark Lawrence added the comment:
We have a patch to review or we need a doc patch, unless someone has a
different idea to the approaches suggested by the originator. I prefer the
idea of changing the code, manually changing environment variables just seems
wrong to me, but I won't lose any
Berker Peksag added the comment:
I found another regression: In Python 3.4, 416 is
REQUESTED_RANGE_NOT_SATISFIABLE, but REQUEST_RANGE_NOT_SATISFIABLE in 3.5.
--
nosy: +berker.peksag
stage: - patch review
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Please ignore changes to Objects/codeobject.c, Objects/funcobject.c and
Python/ceval.c. The patch in issue18295 is more advanced.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23450
Serhiy Storchaka added the comment:
Here is a patch. It also fixes tests which didn't test altsep.
--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file38117/pathlib_parse_parts_altsep.patch
___
Python tracker
Martin Panter added the comment:
Thanks. Confirming the patch fixes the problem for me, so should be comitted. I
wonder if a test case would be good too though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23442
STINNER Victor added the comment:
Similar benchmark result on my laptop which has a SSD (ext4 filesystem tool,
but I guess that the directory is small and fits into the memory).
Note: I'm not sure that the between ...x and ...x faster are revelant, I'm
not sure that my computation is correct.
Demian Brecht added the comment:
Thanks for the test Berker, I'll put a patch together with the changes
later this afternoon.
On 2015-02-12 2:27 PM, Berker Peksag wrote:
Berker Peksag added the comment:
Here is a test case.
Berker Peksag added the comment:
Here is a test case.
==
FAIL: test_client_constants (test.test_httplib.OfflineTest)
(constant='REQUESTED_RANGE_NOT_SATISFIABLE')
Martin Panter added the comment:
I don’t have a strong opinion about changing __all__ in these cases. I only
noticed the potential problem when I went to add a new class to the module, and
thought this was common practice. If we leave it as it is, it would be good to
add comment in the source
STINNER Victor added the comment:
Benchmark on NFS. Client: my laptop, connected to the LAN by wifi. Server:
desktop, connected to the LAN by PLC. For an unknown reason, the creation of
files, symlinks and directories is very slow (more than 30 seconds while I
reduced the number of files
Serhiy Storchaka added the comment:
Many of these overflows can be provoked by specially constructed function, code
object or bytecode.
Also I think following examples crash or return wrong result on 64 bit platform:
def f(*args, **kwargs): return len(args), len(kwargs)
f(*([0]*(2**32+1)))
New submission from STINNER Victor:
coroutine_decorator.patch adds missing @coroutine decorator to coroutine
functions and methods in the asyncio module.
I'm not sure that it's ok to add @coroutine to __iter__() methods. At least,
test_asyncio pass.
--
components: asyncio
files:
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22147
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12455
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17908
___
___
Changes by Brian Curtin br...@python.org:
--
nosy: -brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19433
___
___
Python-bugs-list
STINNER Victor added the comment:
I enhanced bench_scandir2.py to have one command to create a directory or a
different command to run the benchmark.
All commands:
- create: create the directory for tests (you don't need this command, you can
also use an existing directory)
- bench: compare
Demian Brecht added the comment:
If we leave it as it is, it would be good to add comment in the source code
explaining this decision.
I think that __all__ should be left as-is for the time being. Adding
some comments around that decision makes sense to me to avoid any future
confusion around
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22197
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14044
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14414
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23043
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23004
___
___
STINNER Victor added the comment:
As Tulip and subprocdev, starting such project outside the Python stdlib may
help to get feedback, find and fix bugs faster. What do you think?
--
___
Python tracker rep...@bugs.python.org
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23448
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23166
___
___
Changes by STINNER Victor victor.stin...@gmail.com:
Added file: http://bugs.python.org/file38120/bench_scandir2.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
___
Demian Brecht added the comment:
I've attached a patch with fixes for both cases and the tests added by
Berker. Thanks guys.
--
Added file: http://bugs.python.org/file38122/issue23442_1.patch
___
Python tracker rep...@bugs.python.org
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22946
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21557
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8843
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14301
___
___
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17986
___
___
Python-bugs-list
Steven Barker added the comment:
This issue is a special case of the problem discussed in issue 992389, that
modules within packages are not added to the package dictionary until they are
fully loaded, which breaks circular imports in the form from package import
module.
The consensus on
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5053
___
___
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12849
___
___
Mark Lawrence added the comment:
Is there any more work needed on this or can it be closed? Please note the
reference to #17884 in msg201654.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19433
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: -demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9698
___
___
STINNER Victor added the comment:
Subprocess support of asyncio has nice features and is efficient:
- async read from stdout and stderr
- async write into stdin
- async wait for the process exit
- async communicate()
- timeout on any async operation
- support running multiple child processes in
STINNER Victor added the comment:
Since this is such a new feature (not even released in 3.x), I don't think we
should put it in 2.7.9.
While ssl.MemoryBIO would be very useful on Windows for Trollius (to support
SSL with the IOCP event loop), I also consider it as a new feature. It's a
Serhiy Storchaka added the comment:
Here is a patch which fixes many warnings reported by MS compiler on 64-bit
platform [1]. Some of these warnings indicated real bugs.
[1]
http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/411/steps/compile/logs/warnings%20(396)
New submission from Dwight:
Hi,
Looking for assistance in figuring out what caused the following
test failures and how to fix the problems.
Built and run on an IBM pSeries system running AIX 7.1.
Appreciate any help I can get.
I am not a software developer.
I am compiling this because
Robert Collins added the comment:
@Mahmoud thanks! I had a quick look and the structural approach we've taken is
a bit different. What do you think of the current patch here
(issue17911-4.patch) ?
--
___
Python tracker rep...@bugs.python.org
Ben Hoyt added the comment:
Hi Victor, I thank you for your efforts here, especially your addition of
DirEntry.inode() and your work on the tests.
However, I'm a bit frustrated that you just re-implemented the whole thing
without discussion: I've been behind scandir and written the first
Ben Hoyt added the comment:
To continue the actual which implementation discussion: as I mentioned last
week in http://bugs.python.org/msg235458, I think the benchmarks above show
pretty clearly we should use the all-C version.
For background: PEP 471 doesn't add any new functionality, and
Changes by Ned Deily n...@acm.org:
--
nosy: +David.Edelsohn
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23457
___
___
Python-bugs-list mailing
Tim Smith added the comment:
On Darwin, it would be nice if LINKFORMODULE used -undefined dynamic_lookup
instead of explicitly linking to a framework binary. Modules with explicit
links to a framework cause segfaults when they are imported from a different,
but compatible, framework
Demian Brecht added the comment:
Thanks for the clarification Martin. After giving this some further thought, I
think that the best way to go is to /only/ calculate and add the Content-Length
header if each element in the list or tuple is pre-encoded. If it's mixed or
only strings, then there
Nick Coghlan added the comment:
3.2 is in security-fix only mode, so nothing's going to change there.
For 3.3+, the per-module import lock design means the issue doesn't happen.
However, I wonder if there may be some now dead code relating to the global
import lock that could be deleted.
Martin Panter added the comment:
The length of an encoded Latin-1 string should equal the length of the
unencoded text string, since it is a one-to-one character-to-byte encoding. So
encoding should not actually be needed to determine the Latin-1 encoded length.
Though I’m not particularly
Ned Deily added the comment:
Since there has been no followup to this issue, I'm going to close it. Feel
free to reopen if you can document a reproducible problem with a Python source
release.
--
resolution: - works for me
stage: - resolved
status: open - closed
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23383
___
Steve Dower added the comment:
Wow, I didn't expect that so quickly :)
I'll check these out as soon as I can, but they look okay from a quick glance
on my phone.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23450
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +rhettinger
title: super behavioru and abstract base classes (either implementation or
documentation/error message is wrong) - super behaviour and abstract base
classes (either implementation or documentation/error message is
Zachary Ware added the comment:
The patch is way out of date, pgen.vcxproj needs to be updated to match the
rest of our projects.
If nobody else takes this over (and it is low priority for a reason!), I'll get
back to it eventually.
--
nosy: +steve.dower
Steve Dower added the comment:
It may be useful if you want an error rather than the 32-bit version, though
there are other ways to check that if it's critical and it probably is better
in the script.
Patches welcome :)
--
___
Python tracker
Mark Lawrence added the comment:
With #20079 closed but #20087 still open where do we stand with this issue?
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20088
New submission from Ulrich Dorsch:
TypeError: startswith first arg must be str or a tuple of str, not bytes
In line 558 of plistlib.py at the beginnging of def _is_fmt_xml(header) is
the problem, caused by the use of the byte arguments defined in line 555
(prefixes = (b'?xml', b'plist')).
Mark Lawrence added the comment:
I'm not certain exactly what is being asked for here so could the originator
please clarify their needs? I also don't really know who owns this hence the
changes to the nosy list.
--
components: +Windows
nosy: +BreamoreBoy, dstufft, steve.dower,
Pod added the comment:
Not the OP, but I find this message a bug because it's confusing from the
perspective of a user of the tokenize() function. If you give tokenize a
readlines() that returns a str, you get this error message that confusingly
states that something inside tokenize must be a
Steve Dower added the comment:
_Py_verifyfd has to go away, unfortunately. It requires inside knowledge of the
exact CRT version, and with VC14 the CRT will automatically upgrade so that
we're always using the latest.
I've gotten a function added to the CRT to make it unnecessary for release
Serhiy Storchaka added the comment:
Ping.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23146
___
___
Python-bugs-list mailing list
Mark Lawrence added the comment:
Have there been any recent reports of this test failing on these platforms?
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21874
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17306
___
___
Stefan Krah added the comment:
Yes, but these (degenerate) arrays tend to arise only as a result of slicing.
Last time I looked NumPy had MAX_NDIM=32, so we should be fine.
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
The patch LGTM. But native speaker should check documentation part.
--
title: Behavior of ZipFile with file-like object and BufferedWriter. -
Document that binary IO classes work with bytes-likes objects
___
Serhiy Storchaka added the comment:
signal_cast_socket_t.patch LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23450
___
___
Mark Lawrence added the comment:
Would you guys please review the patch as it's Double Dutch to me.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21107
___
Steve Dower added the comment:
Do you mean pip.exe? Does running 'python.exe -m pip install ...' work for you?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21568
___
eryksun added the comment:
For 3.5 this affects Windows as well, since the new CRT supports RFC1766
language codes, but only without a codepage spec:
Python 3.5.0a1 (v3.5.0a1:5d4b6a57d5fd, Feb 7 2015, 18:15:14)
[MSC v.1900 64 bit (AMD64)] on win32
Type help, copyright, credits or
Roundup Robot added the comment:
New changeset 9e10c4255277 by Victor Stinner in branch 'default':
Issue #23450: Fix signal.set_wakeup_fd() on Windows
https://hg.python.org/cpython/rev/9e10c4255277
--
nosy: +python-dev
___
Python tracker
STINNER Victor added the comment:
Updated patch. Thanks for the review Serhiy.
--
Added file: http://bugs.python.org/file38110/scandir-4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
Brett Cannon added the comment:
If you put a print call after your `from . import *` call you will notice it
never gets executed. Basically import is still in the middle of finishing
imports when that import * is reached, including setting the module attributes
on the package. Basically you
Brett Cannon added the comment:
I'm adding Nick to see if he has anything to add since he was the one that
worked on the change that Richard said caused the problem. But in my opinion
this is in the same realm as importing as a side-effect of spawning a thread;
don't do it.
--
nosy:
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file38110/scandir-4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
___
STINNER Victor added the comment:
(I regenerated scandir-4.patch, I had a local private changeset. I removed it.)
--
Added file: http://bugs.python.org/file38111/scandir-4.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
All correct. plistlib.load() requires binary file object as documented [1].
[1] https://docs.python.org/3/library/plistlib.html#plistlib.load
--
nosy: +ronaldoussoren, serhiy.storchaka
resolution: - not a bug
status: open - closed
STINNER Victor added the comment:
An environment variable is an easy way to make sure that all
subprocesses also have assert dialogs disabled. In release builds they
are always disabled, hence the _DEBUG check.
If _PyVerify_fd() must go, I would prefer to always disable CRT check.
Otherwise,
Antonio Cota added the comment:
I tried the following on python 3.5.0a1:
#init.py
__all__ = ['second', 'first']
print('i\'m starting the directory')
#first.py
print('hi, i\'m the first')
from . import second
#second.py
print('hi, i\'m the second')
from . import first
import a.first
i'm
Steve Dower added the comment:
In that case, this should be reported to the setuptools project, since they are
responsible for creating the pip.exe launcher when pip is installed.
--
___
Python tracker rep...@bugs.python.org
Steve Dower added the comment:
To be clearer (while still respecting the confidentiality agreement I'm under),
previously this code would (if _DEBUG) display an assertion dialog and
(regardless of _DEBUG) terminate the process:
close(fd); // succeeds, assuming a good fd
close(fd); //
1 - 100 of 107 matches
Mail list logo