From d6451750b4715a5261b4538f7693001f11433342 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 26 Feb 2024 15:15:57 -0800 Subject: [PATCH] src/doc/en/developer/coding_basics.rst: Don't encourage PRs that update direct access to data files using __file__ for now --- src/doc/en/developer/coding_basics.rst | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index a7304f6605e..b9b871dd749 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -188,18 +188,13 @@ included in one of the following places: :func:`importlib.resources.as_file`. It should be imported in the same way as shown above. - .. NOTE:: - - You may notice that some older code in the Sage library accesses - the package data in more direct ways. For example, - ``SAGE_ROOT/src/sage/interfaces/maxima.py`` uses the file - ``SAGE_ROOT/src/sage/interfaces/maxima.lisp`` at runtime, so it - refers to it as:: - - os.path.join(os.path.dirname(__file__), 'sage-maxima.lisp') +- Older code in the Sage library accesses + the package data in more direct ways. For example, + ``SAGE_ROOT/src/sage/interfaces/maxima.py`` uses the file + ``SAGE_ROOT/src/sage/interfaces/maxima.lisp`` at runtime, so it + refers to it as:: - This is no longer recommended, and PRs that update such uses - are welcome. + os.path.join(os.path.dirname(__file__), 'sage-maxima.lisp') - In an appropriate subdirectory of ``SAGE_ROOT/src/sage/ext_data/``. (At runtime, it is then available in the directory indicated by