Comments (9)
from cpython.
Looks good to me, and properly skips the large file test on my Linux box. A second iteration may be useful to provide separate options for different resources (cpu/disk/ram), but it's not clearly needed at this time.
Accepted as-is.
from cpython.
This was accepted ages agon -- what are you waiting for?
from cpython.
Fred, can you test this on a Linux with > 2Gb files (needs the --have-resources switch; read Trent's comment), or pass it on to someone who can? I can't do more than stare at this, and nothing in my staring hit my eye. Well, Guido may hate the long option name (--have-resources), especially given that even with all those letters <wink>, it's not really self-describing.
from cpython.
Fred, do something with this or assign it to some other Unix geek?
from cpython.
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims"). To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation. I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
from cpython.
This patch adds a test for largefiles (creating, seeking, telling, etc.).
The test skips if there is no largefile support.
There is one further problem. The test basically involves creating a file
greater than 2GB and playing with it. On UN*X systems with sparse files this
is no problem. On Win64 (which I have heard *can* do sparse files, but not in
Python yet), however, >2GB space and a *long* time is required to run the
test. I don't think it is reasonable to turn this on by default... so here is
what I did.
I extended regrtest.py to accept the --have-resources switch. This sets
test_support.use_large_resources, which is checked in test_largefile.py.
By default 'use_large_resources' is false. On Win64, then, by default the
largefile test is skipped but can be run via the --have-resources switch to
regrtest.py or by running the test directly. This seems to me the Right
Thing.
The affected files are:
Lib/test/regrtest.py
Lib/test/test_support.py
Lib/test/test_largefile.py (new)
Lib/test/output/test_largefile (new)
from cpython.
--have-at-least-2GB-on-hard-drive-and-am-going-for-coffee-<wink>
from cpython.
Sorry about the delay.
Had to make some small changes to get the old patch to apply.
from cpython.
Related Issues (20)
- isintance(boolean,int) is True HOT 2
- ctypes calls libffi with incorrect size/alignment values for some structs HOT 2
- Tier two memory and reference "leaks" HOT 4
- bug in count method HOT 2
- Allow repeatedly asking for termination of `QueueListener` HOT 1
- posixpath.commonpath: Check for empty iterables broken HOT 1
- ZoneInfo gives a surprising exception for `''` HOT 1
- Multiprocessing PipeConnection handles leak on failed subprocess spawn HOT 1
- argparse.FileType.__call__ ignores encoding and errors on '-'
- posixmodule uses PyOS_setsig to save & restore signal handlers HOT 1
- Documentation for date and datetime comparison is outdated
- Optimize `_PyObject_IS_GC` in free-threaded build
- WASI build fails on both SDK 20 and 21 (Mac OS) HOT 4
- Fix unintended behavior change in elementtree introduced in #114269 HOT 1
- `test_runpy.test_main_recursion_error()` exhausts the stack under WASI debug build
- Python documentation search results not working
- test_pendingcalls_threaded times out on Windows free-threading builds HOT 5
- Call C++ function using ctypes py_object argument on windows doesn't work HOT 4
- GIL section of the FAQ is outdated (or shortly to be outdated) HOT 1
- Accessing attributes of a lazily-loaded module is not thread-safe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.