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 — Add PyUnicodeWriter API by vstinner · Pull Request #95 · python/pythoncapi-compat

Conversation

@vstinner

@vstinner vstinner commented May 22, 2024

Copy link
Copy Markdown
Member

TODO: update API doc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner

vstinner commented May 22, 2024

Copy link
Copy Markdown
Member Author

Wait until python/cpython#119184 is merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner force-pushed the writer branch from 296c606 to b053c89 Compare May 22, 2024 22:58
@vstinner vstinner mentioned this pull request May 22, 2024
[C API] Add an efficient public PyUnicodeWriter API python/cpython#119182
Closed
@vstinner
WIP: Add PyUnicodeWriter API
f1cffbb
TODO: update API doc.
@vstinner
vstinner force-pushed the writer branch from b053c89 to f1cffbb Compare July 18, 2024 20:57
@vstinner vstinner changed the title WIP: Add PyUnicodeWriter API Add PyUnicodeWriter API Jul 18, 2024
@vstinner
vstinner marked this pull request as ready for review July 18, 2024 20:57
@vstinner
vstinner merged commit 4094c64 into python:main Jul 18, 2024
@vstinner
vstinner deleted the writer branch July 18, 2024 20:59
@seberg

seberg commented Aug 6, 2024

Copy link
Copy Markdown

It seems to me that PyUnicodeWriter_WriteRepr and PyUnicodeWriter_WriteStr are missing the static inline to ensure multiple includes don't collide?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Aug 6, 2024

Copy link
Copy Markdown
Member Author

It seems to me that PyUnicodeWriter_WriteRepr and PyUnicodeWriter_WriteStr are missing the static inline to ensure multiple includes don't collide?

Oops, fixed by #104.

seberg reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Rogdham

Rogdham commented Jun 20, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
#if PY_VERSION_HEX < 0x030E0000 && PY_VERSION_HEX >= 0x03060000 && !defined(PYPY_VERSION)
// snip
PyErr_Format(PyExc_TypeError, "expect str, not %T", str);

I did not experience the issue myself, but I think the %T format was introduced in gha-116839 (PEP-737), so may not be available on all versions of CPython?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jun 24, 2025

Copy link
Copy Markdown
Member Author

@Rogdham:

I did not experience the issue myself, but I think the %T format was introduced in python/cpython#116839 (PEP-737), so may not be available on all versions of CPython?

Oops, well spotted: I created #146 to fix the issue.

Rogdham reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vstinner @seberg @Rogdham
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.