Skip to content

csv module should use PyUnicodeWriter #138270

Closed as not planned
Closed as not planned

Description

@maurycy

Bug report

Bug description:

csv.writer does a lot of manual buffer manipulations:

I believe that big parts of this is no longer needed, since 3.14 and introduction of PyUnicodeWriter:

gh-125196 seems to be a catch-all for using the new API but I believe it's missing the csv module.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    performancePerformance or resource usage
    type-refactorCode refactoring (with no changes in behavior)
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Aug 30, 2025
  2. maurycy commented on Mar 23, 2026

    @maurycy
    ContributorAuthor

    Is this an issue or a prescription of the implementation?

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

    extension-modulesC modules in the Modules dirperformancePerformance or resource usagetype-refactorCode refactoring (with no changes in behavior)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions