Skip to content

Commit 5bdf568

Browse files
committed
Merge tag '10.5.0' into relcorp
2 parents 402fc30 + dcbc255 commit 5bdf568

File tree

79 files changed

+6567
-8035
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+6567
-8035
lines changed

CHANGELOG.rst

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
Version 10.5.0
2+
--------------
3+
4+
:Date: September 18, 2023
5+
6+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#10744 <https://github.com/readthedocs/readthedocs.org/pull/10744>`__)
7+
* `@stsewd <https://github.com/stsewd>`__: Subscriptions: remove old models (`#10740 <https://github.com/readthedocs/readthedocs.org/pull/10740>`__)
8+
* `@ericholscher <https://github.com/ericholscher>`__: Change frequency of pageview delete code (`#10739 <https://github.com/readthedocs/readthedocs.org/pull/10739>`__)
9+
* `@humitos <https://github.com/humitos>`__: Proxito: add CORS headers only on public versions (`#10737 <https://github.com/readthedocs/readthedocs.org/pull/10737>`__)
10+
* `@humitos <https://github.com/humitos>`__: Docs: remove feature flags page (`#10736 <https://github.com/readthedocs/readthedocs.org/pull/10736>`__)
11+
* `@humitos <https://github.com/humitos>`__: Addons: allow users to opt-in into the beta addons (`#10733 <https://github.com/readthedocs/readthedocs.org/pull/10733>`__)
12+
* `@humitos <https://github.com/humitos>`__: Docs: review and update the whole FAQ page. (`#10732 <https://github.com/readthedocs/readthedocs.org/pull/10732>`__)
13+
* `@humitos <https://github.com/humitos>`__: Release 10.4.0 (`#10727 <https://github.com/readthedocs/readthedocs.org/pull/10727>`__)
14+
* `@humitos <https://github.com/humitos>`__: Addons: include `hotkeys` in API response (`#10722 <https://github.com/readthedocs/readthedocs.org/pull/10722>`__)
15+
* `@humitos <https://github.com/humitos>`__: Docs: make `sphinx.configuration` in the tutorial (`#10718 <https://github.com/readthedocs/readthedocs.org/pull/10718>`__)
16+
* `@humitos <https://github.com/humitos>`__: Requirements: revert upgrade to `psycopg==3.x` (`#10713 <https://github.com/readthedocs/readthedocs.org/pull/10713>`__)
17+
* `@humitos <https://github.com/humitos>`__: FooterAPI: use `AdminPermission` when working with object users (`#10709 <https://github.com/readthedocs/readthedocs.org/pull/10709>`__)
18+
* `@stsewd <https://github.com/stsewd>`__: Search: stop relying on the DB when indexing (`#10696 <https://github.com/readthedocs/readthedocs.org/pull/10696>`__)
19+
120
Version 10.4.0
221
--------------
322

dockerfiles/nginx/proxito.conf.template

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ server {
8080
add_header Access-Control-Allow-Origin $access_control_allow_origin always;
8181
set $access_control_allow_headers $upstream_http_access_control_allow_headers;
8282
add_header Access-Control-Allow-Headers $access_control_allow_headers always;
83+
set $access_control_allow_methods $upstream_http_access_control_allow_methods;
84+
add_header Access-Control-Allow-Methods $access_control_allow_methods always;
8385
set $x_frame_options $upstream_http_x_frame_options;
8486
add_header X-Frame-Options $x_frame_options always;
8587
set $x_content_type_options $upstream_http_x_content_type_options;
@@ -93,6 +95,8 @@ server {
9395
# Now, I'm injecting it in all the NGINX responses because `sub_filter` is not allowed inside an `if` statement.
9496
set $rtd_hosting_integrations $upstream_http_x_rtd_hosting_integrations;
9597
add_header X-RTD-Hosting-Integrations $rtd_hosting_integrations always;
98+
set $rtd_force_addons $upstream_http_x_rtd_force_addons;
99+
add_header X-RTD-Force-Addons $rtd_force_addons always;
96100

97101
# Inject our own script dynamically
98102
# TODO: find a way to make this work _without_ running `npm run dev` from the `addons` repository

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
master_doc = "index"
7979
copyright = "Read the Docs, Inc & contributors"
80-
version = "10.4.0"
80+
version = "10.5.0"
8181
release = version
8282
exclude_patterns = ["_build", "shared", "_includes"]
8383
default_role = "obj"

docs/dev/server-side-search.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You can fix this by deleting the page index and :ref:`re-indexing <server-side-s
6262
.. prompt:: bash
6363

6464
inv docker.manage 'search_index --delete'
65-
inv docker.manage reindex_elasticsearch
65+
inv docker.manage 'reindex_elasticsearch --queue web'
6666

6767
How we index documentations
6868
~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/user/faq.rst

+36-112
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This can be because the project is not correctly configured,
2525
because the contents of the Git repository cannot be built,
2626
or in the most rare cases because a system that Read the Docs connects to is not working.
2727

28-
First, you should check out the Builds tab of your project.
28+
First, you should check out the :guilabel:`Builds` tab of your project.
2929
By clicking on the failing step,
3030
you will be able to see details that can lead to resolutions to your build error.
3131

@@ -42,25 +42,6 @@ you can use an important word or message from the error to search for a solution
4242
* :ref:`faq:why do i get import errors from libraries depending on c modules?`
4343

4444

45-
.. Old reference
46-
.. _Help, my build passed but my documentation page is 404 Not Found!:
47-
48-
Why does my project have status "passed" but I get a 404 page?
49-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50-
51-
This often happens because you don't have an `index.html` file being generated.
52-
53-
Make sure you have one of the following files at the top level of your documentation source:
54-
55-
* `index.rst` (Sphinx)
56-
* `index.md` (MkDocs or Sphinx with MyST)
57-
58-
.. tip::
59-
60-
To test if your docs actually built correctly,
61-
you can navigate to a specific page that you know is part of the documentation build,
62-
for example `/en/latest/README.html`.
63-
6445
Why do I get import errors from libraries depending on C modules?
6546
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6647

@@ -76,18 +57,21 @@ successfully build the documentation despite missing dependencies.
7657

7758
With Sphinx you can use the built-in `autodoc_mock_imports`_ for mocking. If
7859
such libraries are installed via ``setup.py``, you also will need to remove all
79-
the C-dependent libraries from your ``install_requires`` in the RTD environment.
60+
the C-dependent libraries from your ``install_requires`` in the Read the Docs environment.
8061

8162
.. _autodoc_mock_imports: http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports
8263

83-
Where do I need to put my docs for RTD to find it?
84-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8564

86-
Read the Docs will crawl your project looking for a ``conf.py``. Where it finds the ``conf.py``,
87-
it will run ``sphinx-build`` in that directory.
88-
So as long as you only have one set of sphinx documentation in your project, it should Just Work.
65+
Where do I need to put my docs for Read the Docs to find it?
66+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67+
68+
You can put your docs wherever your want on your repository.
69+
However, you will need to tell Read the Docs where your Sphinx's (i.e. ``conf.py``)
70+
or MkDocs' (i.e. ``mkdocs.yml``) configuration file lives in order to build your documentation.
71+
72+
This is done by using ``sphinx.configuration`` or ``mkdocs.configuration`` config key in your Read the Docs configuration file.
73+
Read :doc:`config-file/index` to know more about this.
8974

90-
You can specify an exact path to your documentation using a Read the Docs :doc:`config-file/index`.
9175

9276
How can I avoid search results having a deprecated version of my docs?
9377
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -153,26 +137,10 @@ You can also set your project documentation to install your Python project itsel
153137
* :ref:`faq:Why do I get import errors from libraries depending on C modules?`
154138

155139

156-
Can I have access to additional features or settings?
157-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158-
159-
If this is just a dependency issue,
160-
see :ref:`faq:How do I add additional software dependencies for my documentation?`.
161-
162-
Read the Docs offers some settings (feature flags) which can be used for a variety of purposes.
163-
To enable these settings,
164-
please send an email to [email protected] and we will change the settings for the project.
165-
166-
.. seealso::
167-
168-
:doc:`/feature-flags`
169-
Reference of all Feature Flags that can be requested.
170-
171-
172140
How do I change behavior when building with Read the Docs?
173141
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174142

175-
When RTD builds your project, it sets the :envvar:`READTHEDOCS` environment
143+
When Read the Docs builds your project, it sets the :envvar:`READTHEDOCS` environment
176144
variable to the string ``'True'``. So within your Sphinx :file:`conf.py` file, you
177145
can vary the behavior based on this. For example:
178146

@@ -187,7 +155,7 @@ can vary the behavior based on this. For example:
187155
html_theme = "nature"
188156
189157
The :envvar:`READTHEDOCS` variable is also available in the Sphinx build
190-
environment, and will be set to ``True`` when building on RTD:
158+
environment, and will be set to ``True`` when building on Read the Docs:
191159

192160

193161
.. code-block:: jinja
@@ -200,8 +168,8 @@ environment, and will be set to ``True`` when building on RTD:
200168
I want comments in my docs
201169
~~~~~~~~~~~~~~~~~~~~~~~~~~
202170

203-
RTD doesn't have explicit support for this.
204-
That said, a tool like `Disqus`_ (and the `sphinxcontrib-disqus`_ plugin) can be used for this purpose on RTD.
171+
Read the Docs doesn't have explicit support for this.
172+
That said, a tool like `Disqus`_ (and the `sphinxcontrib-disqus`_ plugin) can be used for this purpose on Read the Docs.
205173

206174
.. _Disqus: https://disqus.com/
207175
.. _sphinxcontrib-disqus: https://pypi.python.org/pypi/sphinxcontrib-disqus
@@ -245,7 +213,7 @@ https://celery.readthedocs.io/projects/kombu/en/latest/
245213

246214
This also works the same for custom domains:
247215

248-
http://docs..org/projects/kombu/en/latest/
216+
http://docs.celeryq.dev/projects/kombu/en/latest/
249217

250218
You can add subprojects in the project admin dashboard.
251219

@@ -262,36 +230,28 @@ See the section on :doc:`localization`.
262230
Sphinx
263231
------
264232

265-
I want to use the Blue/Default Sphinx theme
266-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
267-
268-
We think that our theme is badass,
269-
and better than the default for many reasons.
270-
Some people don't like change though |:smile:|,
271-
so there is a hack that will let you keep using the default theme.
272-
If you set the ``html_style`` variable in your ``conf.py``,
273-
it should default to using the default theme.
274-
The value of this doesn't matter, and can be set to ``/default.css`` for default behavior.
275233

234+
.. Old references
235+
.. _I want to use the Blue/Default Sphinx theme:
236+
.. _I want to use the Read the Docs theme locally:
276237

277-
I want to use the Read the Docs theme locally
278-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238+
I want to use the Read the Docs theme
239+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279240

280-
Read the Docs automatically applies the sphinx-rtd-theme to projects that do not have a defined theme.
281-
If you build a Sphinx project locally,
282-
you should specify that you are using sphinx-rtd-theme.
283-
284-
.. seealso::
241+
To use the Read the Docs theme,
242+
you have to specify that in your Sphinx's ``conf.py`` file.
285243

286-
`sphinx-rtd-theme documentation <https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html>`_
287-
See the official documentation for instructions to enable it in your Sphinx theme.
244+
Read the `sphinx-rtd-theme documentation <https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html>`_
245+
for instructions to enable it in your Sphinx project.
288246

289247

290248
Image scaling doesn't work in my documentation
291249
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
292250

293-
Image scaling in docutils depends on PIL. PIL is installed in the system that RTD runs on. However, if you are using the virtualenv building option, you will likely need to include PIL in your requirements for your project.
294-
251+
Image scaling in ``docutils`` depends on ``Pillow``.
252+
If you notice that image scaling is not working properly on your Sphinx project,
253+
you may need to add ``Pillow`` to your requirements to fix this issue.
254+
Read more about :doc:`guides/reproducible-builds` to define your dependencies in a ``requirements.txt`` file.
295255

296256
Python
297257
------
@@ -300,30 +260,14 @@ Can I document a Python package that is not at the root of my repository?
300260
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301261

302262
Yes. The most convenient way to access a Python package for example via
303-
`Sphinx's autoapi`_ in your documentation is to use the *Install your project
304-
inside a virtualenv using setup.py install* option in the admin panel of
305-
your project. However this assumes that your ``setup.py`` is in the root of
306-
your repository.
307-
308-
If you want to place your package in a different directory or have multiple
309-
Python packages in the same project, then create a pip requirements file. You
310-
can specify the relative path to your package inside the file.
311-
For example you want to keep your Python package in the ``src/python``
312-
directory, then create a ``requirements.txt`` file with the
313-
following contents::
263+
`Sphinx's autoapi`_ in your documentation is to use the
264+
``python.install.method: pip`` (:ref:`config-file/v2:python.install`) configuration key.
314265

315-
src/python/
266+
This configuration will tell Read the Docs to install your package in
267+
the virtual environment used to build your documentation so your documentation tool can access to it.
316268

317-
Please note that the path must be relative to the working directory where ``pip`` is launched,
318-
rather than the directory where the requirements file is located.
319-
Therefore, even if you want to move the requirements file to a ``requirements/`` directory,
320-
the example path above would work.
269+
.. _Sphinx's autoapi: https://sphinx-autoapi.readthedocs.io/en/latest/
321270

322-
You can customize the path to your requirements file and any other installed dependency
323-
using a Read the Docs :doc:`config-file/index`.
324-
325-
.. _Sphinx's autoapi: http://sphinx-doc.org/ext/autodoc.html
326-
.. _pip requirements file: https://pip.pypa.io/en/stable/user_guide.html#requirements-files
327271

328272
Does Read the Docs work well with "legible" docstrings?
329273
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -354,8 +298,8 @@ and as a result, it tends to look a bit better with the default theme.
354298
I need to install a package in a environment with pinned versions
355299
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356300

357-
To ensure proper installation of a Python package, the ``pip`` :ref:`install method <config-file/v2:python.install>` will automatically upgrade every dependency to its most recent version in case they aren't:term:`pinned <pinning>` by the package definition.
358-
If instead you'd like to pin your dependencies outside the package, you can add this line to your requirements or environment file (if you are using Conda).
301+
If you'd like to pin your dependencies outside the package,
302+
you can add this line to your requirements or environment file (if you are using Conda).
359303

360304
In your ``requirements.txt`` file::
361305

@@ -368,26 +312,6 @@ In your Conda environment file (``environment.yml``)::
368312
-e ..
369313

370314

371-
Can I use Anaconda Project and ``anaconda-project.yml``?
372-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
373-
374-
Yes. With ``anaconda-project>=0.8.4`` you can use the `Anaconda Project`_ configuration
375-
file ``anaconda-project.yaml`` (or ``anaconda-project.yml``) directly in place of a
376-
Conda environment file by using ``dependencies:`` as an alias for ``packages:``.
377-
378-
I.e., your ``anaconda-project.yaml`` file can be used as a ``conda.environment`` config
379-
in the ``.readthedocs.yaml`` config file if it contains::
380-
381-
dependencies:
382-
- python=3.9
383-
- scipy
384-
...
385-
386-
.. _Anaconda Project: https://anaconda-project.readthedocs.io/en/latest/
387-
388-
389-
390-
391315
Other documentation frameworks
392316
------------------------------
393317

docs/user/feature-flags.rst

-18
This file was deleted.

docs/user/guides/conda.rst

-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ so they can have any value, or not be present at all.
5959
whereas ``python=3.8`` (single ``=``) will fetch the latest ``3.8.*`` version,
6060
which is ``3.8.8`` at the time of writing.
6161

62-
.. warning:: Pinning Sphinx and other Read the Docs core dependencies
63-
is not yet supported by default when using conda (see `this GitHub issue for discussion`_).
64-
If your project needs it, request that we enable the ``CONDA_APPEND_CORE_REQUIREMENTS``
65-
:ref:`feature flag <feature-flags:Feature Flags>`.
66-
6762
.. _this GitHub issue for discussion: https://github.com/readthedocs/readthedocs.org/issues/3829
6863
.. _exporting a conda environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment
6964

docs/user/reference/features.rst

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ Feature reference
101101
/automation-rules
102102
/badges
103103
/canonical-urls
104-
/feature-flags
105104
/flyout-menu
106105
/reference/environment-variables
107106
/security-log

docs/user/tutorial/index.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ and change the Python version as follows:
330330
install:
331331
- requirements: docs/requirements.txt
332332
333+
sphinx:
334+
configuration: docs/source/conf.py
335+
333336
The purpose of each key is:
334337

335338
``version``
@@ -401,6 +404,7 @@ click on the |:pencil2:| icon, and add these contents:
401404
- requirements: docs/requirements.txt
402405
403406
sphinx:
407+
configuration: docs/source/conf.py
404408
fail_on_warning: true
405409
406410
At this point, if you navigate back to your "Builds" page,
@@ -443,9 +447,10 @@ To do so, add this extra content to your ``.readthedocs.yaml``:
443447

444448
.. code-block:: yaml
445449
:caption: .readthedocs.yaml
446-
:emphasize-lines: 4-6
450+
:emphasize-lines: 5-7
447451
448452
sphinx:
453+
configuration: docs/source/conf.py
449454
fail_on_warning: true
450455
451456
formats:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "10.4.0",
3+
"version": "10.5.0",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "10.4.0"
4+
__version__ = "10.5.0"

0 commit comments

Comments
 (0)