Skip to content

bpo-34512: Document platform-specific strftime() behavior for non-ASC…#8948

Merged
taleinat merged 2 commits intopython:masterfrom
izbyshev:bpo-34512
Jan 12, 2019
Merged

bpo-34512: Document platform-specific strftime() behavior for non-ASC…#8948
taleinat merged 2 commits intopython:masterfrom
izbyshev:bpo-34512

Conversation

@izbyshev
Copy link
Contributor

@izbyshev izbyshev commented Aug 26, 2018

…II format strings

https://bugs.python.org/issue34512

some platforms such code points are preserved intact in the output, while on
others ``strftime`` may raise :exc:`UnicodeError` or return an empty string
instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't mentioned surrogate code points and surrogateescape error handler. Not sure whether we want to go to that level of detail.

time module docs should also be changed when/if we reach consensus on the wording.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree that we should avoid mentioning surrogates given the proposed wording.

@pganssle
Copy link
Member

Presumably this can be backported as far back as is supported at the moment, since this is a long-standing issue.

variations are common. To see the full set of format codes supported on your
platform, consult the :manpage:`strftime(3)` documentation.

Likewise, handling of format strings containing Unicode code points that can't
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: "Likewise" -> "For the same reason"

platform, consult the :manpage:`strftime(3)` documentation.

Likewise, handling of format strings containing Unicode code points that can't
be represented in the charset of the current locale is platform-dependent. On
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... is also platform-dependent."

@izbyshev
Copy link
Contributor Author

@taleinat Thank you for the review! I've made the requested changes.

@vstinner
Copy link
Member

I removed the " needs backport to 3.6" label, the 3.6 branch no longer accept bugfixes (only security fixes are accepted): https://devguide.python.org/#status-of-python-branches

@taleinat taleinat merged commit 1cffd0e into python:master Jan 12, 2019
@miss-islington
Copy link
Contributor

Thanks @izbyshev for the PR, and @taleinat for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-11535 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2019
…II format strings (pythonGH-8948)

(cherry picked from commit 1cffd0e)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
@bedevere-bot
Copy link

GH-11536 is a backport of this pull request to the 2.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 12, 2019
…II format strings (pythonGH-8948)

(cherry picked from commit 1cffd0e)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
miss-islington added a commit that referenced this pull request Jan 12, 2019
…II format strings (GH-8948)

(cherry picked from commit 1cffd0e)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
miss-islington added a commit that referenced this pull request Jan 12, 2019
…II format strings (GH-8948)

(cherry picked from commit 1cffd0e)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants