Skip to content

Commit

Permalink
Remove data_files from declarative config example
Browse files Browse the repository at this point in the history
According to the following references:

- https://setuptools.pypa.io/en/latest/references/keywords.html
- https://packaging.python.org/guides/distributing-packages-using-setuptools/#package-data

the usage of ``data_files`` is deprecated.

Therefore we should avoid having it in the main configuration example
for declarative config.
  • Loading branch information
abravalheri committed Oct 26, 2021
1 parent 4bce6d5 commit 2c169ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions changelog.d/2932.doc.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed the deprecated ``data_files`` option from the example in the
declarative configuration docs -- by :user:`abravalheri`
3 changes: 3 additions & 0 deletions changelog.d/2932.doc.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Change type of ``data_files`` option from ``dict`` to ``section`` in
declarative configuration docs (to match previous example) -- by
:user:`abravalheri`
12 changes: 4 additions & 8 deletions docs/userguide/declarative_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ boilerplate code in some cases.
src.subpackage1
src.subpackage2
[options.data_files]
/etc/my_package =
site.d/00_default.conf
host.d/00_default.conf
data = data/img/logo.png, data/svg/icon.svg
fonts = data/fonts/*.ttf, data/fonts/*.otf
Metadata and options are set in the config sections of the same name.

* Keys are the same as the keyword arguments one provides to the ``setup()``
Expand Down Expand Up @@ -222,7 +215,7 @@ package_data section [#
exclude_package_data section
namespace_packages list-comma
py_modules list-comma 34.4.0
data_files dict 40.6.0
data_files section 40.6.0 [#opt-4]_
======================= =================================== =============== =========

**Notes**:
Expand Down Expand Up @@ -250,6 +243,9 @@ data_files dict 40.6.0
The ``find_namespace:`` directive is supported since Python >=3.3.
.. [#opt-4] ``data_files`` is deprecated and should be avoided.
Please check :doc:`/userguide/datafiles` for more information.
Compatibility with other tools
==============================
Expand Down

0 comments on commit 2c169ff

Please sign in to comment.