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 — The TypeError message from random.seed call has a seemingly unintentional newline in the middle · Issue #110050 · python/cpython

The TypeError message from random.seed call has a seemingly unintentional newline in the middle #110050

New issue
Copy link
New issue
Copy link
Closed
Closed
The TypeError message from random.seed call has a seemingly unintentional newline in the middle#110050
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@yilei
yilei
opened on Sep 28, 2023
Issue body actions

Bug report

Bug description:

>>> import random
>>> random.seed(random)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...lib/python3.12/random.py", line 167, in seed
    raise TypeError('The only supported seed types are: None,\n'
TypeError: The only supported seed types are: None,
int, float, str, bytes, and bytearray.

It appears that the newline in the middle added in #25874 isn't intentional.

I'll send a PR.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

  • gh-110050: Adjust the newline position in the TypeError message of the random.seed call. #110051
  • [3.12] gh-110050: Adjust the newline position in the TypeError message of the random.seed call. (GH-110051) #110625

Activity

  1. yilei
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Sep 28, 2023
  2. yilei
    added a commit that references this issue on Sep 28, 2023

    Fix python#110050: Use a space instead of newline in the TypeError me…

    This issue will close once commit 1425320 is merged into the 'main' branch.
    1425320
  3. ambv
    added a commit that references this issue on Oct 10, 2023

    gh-110050: Adjust the newline position in the TypeError message of th…

    ce43d5f
  4. miss-islington
    added a commit that references this issue on Oct 10, 2023

    pythongh-110050: Adjust the newline position in the TypeError message…

    3f21697
  5. iritkatriel
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Nov 24, 2023
  6. encukou commented on Mar 8, 2024

    @encukou
    encukou
    on Mar 8, 2024
    Member
    More actions

    Thank you for the fix!
    It won't appear in 3.12 as it could break code that relies on the old wording, but it did get into 3.13.

  7. encukou
    closed this as completedon Mar 8, 2024
  8. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-110050: Adjust the newline position in the TypeError message…

    cdb0c18
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

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      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.