GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-141004: Document missing `PyDateTime*` APIs. by ZeroIntensity · Pull Request #141543 · python/cpython Conversation
|
|
|
||
| .. c:macro:: PyDateTime_IMPORT() | ||
|
|
||
| Import the datetime C API. The macro does not need a semi-colon to be called. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The macro does not need a semi-colon to be called.
This is wrong.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should've fact-checked this one before copy-pasting it. Good catch!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
|
This sounded familiar so I thought there was some reason that we didn't do it, but apparently I actually wanted to go even further than this and didn't get around to it / didn't drum up enough interest: #83785 I am tempted to say we should not say the thing about the struct contents being private and subject to change because there are situations where they are legitimately the only way to accomplish things and I am not crazy about the fact that our public interface is C macros anyway (given that those macros don't work outside of C++, I'd rather they be symbols that can be linked against in an FFI). Given the subinterpreter stuff, though, it might be a bit of an own goal to make the struct public right away before making a plan for how to move forward (in case the implementation details of the struct end up being inconvenient in that effort), so I'm +1 on the current scope of this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PyDateTime* APIs.PyDateTime* APIs.
Oh I forgot about that one! I've moved this PR under it, since it is more specific. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm fine with removing the note on the contents of
Please don't edit my PRs without my permission. I don't think this PR fits great under that issue; we're merely documenting that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PyDateTime* APIs.PyDateTime* APIs.
|
Apologies Peter. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
No I think we should leave it. If we later decide that we're going to officially expose them publicly without any changes we can always backport the docs changes to older versions to retroactively document it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I created #141563 for discussion on the global variable. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I just left minor suggestions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .. code-block:: | ||
|
|
||
| PyDateTime_IMPORT; | ||
| if (PyErr_Occurred()) { /* cleanup */ } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| if (PyErr_Occurred()) { /* cleanup */ } | |
| if (PyErr_Occurred()) { /* error */ } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I like the current comment, we do similar for the curses C API: https://docs.python.org/3/c-api/curses.html
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
|
Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit 4273616) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
GH-141791 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit 4273616) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
GH-141792 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…-141791) gh-141004: Document missing `PyDateTime*` APIs (GH-141543) (cherry picked from commit 4273616) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
…-141792) gh-141004: Document missing `PyDateTime*` APIs (GH-141543) (cherry picked from commit 4273616) Co-authored-by: Peter Bierma <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.