Commit graph

9135 commits

Author SHA1 Message Date
Benjamin Drung
bb2994898c doc: Do not mock non-existing __mro_entries__ attribute
Building the documentation with the Python 3.7 version of sphinx fails:

```
$ make -C doc html SPHINXBUILD="python3.7 /usr/bin/sphinx-build"
[...]
WARNING: autodoc: failed to import module 'salt.states.pkg'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 152, in import_module
    __import__(modname)
  File "salt/states/pkg.py", line 84, in <module>
    import salt.utils.pkg
  File "salt/utils/pkg/__init__.py", line 13, in <module>
    import salt.utils.data
  File "salt/utils/data.py", line 23, in <module>
    import salt.utils.yaml
  File "salt/utils/yaml.py", line 9, in <module>
    from salt.utils.yamldumper import *
  File "salt/utils/yamldumper.py", line 34, in <module>
    class IndentMixin(Dumper):
TypeError: __mro_entries__ must return a tuple
```

Instead of returning a Mock object for the `__mro_entries__` attribute, raise
an AttributeError instead.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:28:04 +01:00
Benjamin Drung
e6cf3c4a94 Do not mock json when building the documentation
Building the documentation on Debian unstable with Python 3.7 fails:

```
debian-unstable$ HTML_THEME=saltstack make -C doc html
make: Entering directory 'doc'
No need to update translations. Skipping...
sphinx-build -b html -d _build/doctrees    . _build/html
Running Sphinx v1.7.9
loading translations [en]... done

Exception occurred:
  File "/usr/lib/python3/dist-packages/sphinx/util/jsonimpl.py", line 22, in <module>
    class SphinxJSONEncoder(json.JSONEncoder):
TypeError: __mro_entries__ must return a tuple
The full traceback has been saved in /tmp/sphinx-err-wzl9_n0k.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:72: html] Error 2
make: Leaving directory 'doc'
debian-unstable$ cat /tmp/sphinx-err-wzl9_n0k.log

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/cmdline.py", line 303, in main
    args.warningiserror, args.tags, args.verbosity, args.jobs)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 187, in __init__
    self.setup_extension(extension)
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 411, in setup_extension
    self.registry.load_extension(self, extname)
  File "/usr/lib/python3/dist-packages/sphinx/registry.py", line 315, in load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/usr/lib/python3/dist-packages/sphinx/builders/applehelp.py", line 20, in <module>
    from sphinx.builders.html import StandaloneHTMLBuilder
  File "/usr/lib/python3/dist-packages/sphinx/builders/html.py", line 43, in <module>
    from sphinx.util import jsonimpl, logging, status_iterator
  File "/usr/lib/python3/dist-packages/sphinx/util/jsonimpl.py", line 22, in <module>
    class SphinxJSONEncoder(json.JSONEncoder):
TypeError: __mro_entries__ must return a tuple
```

The json module is a standard module. I is always present. So do not mock it.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:27:54 +01:00
Cédric Bosdonnat
4acaf459b4 Fix sphynx error about tornado.version_info
This is fix errors like the following when building docs:

WARNING: autodoc: failed to import module 'salt.states.saltmod'; the following exception was raised:
Traceback (most recent call last):
  File "/public/src/salt/env/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 140, in import_module
    __import__(modname)
  File "/public/src/salt/salt/states/saltmod.py", line 36, in <module>
    import salt.output
  File "/public/src/salt/salt/output/__init__.py", line 19, in <module>
    import salt.loader
  File "/public/src/salt/salt/loader.py", line 23, in <module>
    import salt.config
  File "/public/src/salt/salt/config/__init__.py", line 27, in <module>
    import salt.utils.network
  File "/public/src/salt/salt/utils/network.py", line 35, in <module>
    import salt.utils.zeromq
  File "/public/src/salt/salt/utils/zeromq.py", line 39, in <module>
    if tornado.version_info < (5,):
TypeError: '<' not supported between instances of 'Mock' and 'tuple'

(cherry picked from commit 8199700fdb)
2018-12-19 12:13:09 +01:00
Max Arnold
d7403dae18 Fix profile outputter docs
Also remove the mention of obsolete "grains" output format.
2018-12-15 18:38:39 +07:00
Ch3LL
512293fd93
Remove dunder_dictionaries.rst. Was added to modules/developing.rst 2018-12-14 12:55:39 -05:00
Ch3LL
89b4e096db
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/topics/development/dunder_dictionaries.rst
  - salt/grains/core.py
  - salt/netapi/rest_tornado/saltnado.py
2018-12-14 11:15:48 -05:00
Gareth J. Greenaway
1b4d398579
Merge branch '2018.3' into fluorine
Conflicts:
	salt/modules/acme.py
2018-12-05 21:54:14 +01:00
Jamie Bliss
03e31688a1
whitelist_modules is linked via enable_whitelist_modules for some reason? idk 2018-12-04 04:31:47 -05:00
Jamie Bliss
5ca1f8e2a5
Typos 2018-12-04 04:20:43 -05:00
Jamie Bliss
7cb1a87fe6
Add a quick index of loader-related settings 2018-12-04 02:08:39 -05:00
Jamie Bliss
318ca48127
Make a note to not import modules 2018-12-04 01:35:27 -05:00
Jamie Bliss
678958e559
Editing 2018-11-30 19:21:54 -05:00
Jamie Bliss
374d0e9745
Finish the last sections 2018-11-30 19:14:35 -05:00
Jamie Bliss
98da110be2
Migrate Dynamic Module Distribution to Modular Systems. 2018-11-30 18:21:12 -05:00
Jamie Bliss
1bdd49d43a
Add more links and write some system summaries 2018-11-29 22:49:39 -05:00
Mike Place
a5c7639ecb
Merge pull request #50657 from terminalmage/issue49392
Rewrite host.present state to allow for removal of entries not matching IP
2018-11-29 10:58:39 -07:00
Jamie Bliss
bd3796a9c2
Update TOC 2018-11-28 18:20:46 -05:00
Jamie Bliss
3a9ab1b5f5
Merge dunders into developing, expand to cover all dunders. 2018-11-28 17:53:14 -05:00
Erik Johnson
2ddb587e99
Add release notes for new "clean" option 2018-11-28 11:45:25 -06:00
Jamie Bliss
d06739a647
Add short writeups for a bunch of systems. 2018-11-26 22:25:23 -05:00
Jamie Bliss
705e7e460f
Add a bunch of cross linking 2018-11-26 21:37:32 -05:00
Jamie Bliss
40f9b16530
Add missing module type sections 2018-11-26 21:22:57 -05:00
Jamie Bliss
172d8c2902
Refactor headings 2018-11-26 20:56:43 -05:00
Jamie Bliss
53154a0fe0
Oops, missed that 2018-11-26 20:43:40 -05:00
Jamie Bliss
0dcd3419af
Possible horrific use of toctrees? maybe 2018-11-26 20:02:46 -05:00
Jamie Bliss
bed35095be
Refactor, add a TOC 2018-11-26 19:48:58 -05:00
Jamie Bliss
f647c1d74c
Fill in some missing modules 2018-11-26 19:33:12 -05:00
Jamie Bliss
26468dfc75
Add missing blank line 2018-11-26 18:21:16 -05:00
Gareth J. Greenaway
0f15796484
Merge branch '2018.3' into merge-2018.3
Conflicts:
	salt/utils/schedule.py
2018-11-26 11:43:51 -08:00
Jamie Bliss
205fea9cc3
Some more revising 2018-11-26 03:36:20 -05:00
Jamie Bliss
d4a8f7e47d
Remove some code from some links 2018-11-26 03:27:51 -05:00
Jamie Bliss
65e4199c25
I feel like it should be up there 2018-11-26 03:21:47 -05:00
Jamie Bliss
d44f5ce0fd
Rephrase footnote 2018-11-26 03:00:11 -05:00
Jamie Bliss
125e46ed65
Add section on how modules get loaded, including giant table of names 2018-11-26 02:59:16 -05:00
Jamie Bliss
5bfc6c6eeb
Update reference to modules/index 2018-11-26 02:58:56 -05:00
Jamie Bliss
4b096c1e86
Move all the module-development documentation into a single folder 2018-11-26 00:07:30 -05:00
Erik Johnson
5c281797d4
Merge pull request #50576 from garethgreenaway/bp-50549
Back-port PR #50549 to 2018.3
2018-11-21 08:39:54 -06:00
Erik Johnson
7f35838d9e
Fix docs breakage introduced in 28f1595 2018-11-21 07:40:17 -06:00
Erik Johnson
678a75b2a1
Merge remote-tracking branch 'upstream/2018.3' into fluorine 2018-11-21 07:31:51 -06:00
Erik Johnson
ba82b0748a
Merge remote-tracking branch 'upstream/2017.7' into merge-2018.3 2018-11-21 07:19:22 -06:00
Erik Johnson
8127dd5bb4
Disable unused shorturls plugin
It was causing build errors when SPHINXOPTS=-W is used
2018-11-20 18:21:25 -06:00
Mike Place
807068d082
Typo fix 2018-11-20 09:42:48 -07:00
Mike Place
2ef8307a68
Typo fix 2018-11-20 09:42:30 -07:00
Mike Place
7c8957ac68
Typo fix
This was my fault in the original
2018-11-20 09:42:12 -07:00
Mike Place
b163380cb1
Add security credits to release notes 2018-11-19 12:12:33 -08:00
Gareth J. Greenaway
5cf6a1400d
Merge branch '2018.3' into merge-fluorine 2018-11-19 10:48:06 -08:00
Damon Atkins
a049cf4128
Merge branch 'fluorine' into win_pkg_min_repo 2018-11-17 01:45:50 +11:00
Damon Atkins
00ef561a9d update minion.rst with winrepo_cache_expire_min new default 2018-11-17 01:25:47 +11:00
Nicole Thomas
a8ca8f71ba
Merge pull request #50512 from Ch3LL/merge-fluorine
[fluorine] Merge forward from 2018.3 to fluorine
2018-11-15 09:38:42 -05:00
Damon Atkins
828990c248 typo 2018-11-15 21:10:24 +11:00