Skip to content

Commit 193ded2

Browse files
committed
Fix requirements and traceback highlighting
1 parent 22d556a commit 193ded2

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __getattr__(cls, name):
7070

7171
# -- General configuration ------------------------------------------------
7272

73-
needs_sphinx = '1.4.3'
73+
needs_sphinx = '1.4.0'
7474
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', 'sphinx.ext.imgmath']
7575
templates_path = ['_templates']
7676
source_suffix = '.rst'

docs/deprecated.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ from tight loops. With this change, the script looks like this::
9393
stream = io.BytesIO()
9494
camera.capture(stream, 'raw', use_video_port=True)
9595

96-
And produces the following output on the console when run::
96+
And produces the following output on the console when run:
97+
98+
.. code-block:: text
9799
98100
/usr/share/pyshared/picamera/camera.py:149: DeprecationWarning: Setting framerate or gains as a tuple is deprecated; please use one of Python's many numeric classes like int, float, Decimal, or Fraction instead
99101
"Setting framerate or gains as a tuple is deprecated; "
@@ -133,7 +135,9 @@ full stack trace::
133135
stream = io.BytesIO()
134136
camera.capture(stream, 'raw', use_video_port=True)
135137

136-
Now when we run the script it produces the following::
138+
Now when we run the script it produces the following:
139+
140+
.. code-block:: pycon
137141
138142
Traceback (most recent call last):
139143
File "test_deprecated.py", line 10, in <module>
@@ -146,7 +150,9 @@ Now when we run the script it produces the following::
146150
147151
This tells us that line 10 of our script is using deprecated functionality, and
148152
provides a hint of how to fix it. We change line 10 to use an int instead of a
149-
tuple for the framerate. Now we run again, and this time get the following::
153+
tuple for the framerate. Now we run again, and this time get the following:
154+
155+
.. code-block:: pycon
150156
151157
Traceback (most recent call last):
152158
File "test_deprecated.py", line 12, in <module>

rtd_requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sphinx>=1.4.3
1+
sphinx>=1.4.0

0 commit comments

Comments
 (0)