Skip to content

Remove unused FVS_* macros #160109

Closed
Closed

Description

@ericvsmith

Feature or enhancement

The macros FVS_MASK and FVS_HAVE_SPEC, which are defined in Include/ceval.h, are unused in the cpython code base. They are left over from the removal of the FORMAT_VALUE opcode in python 3.13: they were used to determine if an f-string had a format spec or not. I do not think they need a deprecation period: they were never documented, and any use of them would be unrelated to their original purpose.

I've discussed this with @vstinner who agreed that we don't need a deprecation period.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. vstinner commented on Oct 22, 2026

    @vstinner
    Member

    IMO we can remove these macros in Python 3.16. But maybe it would help affected users to document the removal in a Changelog entry (if there are affected users).

  2. anistark commented on Oct 28, 2026

    @anistark
    Contributor

    @ericvsmith I'd like to pick it up if nobody else is already working on it.

  3. vstinner commented on Nov 4, 2026

    @vstinner
    Member

    @ericvsmith: Do you plan to propose a PR to remove the macros?

  4. moontc commented on Nov 5, 2026

    @moontc
    Contributor

    it seems no one has submitted a PR so far, let me try it

  5. added a commit that references this issue on Nov 5, 2026
  6. vstinner commented on Nov 5, 2026

    @vstinner
    Member

    @moontc: Last week, @anistark already proposed working on a PR. Also, @ericvsmith is a core dev who created the issue, so it would be nice to wait for him to see if he wants to work on a PR. But well, it's not a big deal, the PR is straightforward, I just merged it.

  7. moontc commented on Nov 5, 2026

    @moontc
    Contributor

    @vstinner oh, thanks. you are right, I was indeed a bit hasty, I will keep this in mind from now on. sorry @ericvsmith @anistark ...

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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions