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 — [doc] Clarify copyreg.pickle() documentation · Issue #65022 · python/cpython

[doc] Clarify copyreg.pickle() documentation #65022

New issue
Copy link
New issue
Copy link
Closed
Closed
[doc] Clarify copyreg.pickle() documentation#65022
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc direasytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

peterotten
mannequin
opened on Mar 2, 2014
Issue body actions
BPO 20823
Nosy @serhiy-storchaka, @miss-islington, @kumaraditya303
PRs
  • bpo-20823: Clarify copyreg.pickle() documentation #30230
  • [3.10] bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) #30669
  • [3.9] bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) #30670
  • Files
  • copyreg.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2014-03-02.08:46:06.048>
    labels = ['easy', 'type-bug', '3.9', '3.10', '3.11', 'docs']
    title = '[doc] Clarify copyreg.pickle() documentation'
    updated_at = <Date 2022-01-18.20:17:10.000>
    user = 'https://bugs.python.org/peterotten'

    bugs.python.org fields:

    activity = <Date 2022-01-18.20:17:10.000>
    actor = 'miss-islington'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2014-03-02.08:46:06.048>
    creator = 'peter.otten'
    dependencies = []
    files = ['34263']
    hgrepos = []
    issue_num = 20823
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['212541', '288092', '296271', '410883', '410884', '410885']
    nosy_count = 5.0
    nosy_names = ['peter.otten', 'docs@python', 'serhiy.storchaka', 'miss-islington', 'kumaraditya']
    pr_nums = ['30230', '30669', '30670']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20823'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Linked PRs

    • GH-65022: Fix description of copyreg.pickle function #102656
    • gh-65022: Fix description of tuple return value in copyreg #103892
    • [3.11] gh-65022: Fix description of tuple return value in copyreg (GH-103892) #104098

    Activity

    Next
    1. peterotten commented on Mar 2, 2014

      @peterotten
      peterottenmannequin
      on Mar 2, 2014
      MannequinAuthor
      More actions

      The documentation for

      copyreg.pickle(type, function, constructor=None)

      has the sentence

      "TypeError will be raised if *object* is a class or *constructor* is not callable."

      It's not clear to me what "object" refers to. I believe it refers to the first arg (called ob_type in 2.x) and classic classes which were handled with

      def pickle(ob_type, pickle_function, constructor_ob=None):
          if type(ob_type) is _ClassType:
              raise TypeError("copy_reg is not intended for use with classes")

      in 2.x If I'm right the above sentence should become.

      "A TypeError will be raised if *constructor* is not callable."

      in 3.x. If I'm wrong please think of way to express the intended meaning more clearly.

      Another minor change: class C need not inherit from object explicitly in 3.x.

    2. peterotten
      assigned
      docspython
      on Mar 2, 2014
    3. peterotten
      added
      docsDocumentation in the Doc dirDocumentation in the Doc dir
      on Mar 2, 2014
    4. serhiy-storchaka commented on Feb 18, 2017

      @serhiy-storchaka
      serhiy-storchaka
      on Feb 18, 2017
      Member
      More actions

      The phrase "*function* should return either a string or a tuple containing two or three elements." de-facto is outdated too. Since Python 2.3 a tuple returned by the function must have two to five elements.

      copyreg.constructor() no longer does anything useful, and the constructor parameter of copyreg.pickle() is virtually ignored.

    5. serhiy-storchaka
      added
      3.7 (EOL)end of lifeend of life
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Feb 18, 2017
    6. serhiy-storchaka commented on Jun 18, 2017

      @serhiy-storchaka
      serhiy-storchaka
      on Jun 18, 2017
      Member
      More actions

      Could you update your patch Peter, and since CPython development is moved to GitHub, create a pull request?

    7. iritkatriel
      added
      easy
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      3.11only security fixesonly security fixes
      and removed
      3.7 (EOL)end of lifeend of life
      on Dec 9, 2021
    8. iritkatriel
      changed the title [-]Clarify copyreg.pickle() documentation[/-] [+][doc] Clarify copyreg.pickle() documentation[/+] on Dec 9, 2021
    9. serhiy-storchaka commented on Jan 18, 2022

      @serhiy-storchaka
      serhiy-storchaka
      on Jan 18, 2022
      Member
      More actions

      New changeset 65940fa by Kumar Aditya in branch 'main':
      bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
      65940fa

    10. miss-islington commented on Jan 18, 2022

      @miss-islington
      miss-islington
      on Jan 18, 2022
      Contributor
      More actions

      New changeset 9238a52 by Miss Islington (bot) in branch '3.10':
      bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
      9238a52

    11. 7 remaining items

    12. nanjekyejoannah
      added a commit that references this issue on Apr 24, 2023

      GH-65022: Fix description of copyreg.pickle function (#102656)

      0421ed4
    13. nanjekyejoannah commented on Apr 24, 2023

      @nanjekyejoannah
      nanjekyejoannah
      on Apr 24, 2023
      Contributor
      More actions

      @serhiy-storchaka can decide when to close this, @furkanonder the doc update is merged.

      Reacted by Furkan Onder
    14. carljm
      added 2 commits that reference this issue on Apr 24, 2023

      Merge branch 'main' into superopt

      19b8025

      Merge branch 'superopt' into superopt_spec

      1972ca4
    15. hauntsaninja commented on Apr 26, 2023

      @hauntsaninja
      hauntsaninja
      on Apr 26, 2023
      Contributor
      More actions

      @nanjekyejoannah @furkanonder I don't think the change in #102656 is correct. The tuple can also be three, four, or six elements, not just "two or five"

      From https://docs.python.org/3/library/pickle.html

      When a tuple is returned, it must be between two and six items long. Optional items can either be omitted, or None can be provided as their value. The semantics of each item are in order:

      Opened a PR for this in #103892

    16. hauntsaninja
      added 6 commits that reference this issue on Apr 26, 2023

      pythongh-65022: Fix description of tuple return value in copyreg

      3851907

      gh-65022: Fix description of tuple return value in copyreg (#103892)

      587f2f0

      pythongh-65022: Fix description of tuple return value in copyreg (pyt…

      f1d2637

      [3.11] pythongh-65022: Fix description of tuple return value in copyr…

      2d19a7f

      [3.11] pythongh-65022: Fix description of tuple return value in copyr…

      f529153

      [3.11] gh-65022: Fix description of tuple return value in copyreg (GH…

      f9231a0
    17. hauntsaninja
      closed this as completedon May 2, 2023
    18. github-project-automation
      moved this to Done in Pickle and copy issues 🥒on May 2, 2023
    19. carljm
      added 2 commits that reference this issue on May 2, 2023

      Merge branch 'main' into inlinecomp2

      0727d6f

      Merge branch 'main' into cached_property_docs

      b9c39e3
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc direasytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      • Pickle and copy issues 🥒
        Status
        Done
        Show more project fields

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.