Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

_pydatetime.datetime has extra unnecessary slots #109495

Closed
Labels
3.13bugs and security fixesperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directory
@Gobot1234

Description

@Gobot1234

Bug report

Bug description:

Pre patch

from_pydatetimeimportdatetimeimportsyssys.getsizeof(datetime(1970,1,1))# 152

Post patch

from_pydatetimeimportdatetimeimportsyssys.getsizeof(datetime(1970,1,1))# 120

I had a look round for any other cases of this but couldn't find any just using a simple GitHub search. It might in the future be useful to usehttps://github.com/ariebovenberg/slotscheck (which I wasn't personally able to figure out how to run on cpython) in CI to prevent things like this in the future.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixesperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directory

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp