GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-105096: Reformat wave documentation by vstinner · Pull Request #105136 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented May 31, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Add ".. class::" markups in the wave documentation.

  • Reformat also wave.py (minor PEP 8 changes).
  • Remove redundant "import struct": it's already imported at top level.
  • Issue: wave: Deprecate getmark(), setmark() and getmarkers() methods #105096

📚 Documentation preview 📚: https://cpython-previews--105136.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-105096: Reformat wave documentation
54825f4
Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
@bedevere-bot bedevere-bot added the awaiting core review label May 31, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 31, 2023
wave: Deprecate getmark(), setmark() and getmarkers() methods #105096
Closed
@vstinner

vstinner commented May 31, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@hugovk: I wrote this doc change to help me fixing PR #105098 doc warnings :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner commented May 31, 2023
View reviewed changes
Comment thread Doc/library/wave.rst
The :mod:`wave` module provides a convenient interface to the WAV sound format.
Only PCM encoded wave files are supported.
The :mod:`wave` module provides a convenient interface to the Waveform Audio
"WAVE" (or "WAV") file format. Only uncompressed PCM encoded wave files are

@vstinner vstinner May 31, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The wave.py file only uses "WAVE" name, whereas the doc only uses "WAV" name. The Wikipedia article is called "WAV" and says that the format is called "WAVE". The Python module is called "wave". I'm confused :-) https://en.wikipedia.org/wiki/WAV

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk and AlexWaygood reacted with laugh emoji
All reactions
  • 😄 2 reactions
@vstinner vstinner mentioned this pull request May 31, 2023
gh-105096: Deprecate wave getmarkers() method #105098
Merged
@hugovk hugovk added the skip news label May 31, 2023
@hugovk

hugovk commented May 31, 2023

Copy link
Copy Markdown
Member

Nice, just three Sphinx warnings left:


Warning: py:meth reference target not found: close
Warning: py:meth reference target not found: get*
Warning: py:meth reference target not found: set*

For the first one, I think we can just add an exclamation mark, because I don't think we know which close it is in this context?

For the last two, we can either add an exclamation mark (for example, :meth:!get*) or list the actual methods, but there's quite a lot, so !` is good.

When there's no longer any warnings in wave.rst, we can remove it from Doc/tools/.nitignore, then the CI won't allow new warnings back into wave.rst.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented May 31, 2023

Copy link
Copy Markdown
Member

Oh and let's backport this to 3.11, I'll add the labels.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels May 31, 2023
vstinner added 3 commits May 31, 2023 12:55
@vstinner
Fix 3 Sphinx warnings
fc2b220
@vstinner
Fix formatting
d6a87cf
@vstinner
Remove wave.rst from .nitignore
1c848ba
@vstinner

vstinner commented May 31, 2023

Copy link
Copy Markdown
Member Author

Nice, just three Sphinx warnings left:

Interesting. I tried to fix them.

For the last two, we can either add an exclamation mark

I used the lazy fix: I removed :meth: markup and use preformatted text instead.

I will wait for your new review. Tell me if you want further changes. The new code looks good: https://cpython-previews--105136.org.readthedocs.build/en/105136/library/wave.html#wave-read-objects

I'm not excited by wave.Wave_write documentation, but I was too lazy to come up with something better.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hugovk
hugovk approved these changes May 31, 2023
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks, a definite improvement!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 31, 2023
@vstinner
vstinner enabled auto-merge (squash) May 31, 2023 11:17
@vstinner
vstinner merged commit 85e5d03 into python:main May 31, 2023
@miss-islington

miss-islington commented May 31, 2023

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label May 31, 2023
@miss-islington

miss-islington commented May 31, 2023

Copy link
Copy Markdown
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 85e5d03163cac106ac8ec142ef03f1349a48948b 3.12

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington miss-islington assigned vstinner May 31, 2023
@miss-islington

miss-islington commented May 31, 2023

Copy link
Copy Markdown
Contributor

Sorry @vstinner, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 85e5d03163cac106ac8ec142ef03f1349a48948b 3.11

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner deleted the wave_doc branch May 31, 2023 11:39
vstinner added a commit to vstinner/cpython that referenced this pull request May 31, 2023
@vstinner
pythongh-105096: Reformat wave documentation (python#105136)
f612e69
Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03)
@bedevere-bot

bedevere-bot commented May 31, 2023

Copy link
Copy Markdown

GH-105138 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label May 31, 2023
@vstinner vstinner removed the needs backport to 3.11 only security fixes label May 31, 2023
vstinner added a commit that referenced this pull request May 31, 2023
@vstinner
[3.12] gh-105096: Reformat wave documentation (#105136) (#105138)
01b42f9
gh-105096: Reformat wave documentation (#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03)
@vstinner vstinner mentioned this pull request May 31, 2023
[3.11] gh-105096: Reformat wave documentation (#105136) (#105138) #105155
Merged
vstinner added a commit to vstinner/cpython that referenced this pull request May 31, 2023
@vstinner
[3.12] pythongh-105096: Reformat wave documentation (python#105136) (p…
6874b65
…ython#105138)

pythongh-105096: Reformat wave documentation (python#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03)
(cherry picked from commit 01b42f9)
vstinner added a commit that referenced this pull request May 31, 2023
@vstinner
[3.11] gh-105096: Reformat wave documentation (#105136) (#105138) (#1…
5de6ca5
…05155)

[3.12] gh-105096: Reformat wave documentation (#105136) (#105138)

gh-105096: Reformat wave documentation (#105136)

Add ".. class::" markups in the wave documentation.

* Reformat also wave.py (minor PEP 8 changes).
* Remove redundant "import struct": it's already imported at top
  level.
* Remove wave.rst from .nitignore

(cherry picked from commit 85e5d03)
(cherry picked from commit 01b42f9)
@erlend-aasland erlend-aasland mentioned this pull request Jun 6, 2023
3.12 backport gh 105236 #105358
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@vstinner vstinner

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vstinner @hugovk @miss-islington @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.