Skip to content

Add notes from the 2022-11 meeting #68

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 2 commits into from
Nov 14, 2022
Merged

Add notes from the 2022-11 meeting #68

merged 2 commits into from
Nov 14, 2022

Conversation

encukou
Copy link
Member

@encukou encukou commented Nov 10, 2022

I missed most of the meeting, so I'm mostly just copying the document here.

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

A few minor comments, otherwise LGTM

@CAM-Gerlach
Copy link
Member

As for the build warning due to Sphinx using the deprecated imghdr module in Python 3.11,, @AA-Turner I thought I remembered you folks already fixing this in 5.x, or am I confused?

@hugovk
Copy link
Member

hugovk commented Nov 11, 2022

Sphinx is failing on the CI because we're turning warnings into errors (-W error) and Sphinx is using imghdr, and triggering a deprecation warning:

Run python -bb -X dev -W error -m sphinx --color -n -E -a -W --keep-going docs build
Running Sphinx v5.3.0

Exception occurred:
  File "/opt/hostedtoolcache/Python/3.11.0/x64/lib/python3.11/warnings.py", line 514, in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
The full traceback has been saved in /tmp/sphinx-err-tfj_[8](https://github.com/hugovk/docs-community/actions/runs/3445416680/jobs/5749102789#step:5:9)37y.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!

With pytest, you can disable arbitrary warnings, but looks like Sphinx can only suppress certain ones - is that correct @AA-Turner?

Options to fix:

@AA-Turner
Copy link
Member

This is unfortunate.

Would adding -W ignore::DeprecationWarning:imghdr after the current -W error call work?

A

@hugovk
Copy link
Member

hugovk commented Nov 11, 2022

@CAM-Gerlach
Copy link
Member

Yeah, as mentioned I thought that was already fixed upstream since IIRC we saw it on the PEPs once we started testing on 3.11 (but it didn't block, since we didn't run with python -W error or sphinx -W yet), but it seems not.

Nope: hugovk@0e078fb

Did you try just -W ignore::DeprecationWarning? It looks like the stacklevel might be wrong on the warning so it could be coming from warning rather than imghdr, and I've had issues with modules not matching when they should from the CLI.

If that doesn't work,

Downgrade from Python 3.11 to 3.10 to avoid the deprecation warning (until it's fixed)

is the least bad option, IMO, since it avoids silencing any valid warnings and there isn't a strong pressing need to ensure this runs on 3.11, since AFAIK unlike e.g. the PEPs it doesn't have its own custom theme and Sphinx extensions.

@hugovk
Copy link
Member

hugovk commented Nov 11, 2022

Did you try just -W ignore::DeprecationWarning? It looks like the stacklevel might be wrong on the warning so it could be coming from warning rather than imghdr, and I've had issues with modules not matching when they should from the CLI.

Bingo! Please see PR #69.

Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Manuel Kaufmann <[email protected]>
Co-authored-by: C.A.M. Gerlach <[email protected]>
@encukou encukou merged commit 6cdde4e into python:main Nov 14, 2022
@encukou encukou deleted the 2022-11 branch November 14, 2022 14:27
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.

6 participants