Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
ddeacbb
Take the package's name in cache_remedy, so a package built on numbox…
nelson2005 Oct 4, 2026
102bd8b
Say that a package built on numbox asks check_cache_location with a b…
nelson2005 Oct 4, 2026
aaade19
Size the path-limit test's cache directory by numba's own location un…
nelson2005 Oct 4, 2026
0ccf016
Tell a location too long for the file system what shortens the one it…
nelson2005 Oct 5, 2026
f2f7d47
Say in the utils docs that the package's location under NUMBA_CACHE_D…
nelson2005 Oct 5, 2026
5a3d874
Size the anchor test's NUMBA_CACHE_DIR by numba's own location for th…
nelson2005 Oct 5, 2026
dcfe8da
Say in uncached_where_no_cache_can_be_written's docstring that a loca…
nelson2005 Oct 5, 2026
91825c4
Tell numba's three locations apart by the whole path numba builds for…
nelson2005 Oct 5, 2026
aaa3e06
Say in the utils docs that a NUMBA_CACHE_DIR within about 230 bytes o…
nelson2005 Oct 5, 2026
bedf595
Tell a NUMBA_CACHE_DIR too long to be shorter, without "or none": wit…
nelson2005 Oct 5, 2026
36b3035
Name NUMBA_CACHE_DIR where numba passed it over for a location too lo…
nelson2005 Oct 5, 2026
f0faca9
Fit the remedy for a location too long to the platform and to numba's…
nelson2005 Oct 5, 2026
1839955
Tell a source on disk with no locator what numba would take: a set NU…
nelson2005 Oct 5, 2026
ba25454
Offer NUMBA_CACHE_DIR where numba tries it before the locator that to…
nelson2005 Oct 6, 2026
d825181
Match the location the error names against numba's locations in the o…
nelson2005 Oct 6, 2026
93b4523
Tell a location numba took where no file can be written, a full disk …
nelson2005 Oct 6, 2026
6f73698
Take numba's locator classes as numba resolves them, in its order, an…
nelson2005 Oct 6, 2026
73734ba
Resolve a dotted NUMBA_CACHE_LOCATOR_CLASSES entry with the underscor…
nelson2005 Oct 6, 2026
5c20156
Answer the .zip locator's error for a path with .zip in it and no par…
nelson2005 Oct 6, 2026
7f902fe
Name a set NUMBA_CACHE_DIR without the claim that numba passed it ove…
nelson2005 Oct 6, 2026
1e39fc6
Say of numba's .zip locator what it does: it takes any path with .zip…
nelson2005 Oct 6, 2026
847d9f2
Merge remote-tracking branch 'origin/main' into feat/cache-remedy-pac…
nelson2005 Oct 6, 2026
bdbe0b5
Ask for the user-provided locator with NUMBA_CACHE_DIR set where the …
nelson2005 Oct 7, 2026
5ae768d
Tell an error too long for the file system that names no file the loc…
nelson2005 Oct 7, 2026
0bc0a1d
Name a location that is none of numba's as the error names it where n…
nelson2005 Oct 7, 2026
4cc1869
Tell a source in a .zip under a NUMBA_CACHE_LOCATOR_CLASSES that leav…
nelson2005 Oct 7, 2026
b82236d
Tell a frozen application under a NUMBA_CACHE_LOCATOR_CLASSES that le…
nelson2005 Oct 7, 2026
5ffa2e8
Name each location once where an error too long for the file system n…
nelson2005 Oct 7, 2026
bc36287
Answer a FileNotFoundError that names no file, for a source not on di…
nelson2005 Oct 7, 2026
316d6d9
Take each of numba's locator classes for its family, a subclass liste…
nelson2005 Oct 7, 2026
35f5ef5
Take an empty filename on an error too long for the file system for n…
nelson2005 Oct 7, 2026
a532369
Tell an error that names no file and refuses one for a reason other t…
nelson2005 Oct 7, 2026
eb0cd22
Take the source's path as any path-like, as check_cache_location does…
nelson2005 Oct 7, 2026
afccb4b
Give an error's own message as the reason where it has no strerror: a…
nelson2005 Oct 7, 2026
ebacb18
Hold, for a location too long that is none of numba's, that NUMBA_CAC…
nelson2005 Oct 7, 2026
e3c571f
Know numba's IPython locator's location, numba_cache under IPython's …
nelson2005 Oct 7, 2026
5f80dae
Take a bytes path in cache_remedy as check_cache_location does: os.fs…
nelson2005 Oct 7, 2026
f4b065e
Tell an OSError a caller passes on under a locator list with no locat…
nelson2005 Oct 7, 2026
f050f3e
Offer the archive remedy's two ways, the source files on disk or a .z…
nelson2005 Oct 7, 2026
933cf91
Cover the IPython.utils.path import the IPython location falls back t…
nelson2005 Oct 7, 2026
dbb08e1
Say what numba does where IPython is not importable and its IPython l…
nelson2005 Oct 7, 2026
ee1db78
Ask for NUMBA_CACHE_DIR with the archive remedy's install on disk whe…
nelson2005 Oct 7, 2026
cdf46a2
Cover the path an error names made absolute before it is matched agai…
nelson2005 Oct 7, 2026
bad97e5
Cover the in-tree and the user-wide locator each counting as the one …
nelson2005 Oct 7, 2026
c5097af
Cover the frozen-application remedy, which asks for the user-wide loc…
nelson2005 Oct 7, 2026
f0983b3
Tell a .zip's error that names a file numba writes in its location, a…
nelson2005 Oct 7, 2026
cd48c6a
Read the file an error names as str, for a name carried as bytes, fro…
nelson2005 Oct 7, 2026
928361f
Give the probe check_cache_location compiles its source under the fil…
nelson2005 Oct 7, 2026
9b4ebf5
Hold an OSError a caller passes on to a listed locator with a place f…
nelson2005 Oct 7, 2026
54da79e
Give the reason with a .zip's location that refuses a file for one ot…
nelson2005 Oct 7, 2026
ffa2bd8
Tell an error naming numba_cache under IPython's cache directory, or …
nelson2005 Oct 7, 2026
4b6f8e0
Give the probe's source to linecache for a file not on disk alone, un…
nelson2005 Oct 7, 2026
f41a324
Name the one location numba could have taken for an error that names …
nelson2005 Oct 7, 2026
93b7926
Ask IPython for its cache directory only where numba's IPython locato…
nelson2005 Oct 8, 2026
234fa96
Answer an error for a source not on disk for the locator numba reache…
nelson2005 Oct 8, 2026
e2f8d4c
Give the probe's source to the linecache only for a file not on disk …
nelson2005 Oct 8, 2026
2a22692
Test that the check puts back the lines the linecache held for a file…
nelson2005 Oct 8, 2026
3876b31
Test the reason an error with no strerror is told in every remedy tha…
nelson2005 Oct 8, 2026
8f532ed
Hold the .zip location tests to numba 0.61 and later, where numba's .…
nelson2005 Oct 8, 2026
81a174b
Match an error's path against the locations of the locators numba rea…
nelson2005 Oct 8, 2026
ed9a694
Say that a path object has no empty name: pathlib reads an empty stri…
nelson2005 Oct 8, 2026
1a8b473
Leave a NUMBA_CACHE_LOCATOR_CLASSES entry that names no class to numb…
nelson2005 Oct 8, 2026
a7ce606
Resolve a dotted locator entry with the underscore numba put before i…
nelson2005 Oct 8, 2026
6098a11
Try the underscore numba put before its locators' names under numba 0…
nelson2005 Oct 8, 2026
c44fba9
Leave a locator entry with an empty module path out, as the remedy le…
nelson2005 Oct 8, 2026
f17a47f
Say which errors name no file: a caller's, numba's first save's where…
nelson2005 Oct 8, 2026
234dabb
Say in the docstring and the docs which errors name no file and what …
nelson2005 Oct 8, 2026
d89adca
Reword the docstring and the docs on an error that names no file: the…
nelson2005 Oct 8, 2026
5fc1d67
Pass over an OSError from IPython for its cache directory as numba's …
nelson2005 Oct 8, 2026
391db66
Tell the list for an error about a source not on disk under a list wi…
nelson2005 Oct 8, 2026
d8dd04c
Tell an error that names no file for a source not on disk the locatio…
nelson2005 Oct 8, 2026
490bd0c
Say nothing of where numba caches the file for a location that is non…
nelson2005 Oct 8, 2026
bf1f076
Hold the remedy to numba's user-wide locator taking a frozen applicat…
nelson2005 Oct 8, 2026
376204a
Hold the check and the remedy to a cell numba's IPython locator takes…
nelson2005 Oct 8, 2026
aaa14b5
Tell a frozen application's no-locator error the user's cache directo…
nelson2005 Oct 8, 2026
4104e6b
Answer the .zip locator's error for a frozen application's path with …
nelson2005 Oct 8, 2026
00dc46f
Say in the check's docstring that inspect's OSError names no file: fo…
nelson2005 Oct 8, 2026
c84623a
Hold the remedy to finding a .zip by a part of the path that ends in …
nelson2005 Oct 8, 2026
34bba7e
Drop "as for a source on disk" from the sentence on a frozen applicat…
nelson2005 Oct 8, 2026
7e1e502
Leave a locator entry with a relative module path out, as the remedy …
nelson2005 Oct 8, 2026
50a3aab
Leave a listed class with no from_function out, as the remedy leaves …
nelson2005 Oct 8, 2026
800b3c6
Say nothing of the user's cache directory as where numba caches a mem…
nelson2005 Oct 8, 2026
c237684
Hold the docstring's promise for an error naming IPython's location, …
nelson2005 Oct 8, 2026
3d6bf6a
Summarise a .zip's remedy in the options' docstring as cache_remedy g…
nelson2005 Oct 8, 2026
3935afe
Take a listed class of none of numba's families as taking any file an…
nelson2005 Oct 8, 2026
5c98f5f
Tell a frozen application's no-locator error to list the user-wide lo…
nelson2005 Oct 8, 2026
76d93b8
List a class of none of numba's families as the class's own place for…
nelson2005 Oct 8, 2026
ccf39a7
Read a file name of another kind than str, bytes or a path object as …
nelson2005 Oct 8, 2026
887b804
Tell numba's no-locator error for a file its IPython locator alone ta…
nelson2005 Oct 8, 2026
72059db
Say in the docstring and the docs that an error naming a location a l…
nelson2005 Oct 8, 2026
b52dc1c
Say in check_cache_location's docstring that the stamp's error, FileN…
nelson2005 Oct 8, 2026
c108a46
Tell inspect's error, which names no file and has no errno, no call o…
nelson2005 Oct 8, 2026
65191b3
Tell numba's no-locator error for a cell under a list of its IPython …
nelson2005 Oct 8, 2026
b47b90b
Tell a source directory whose name makes the directory numba names af…
nelson2005 Oct 8, 2026
68a83c6
Check the name numba gives its cache directory over the locators it t…
nelson2005 Oct 8, 2026
536e29f
Say that inspect's error comes before numba's IPython locator tries i…
nelson2005 Oct 8, 2026
141455c
Count the name numba gives its cache directory as the file system cou…
nelson2005 Oct 8, 2026
93ee118
Say that inspect raises for a cell file on disk it cannot read and, b…
nelson2005 Oct 8, 2026
ed54284
Count the name numba gives its cache directory in UTF-16 units on mac…
nelson2005 Oct 8, 2026
3a99521
Build the expected IPython location with the platform's separator, sk…
nelson2005 Oct 8, 2026
a3bd492
Wrap the line that picks the refused error's errno within the line limit
nelson2005 Oct 8, 2026
baf878b
Name no location under NUMBA_CACHE_DIR or the user's cache directory …
nelson2005 Oct 8, 2026
e6cbe7f
Give the probe's source to a .zip member in an ipykernel directory al…
nelson2005 Oct 8, 2026
1e2554f
Give the probe's source to a .zip member whose source the archive hol…
nelson2005 Oct 8, 2026
ae2e3fb
Merge remote-tracking branch 'origin/main' into feat/cache-remedy-pac…
nelson2005 Oct 10, 2026
94cf5fa
Answer what numba 0.68 and later raise reading a .zip member's source…
nelson2005 Oct 10, 2026
f50b4b3
Ask a .pyc member alone beside .py members in a .zip for itself: numb…
nelson2005 Oct 10, 2026
232d293
Hold the test of a directory named .zip above the archive to numba 0.…
nelson2005 Oct 10, 2026
b90a218
Find the archive a .zip member's source is read from as zipimport doe…
nelson2005 Oct 10, 2026
76d7c76
Promise numba 0.68.1 for a member named with Windows's separator only…
nelson2005 Oct 10, 2026
125cb59
Raise, as numba's first save does, where the location numba picked is…
nelson2005 Oct 10, 2026
c92b371
Say in the proxy page that the mixed-tuple limit on .as_func runs fro…
nelson2005 Oct 10, 2026
4d2cf94
Test the check's answer for a location that is not there once made wi…
nelson2005 Oct 10, 2026
cb14a3a
Tell a cell file on disk in an ipykernel directory, too, that IPython…
nelson2005 Oct 10, 2026
e7c4857
Say that numba 0.68.1 reads a member named with Windows's separator a…
nelson2005 Oct 10, 2026
78ec24d
Offer the install on disk, which no separator touches, beside numba 0…
nelson2005 Oct 10, 2026
98f6839
Test that an error naming the __pycache__ beside a cell file on disk …
nelson2005 Oct 10, 2026
df7d140
Ask IPython for its cache directory three times in the check and twic…
nelson2005 Oct 10, 2026
e9cad7c
Tell a notebook cell under a NUMBA_CACHE_LOCATOR_CLASSES without IPyt…
nelson2005 Oct 10, 2026
c344763
Tell a source on disk that numba cannot read to be made readable: num…
nelson2005 Oct 10, 2026
9173894
Wrap a line of cache_remedy's docstring within the width the fork's l…
nelson2005 Oct 10, 2026
b1259dc
Assign numba_version once, at the top of the module: upstream moved i…
nelson2005 Oct 10, 2026
74538ce
Tell a source on disk under a directory named .zip, which numba's .zi…
nelson2005 Oct 10, 2026
6ed88ee
Say in check_cache_location's docstring which errors name no location…
nelson2005 Oct 10, 2026
331507c
Take any error IPython raises for its cache directory as no directory…
nelson2005 Oct 10, 2026
1b009ae
Hide IPython.paths and IPython.utils.path too where a test stands in …
nelson2005 Oct 10, 2026
7debb57
Count the source itself, which numba reads, as no location of IPython…
nelson2005 Oct 10, 2026
ffd2382
Blame IPython's temporary directory for a file on disk only where the…
nelson2005 Oct 10, 2026
ef862fc
Offer the __pycache__ beside the source for a name too long only wher…
nelson2005 Oct 10, 2026
e93dc83
Offer the user's cache directory at a shorter path, beside a shorter …
nelson2005 Oct 10, 2026
8e90d7a
Offer NUMBA_CACHE_DIR for a path too long that the user-wide and .zip…
nelson2005 Oct 10, 2026
ce8e082
Take back the user's cache directory at a shorter path as a cure for …
nelson2005 Oct 10, 2026
9917d78
Tell a name too long behind the .zip locator's error too: for a sourc…
nelson2005 Oct 10, 2026
a135ff3
Find the archive a member's source is read from as zipimport does, by…
nelson2005 Oct 10, 2026
ab1f01c
Name the fix, not a release to install, for a member named with Windo…
nelson2005 Oct 10, 2026
fa3a86d
Test that the file system's name limit is asked of the nearest direct…
nelson2005 Oct 10, 2026
4a877ab
Say in uncached_where_no_cache_can_be_written's docstring what the Wi…
nelson2005 Oct 10, 2026
8721508
Test which errors is_a_cache_error admits, by their text: numba's no-…
nelson2005 Oct 10, 2026
7644c3b
Name NUMBA_CACHE_DIR, which the user-provided locator takes nothing w…
nelson2005 Oct 10, 2026
78aee7a
Tell a .pyc-only member of any archive in an ipykernel directory the …
nelson2005 Oct 10, 2026
772c498
Test that an error naming a file numba writes in the __pycache__ besi…
nelson2005 Oct 11, 2026
d837bc3
Tell inspect's error apart before IPython's temporary directory: with…
nelson2005 Oct 11, 2026
ea05f0f
Leave the lines a reader stored under a member's name while the check…
nelson2005 Oct 11, 2026
af057d9
Read an IPython that gives its cache directory once and raises on the…
nelson2005 Oct 11, 2026
474ebc7
Say, for a source on disk under a directory named .zip under a list t…
nelson2005 Oct 11, 2026
3a03a27
Tell an error naming a directory named .zip above a source on disk as…
nelson2005 Oct 11, 2026
2d60f77
Know inspect's error by its words, not by its empty errno and name al…
nelson2005 Oct 11, 2026
e1819a3
Read a .zip member's source for the probe through a module of its own…
nelson2005 Oct 11, 2026
1e0367a
Read a path given as bytes as a string for the probe's module and loa…
nelson2005 Oct 11, 2026
0e6203e
Take the probe's loader out of linecache after the check for a member…
nelson2005 Oct 11, 2026
38e141e
Tell an error naming no file the locations numba could have taken, wi…
nelson2005 Oct 11, 2026
e6f07eb
Ask for the .zip locator's location among the ones numba could have t…
nelson2005 Oct 11, 2026
3d609e8
Reach no locator of IPython's family listed after a class of none of …
nelson2005 Oct 11, 2026
d10f3b8
Ask for the .zip locator's location among the ones numba could have t…
nelson2005 Oct 11, 2026
85ef6b0
Name the directory refusing to make a .zip member's location, the fir…
nelson2005 Oct 11, 2026
a340eb2
Ask a locator class of none of numba's families whether it takes the …
nelson2005 Oct 11, 2026
a41adab
Reach no locator listed after a class of none of numba's families tha…
nelson2005 Oct 11, 2026
b0ce89b
Hold the rule that a locator class of none of numba's families whose …
nelson2005 Oct 11, 2026
81bfc09
Name a file in the way of a .zip member's location, which no director…
nelson2005 Oct 11, 2026
19d8ad3
Reach no .zip locator listed after a class of none of numba's familie…
nelson2005 Oct 11, 2026
6cf7836
Say what keeps per-content anchors apart in numba's cache: the anchor…
nelson2005 Oct 11, 2026
e7d857a
Ask for a .pyc member compiled to name another path in the archive fo…
nelson2005 Oct 11, 2026
070414e
Tell a .pyc compiled to name another path in the archive, beside the …
nelson2005 Oct 11, 2026
edc233d
Say where numba keeps the anchors' cache files: the __pycache__ besid…
nelson2005 Oct 11, 2026
aab7ba9
Hold the name limit's fallback for a statvfs that raises: the test to…
nelson2005 Oct 11, 2026
f86ab7f
Tell an archive numba cannot read, which it reads for a member's stam…
nelson2005 Oct 11, 2026
c47a72f
Say XDG_CACHE_HOME on a POSIX system, not on Linux, for the IPython t…
nelson2005 Oct 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 151 additions & 11 deletions docs/numbox.core.configurations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ user's cache directory, the archive's directories are listed and the question pu
``.pyc`` in the archive that zipimport would run, which it takes before the ``.py`` beside it unless it is
stale against it or of another interpreter, and whose code keeps the file it was compiled from, is asked by
that file, since that is what numba looks up for it, on disk or gone, and one zipimport would pass over is
passed over; any other archive has no location at all. A directory of the package reached through a symlink
passed over, and a ``.pyc`` alone, with no ``.py`` beside it in the archive, is asked for itself whichever member
stands for its directory, since numba 0.68 and later read the member's source from the archive by the name its
code gives and find none for it; any other archive has no location at all. A directory of the package reached through a symlink
is walked like the rest, wherever the link points. The check makes the cache directories it asks about, as
numba would at the first decoration in each; with caching beside the sources that is an empty ``__pycache__``
per directory of the package, a linked one included. numba's own writability check makes a temporary file,
Expand All @@ -51,20 +53,158 @@ the check here makes a file named as long as the longest numba writes for the pa
which a test holds every function of the package under), so that location turns caching off with the
warning instead.

- For a source file on disk the remedy is ``NUMBA_CACHE_DIR`` pointed at a writable directory; where its
location is too long for the file system, a shorter ``NUMBA_CACHE_DIR`` or none, since numba's location
under the variable is a directory named for the source's directory, by its name and a hash of its path, and
without the variable numba caches beside the source; else the package installed at a shorter path, where the
location beside the source is the long one.
- For a ``.zip``, or a frozen application, it is the user's cache directory made writable: a ``.zip`` is the
one archive numba caches, from 0.61 on, and it caches it there, taking the directory without checking that
it can be written; a frozen application (``sys.frozen``) is cached there too, its sources not being on disk.
- For a source file on disk that numba cannot read, which its IPython locator reads for the function's source and
every locator reads for the stamp from numba 0.68, the remedy is to make it readable. For one it can, the remedy
is ``NUMBA_CACHE_DIR`` pointed at a writable directory; where it is
set and numba passed it over, the warning names it and asks for a writable directory at a short path, since
numba passes over one too deep to make its directory in as it does an unwritable one; and where
``NUMBA_CACHE_LOCATOR_CLASSES``, from numba 0.62, leaves the user-provided locator out, it is the locations
the list names made writable, numba never reading the variable. Where the
location is too long for the file system, the remedy is for the location the error names: numba takes a
directory under ``NUMBA_CACHE_DIR`` where that is set, else the ``__pycache__`` beside the source, else a
directory under the user's cache directory, each of the two under a cache directory named for the source's
directory, by its name and a hash of its path; the path the error names is matched whole against each location
a locator numba reaches gives it, in the order numba tries them, since the three can nest and
``NUMBA_CACHE_DIR`` set to the user's cache directory makes one path of two, and the error is read as that
locator's, the ones numba tries before it having passed the file over, as numba's own errors mean and an error a
caller passes on naming a location numba did not take need not; numba reaches no locator listed
after its ``.zip`` one for a path with ``.zip`` in it, which that locator takes without trying its location, so
a location one of those would give is none of numba's. So a shorter ``NUMBA_CACHE_DIR`` for the first; the
package installed at a shorter path for the second; the user's cache directory at a shorter path, through
``XDG_CACHE_HOME`` or ``HOME``, ``HOME`` alone on macOS and nothing on Windows, where numba asks the system,
for the third; and for either of the last two ``NUMBA_CACHE_DIR`` set to a short path, where numba tries it
before the locator that took the location, or, where it is set and numba passed it over, unwritable or too
deep, the warning names it and the remedy is a writable directory at a short path. The directory numba names after
the source's, under ``NUMBA_CACHE_DIR`` or the user's cache directory, is that directory's name and forty-one
bytes, and one longer than a name can be on the file system holding the location, which the system is asked for,
255 where it cannot say, in bytes, or in the UTF-16 units Windows and macOS count a name in, can be made at no
path, and is refused whatever the errno, EINVAL on Windows: an error naming such a location, numba's no-locator
error
for a file on disk where every locator it tried that names its directory so found the name too long for its file
system, the variable's unset by that limit, and a frozen application's are told the name and its length, and the
file in a directory of a shorter name, with, for a file on disk, the ``__pycache__`` beside the source made
writable where the in-tree locator is listed, or that locator listed where it is not, which caches under no such
name. numba hashes the source's directory path as UTF-8 for that name and raises for bytes that are not, at
decoration, where a locator that names its directory so reaches the file, so for such a path the remedy names no
location under ``NUMBA_CACHE_DIR`` or the user's cache directory. A location that is none of
numba's is named as the error names it, with the variable, where numba tries it before any other locator, named
as set or asked for at a short path, and nothing said of numba passing it over, which that location cannot show.
The name an error carries is read as a string, bytes or a path object alike, and a name of another kind, an integer
file descriptor's, as none. An error can name no file, or carry an
empty string or empty bytes as its name. A caller can build such an error, and numba's first save raises one where a
write fails, as on a full disk. So does inspect where, for numba's IPython locator, it reads no source in a cell file
on disk, unreadable or, before Python 3.13, empty, with no errno either, no call of the file system's having raised
it, and that error,
for a file on disk that a locator of IPython's family numba reaches takes, is told as inspect's, that locator having
tried no location: the file to make readable, with the source in it; for a cell, whose source numba reads from
linecache, where IPython holds it while it runs the cell, as that, numba caching a cell only while IPython holds
its source; and for a ``.zip`` member whose archive holds no source, a ``.pyc`` alone, as the archive's, its source
files to ship. Every other OSError that ``check_cache_location``
raises names a file. An error with no name, or an empty
one, is told the locations numba could have taken, in numba's order and each once. For a path too long, the remedy is
to put whichever of them is too long at a shorter path. For a file refused for another reason, such as a full disk,
the remedy gives the reason and asks for room or a writable directory there. A path object is never empty: pathlib
reads an empty string as the working directory, which the remedy names as a location that is none of numba's.
``NUMBA_CACHE_LOCATOR_CLASSES`` decides that order, each entry a class of numba's caching module or, by its
dotted path, a subclass of one, which takes what its parent takes, caches where it does and is told as it is, or a
class of none of numba's families, with a ``from_function`` and a place of its own, which takes what its
``from_function``, asked with a probe as numba asks it, takes, where it caches being its own to say: an error
naming a location that no locator of
numba's gives the file is told that location as the error names it, which is then that class's, and one naming no
file is told the location numba took as the class's own, with no path to name, among numba's locators' places where
those are reached; an
entry numba cannot resolve, which it refuses before any location is tried, or raises importlib's error for, a
relative module path's TypeError, and one that names no class, or a class with no ``from_function``, which it
fails on at a function it decorates where it reaches the entry, are no locators here, and numba's own error for
either is raised as it was.
numba's IPython locator caches a cell file it takes in ``numba_cache`` under IPython's cache directory, with no
directory per file, and reads the function's source when it takes the file, as inspect reads it, a file on disk
itself, a cell from linecache and a ``.zip`` member through the module's loader, which the check's probe has, a
module of its own whose loader reads the member from the archive as zipimport's does, the member's lines then in
linecache as any reader leaves them; that location too long is told as
IPython's cache directory at a shorter path, for a cell file on disk and for a ``.zip`` member in an ipykernel
directory alike, where that locator is listed before the ``.zip`` one, which takes a file without trying its
location, so that none listed after it is reached, with no ``NUMBA_CACHE_DIR`` offered for a source not on
disk; a cell, which no other locator of numba's takes, gets numba's no-locator error where that locator passes its
location over, and is told that location, to make writable or put at a shorter path, or IPython's cache directory
to make a home for where IPython raised for it, with a class of none of numba's families listed with it named as
having passed the cell over too; the remedy asks IPython for that directory where a locator of that family is
listed
and takes the file, and leaves IPython alone for every other file, a plain ``.zip`` member among them, since
IPython warns when asked under a home it cannot write and leaves a temporary directory behind, a new one on
every call where it can write neither its cache directory nor its own, in which case numba makes ``numba_cache``
in one and saves in another, the check raises the error numba's first save would, and the warning asks for
``IPYTHONDIR``, or ``XDG_CACHE_HOME`` on Linux, at a writable path; numba
imports IPython for the location when it makes it and catches only OSError there, so where IPython is not
importable it raises ImportError at decoration for a file that locator takes, no cache error, and an error a
caller passes on naming that location is told it as none of numba's where another locator numba reaches has a
place for the file, and the list where none has, as numba's no-locator error is told it; and where IPython raises
OSError for its directory numba passes the locator over, as it does a location it cannot make, and the warning,
asked the same, has no location of IPython's to match the error against. numba's IPython locator takes a file on
disk
only in an ipykernel directory and its ``.zip`` locator only a path with ``.zip`` in it, so either ahead of
the rest changes nothing for any other file; the ``.zip`` locator ahead of them all takes such a path first and
caches it under the user's cache directory where a part of the path ends in ``.zip``, an archive or a
directory, or, where none does, finds no archive
in it, and the warning then asks for a locator for a file on disk listed before it, the user-provided one with
``NUMBA_CACHE_DIR`` set, which alone it takes nothing without; after some of them, it finds no archive once
those have passed the file over, numba trying none after it, and the warning asks for one of their locations
made writable or such a locator listed before it. A list with no locator that takes the file is told so, for an
error a caller passes on under it as for numba's no-locator one, and so is one whose only locator for the file is
the user-provided one with ``NUMBA_CACHE_DIR`` unset, which takes nothing without it: the variable to set, as
numba's no-locator error is told there. Where the location numba took refuses a file for another reason, a
full disk or permissions changed since numba's own check, the warning names the location and the reason and
asks for room or a writable directory there, with ``NUMBA_CACHE_DIR`` as the alternative where numba tries it
before that location, or set to another directory where the location is the variable's own; numba passes over
a location it cannot make or write in, so only its no-locator error means the variable was passed over. An
error naming a location that is none of numba's is told that location as the error names it, and one naming
no file is told the locations numba could have taken.
- For a ``.zip``, or a frozen application, it is the user's cache directory made writable, or room made there,
with the reason the error gives, a full disk or permissions: a ``.zip`` is the one archive numba caches, from
0.61 on, and it caches it there, taking the directory without checking that it can be written; the error names
that location, or a file numba's first save writes in it, and the location is told with the reason; an error
naming a location that is none of numba's, under the list and in its order, is told that location as the error
names it, as for a source on disk, with nothing of what moves the user's cache directory and nothing of where
numba caches the file, which that location is none of; a frozen
application (``sys.frozen``) is cached there too, its sources not being on disk, and its error is numba's
no-locator one, which gives no reason, numba having passed the location over on its error, unwritable or too deep
alike, so that directory is named as one numba could not use, to be made writable or put at a shorter path, or,
where the name numba gives the directory after the source's is too long for the file system, told so.
A frozen application's path with ``.zip`` in it and no part ending in it gets the ``.zip`` locator's error instead,
where the list puts that locator before the user-wide one or once the user-wide one passed its location over, and
the warning asks for the user-wide locator listed before it, or for that location made writable or put at a
shorter path.
numba reads ``NUMBA_CACHE_DIR`` only for a source file on disk, so the variable changes nothing for either.
An error that names no file, a caller's, or numba's first save's on a full disk, is told the locations numba
could have taken, as for a source on disk, in its order and each once, with the reason, or, for a path too long,
to put whichever is too long at a shorter path; for a member in an ipykernel directory where a locator of
IPython's family is reached, the warning says nothing of the user's cache directory as where numba caches the
file, and IPython's ``numba_cache`` is among them where IPython gives its directory.
A ``.zip`` whose cache directory holds every entry but can no longer be written falls back too, where numba
alone would have loaded the entries: the writability check is the rule numba applies to every other
placement.
placement. numba caches a ``.zip`` through its ``.zip`` locator alone, so a ``NUMBA_CACHE_LOCATOR_CLASSES``
that leaves that locator out gives numba no locator for a source in a ``.zip``, and the warning asks for it to
be listed; so for a notebook cell and numba's IPython locator, and for a frozen application and numba's
user-wide locator, which alone takes one; any of them is told
for an error a caller passes on under such a list as for numba's no-locator one, since numba took no location
under it, and a source neither in a ``.zip`` nor a frozen application's, which no locator takes, is told the
source files on disk or a ``.zip`` holding them for any error.
- For an ``.egg``, ``.whl`` or ``.pyz``, a ``.pyc``-only install or a ``.pyc`` in a ``.zip``, it is the source
files on disk or a ``.zip`` holding them.
files on disk or a ``.zip`` holding them, each with the locator it needs listed where
``NUMBA_CACHE_LOCATOR_CLASSES`` leaves it out: one of the three locators for a file on disk for the first, the
``.zip`` locator for the second, and ``NUMBA_CACHE_DIR`` set where the user-provided locator is the one listed for
a file on disk, which takes nothing without it.
- From numba 0.68 the archive's stamp hashes each member's source, read from the archive by the name the
module's code gives under the archive's path: a member shipped as ``.pyc`` alone is told the source files, on
disk or in a ``.zip``, naming the member; on Windows under numba 0.68.0 every member is refused, its name
built with the platform's separator (`numba issue 10889 <https://github.com/numba/numba/issues/10889>`_,
fixed for 0.68.1), and the warning asks for the install on disk, or a release carrying the fix; and a directory
whose name
ends in ``.zip`` above the
archive, which numba takes for the archive by the first such part of the path and from 0.68 opens for the
source, is told as the directory it is, to put the archive under a path with none such above it; a source
file on disk under such a directory, which that locator takes once the locators before it passed the file
over, is told to make one of their locations writable or to put the file elsewhere.
- ``NUMBOX_JIT_OPTIONS='{"cache": false}'`` turns caching off and silences the warning in every case, the
package's options being what it sets; the anchors' warning under a caller's own options, below, is
silenced by those.
Expand Down
8 changes: 4 additions & 4 deletions docs/numbox.core.proxy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ inferred-signature ``@njit`` argument keeps the numbox type and propagates, from
numba 0.61 onward; on 0.60 there is no numbox type to keep and it discards along
with the rest.

From numba 0.61 onward ``.as_func`` inherits the mixed-container limit of any
derive value: a tuple holding it alongside a plain ``CompileResultWAP`` no longer
unifies, failing with a message-less ``AssertionError`` from
``numba.core.utils.unified_function_type`` (fixed in numba==0.68.0).
From numba 0.61 to 0.67 ``.as_func`` inherits the mixed-container limit of any
derive value: a tuple holding it alongside a plain ``CompileResultWAP`` does not
unify, failing with a message-less ``AssertionError`` from
``numba.core.utils.unified_function_type``; numba 0.68.0 unifies it, as 0.60 did.
See :doc:`numbox.core.work` for that limit and for why making the two types
compare equal is not available as a fix.

Expand Down
Loading
Loading