python / python/cpython

Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation

Open
#89,979 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extension-modules stdlib type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 45821
Nosy @abalkin, @pganssle, @AlexWaygood

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 2021-11-16.19:21:08.113>
labels = ['type-bug', '3.9', '3.10', '3.11', 'extension-modules', 'library']
title = 'Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation'
updated_at = <Date 2021-11-21.13:45:40.155>
user = 'https://github.com/AlexWaygood'

bugs.python.org fields:

activity = <Date 2021-11-21.13:45:40.155>
actor = 'AlexWaygood'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Extension Modules', 'Library (Lib)']
creation = <Date 2021-11-16.19:21:08.113>
creator = 'AlexWaygood'
dependencies = []
files = []
hgrepos = []
issue_num = 45821
keywords = []
message_count = 3.0
messages = ['406423', '406592', '406715']
nosy_count = 3.0
nosy_names = ['belopolsky', 'p-ganssle', 'AlexWaygood']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue45821'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Linked PRs
  • gh-136366

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing linked PR gh-136366 and the datetime module's Python and C implementations; the issue identifies a mismatch in which method parameters accept keywords. Compare the affected method signatures and verify that the positional-only behavior is consistent across implementations before checking the relevant datetime tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.