Skip to content

docs: usb_cdc.Serial.readinto has no nbytes parameter #6944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 25, 2022

Conversation

Neradoc
Copy link

@Neradoc Neradoc commented Sep 25, 2022

And returns int.

@dhalbert
Copy link
Collaborator

Build failure in build-doc is:

Warning, treated as error:
Using the :property: flag with the py:method directiveis deprecated, use ".. py:property::" instead.
Error: Process completed with exit code 2.

@Neradoc
Copy link
Author

Neradoc commented Sep 25, 2022

Wow that has to come from a sphinx related update, I didn't get that locally.
Now when I try to make locally with a fresh venv I get that:

WARNING: Using the :property: flag with the py:method directive is deprecated, use ".. py:property::" instead.
WARNING: Using the :property: flag with the py:method directive is deprecated, use ".. py:property::" instead.
WARNING: Using the :property: flag with the py:method directive is deprecated, use ".. py:property::" instead.
WARNING: Using the :property: flag with the py:method directive is deprecated, use ".. py:property::" instead.

Which is super useful.
When I run ag ":property:" I get these.

shared-bindings/rp2pio/index.rst
282:      :property:
288:      :property:

shared-bindings/sdioio/index.rst
117:      :property:
124:      :property:

These are generated files, so:

//|     @property
//|     def writing(self) -> bool:
//|         """Returns True if a background write is in progress"""
//|

Becomes:

   .. method:: writing(self) -> bool
      :property:

      Returns True if a background write is in progress

I would change it to:

//|     writing: bool
//|     """Returns True if a background write is in progress"""
//|

I can add those changes to this PR, but I get another error in the template, due to sphinx version, I'm curious to see if the CI gets it too.

@Neradoc
Copy link
Author

Neradoc commented Sep 25, 2022

Ok this time the CI does give the same error I get locally:

An error happened in rendering the page BUILDING.
Reason: ValueError('too many values to unpack (expected 3)')

This is a sphinx-rtd-theme issue:
readthedocs/sphinx_rtd_theme#1343

We can temporarily set the sphinx version to 5.1.1

@jepler
Copy link

jepler commented Sep 25, 2022

We can temporarily set the sphinx version to 5.1.1

Mind adding that to this PR? If you do please tag me for reviewing.

@Neradoc
Copy link
Author

Neradoc commented Sep 25, 2022

Pushed the workaround:

sphinx!=5.2.0.post0

@Neradoc Neradoc requested a review from jepler September 25, 2022 14:11
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this finally builds it's good to merge. I added the 3.10.6 python pin for the doc build

@jepler jepler merged commit 1c8e126 into adafruit:main Sep 25, 2022
@jepler
Copy link

jepler commented Sep 25, 2022

Thanks!

@Neradoc Neradoc deleted the doc-fix-usb-cdc branch October 4, 2022 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants