classification
Title: Inconsistency in exceptions for dataclasses.dataclass documentation
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: chriscog, docs@python, eric.smith, miss-islington, sanjioh
Priority: normal Keywords: patch

Created on 2018-06-25 21:54 by chriscog, last changed 2019-12-25 22:53 by eric.smith. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7917 merged python-dev, 2018-06-25 22:49
PR 17677 merged sanjioh, 2019-12-21 11:21
PR 17705 merged miss-islington, 2019-12-25 22:45
Messages (8)
msg320444 - (view) Author: Chris Cogdon (chriscog) * Date: 2018-06-25 21:54
The documentation for dataclasses.dataclass includes this text:

"If any of the added methods already exist on the class, a TypeError will be raised."

However, the documentation for various options has ONE case of TypeError, some cases of ValueError and other cases of "does nothing".

I'll attempt a fix and create a PR for this.
msg320451 - (view) Author: Chris Cogdon (chriscog) * Date: 2018-06-25 22:54
Also, one occurrence of s/:/;/

This is my First PR! I've read the contribution docs, but am very open to correction.
msg320452 - (view) Author: Chris Cogdon (chriscog) * Date: 2018-06-25 22:55
CLA signed.
msg320867 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2018-07-02 10:22
New changeset 24d74bd8377d38528566437e70fcd72229695ac7 by Eric V. Smith (Chris Cogdon) in branch '3.7':
bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917)
https://github.com/python/cpython/commit/24d74bd8377d38528566437e70fcd72229695ac7
msg358626 - (view) Author: Fabio Sangiovanni (sanjioh) * Date: 2019-12-18 13:43
Hi,

I was looking at the dataclasses docs and it seems to me that the PR associated to this issue has been merged into 3.7 only, but should be backported to 3.8 and to master.

I will post a comment on the PR itself as well.

Thanks,

Fabio
msg358873 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2019-12-25 22:45
New changeset e28aff54d95236ea1b64b648d89a1516e446e621 by Eric V. Smith (Fabio Sangiovanni) in branch 'master':
bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) (GH-17677)
https://github.com/python/cpython/commit/e28aff54d95236ea1b64b648d89a1516e446e621
msg358874 - (view) Author: miss-islington (miss-islington) Date: 2019-12-25 22:51
New changeset a5deabd8e43a76bf2d7923342b6c4395c1a5efcd by Miss Islington (bot) in branch '3.8':
bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) (GH-17677)
https://github.com/python/cpython/commit/a5deabd8e43a76bf2d7923342b6c4395c1a5efcd
msg358875 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2019-12-25 22:53
Thanks, all!
History
Date User Action Args
2019-12-25 22:53:17eric.smithsetmessages: + msg358875
2019-12-25 22:51:27miss-islingtonsetnosy: + miss-islington
messages: + msg358874
2019-12-25 22:45:43miss-islingtonsetpull_requests: + pull_request17152
2019-12-25 22:45:42eric.smithsetmessages: + msg358873
2019-12-21 11:21:40sanjiohsetpull_requests: + pull_request17137
2019-12-18 13:43:01sanjiohsetnosy: + sanjioh
messages: + msg358626
2019-02-22 07:54:16inada.naokisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-07-02 10:22:01eric.smithsetmessages: + msg320867
2018-06-25 22:55:38chriscogsetmessages: + msg320452
2018-06-25 22:54:10chriscogsetmessages: + msg320451
2018-06-25 22:49:42python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request7521
2018-06-25 22:11:29eric.smithsetnosy: + eric.smith

versions: + Python 3.8
2018-06-25 21:54:55chriscogcreate