bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API#1362
bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API#1362ncoghlan merged 55 commits into
Conversation
|
@ma8ma, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mhammond, @serhiy-storchaka and @loewis to be potential reviewers. |
Sorry, something went wrong.
See PEP 539 for details. highlights of changes: - Add Thread Specific Storage (TSS) API - Add test for transitions of the thread key state. - Mark deprecation to Thread Local Storage (TLS) API - Replace codes that used TLS API with TSS API
|
Uh are you rebasing? I made that mistake before. The latest dev guide says to not rebase but include all commits which would then be merged as a single commit. |
Sorry, something went wrong.
|
@AraHaan Yes, PR is single commit. I confirmed AppVeyor build failed, and retried push in a minute. But it has failed again, I need help for Windows platform... |
Sorry, something went wrong.
|
It seems to be something with the solution or project settings or even AppVeyor's setting. Will investigate more when I can use the internet on my Inspiron 1545 that has Windows 7 Ultimate SP1 x64 and VS2015 installed. It seems that in the project settings is set to use the Windows sdk for 8.1 instead of for 10. Also when targeting for 10.0 I recommend staticallylinking the ucrt for the versions of Windows that can't install it (Vista). Also it allows flexibility and usability on fresh installs of 7 and Vista do that is another reason why I recommend it. |
Sorry, something went wrong.
ncoghlan
left a comment
There was a problem hiding this comment.
This looks excellent to me as a solution for the standard ABI, but I realised in reviewing it that the stable ABI poses a potential problem: we don't want to expose the Py_tss_t definition in that case, but making the API usable with an opaque type definition would require a few changes (details inline).
Sorry, something went wrong.
38138e2 to
dff0a13
Compare
May 7, 2017 13:16
|
In Windows, the module-definition (.def) file for limited API (python3.dll) doesn't have the TSS API (also the TLS API), therefore, Edit (2017-05-13): Add WIP commit for Windows ABI |
Sorry, something went wrong.
1c98d1b to
5b9b417
Compare
May 13, 2017 12:37
56d660b to
23a6e59
Compare
June 13, 2017 14:05
Resolve conflicts: fdaeea6 bpo-30279: Remove unused Python/thread_foobar.h (python#1473)
Resolve conflcts: ab4413a bpo-30039: Don't run signal handlers while resuming a yield from stack (python#1081)
Resolve conflicts: 346cbd3 bpo-16500: Allow registering at-fork handlers (python#1715)
The code has been moved from Modules/signalmodule.c. (346cbd3)
Resolve conflicts: f7ecfac Doc nits for bpo-16500 (python#1841)
Resolve conflicts: 3b5cf85 bpo-30524: Write unit tests for FASTCALL (python#2022)
|
@ncoghlan Thank you for the explanation. I don't think there is any problem, so I add the TSS API in the Windows stable ABI. |
Sorry, something went wrong.
- overview - the existing TLS API (without descripiton) - the new TSS API - type and macro - dynamic allocation - methods
Several comments is no longer necessary by API document.
New order is along API document.
|
I updated this PR to add API document. Sources of the API description are:
Documents rendered by github: |
Sorry, something went wrong.
ncoghlan
left a comment
There was a problem hiding this comment.
This is looking very good to me. I'm going to go through and make some edits to the docs updates, and add in the required limited API version check, but after that I think this should be ready to merge.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
Sorry, something went wrong.
|
Oops, the required macro version check is there, it just wasn't visible in the subset of changes I was looking at - so I'll just make the docs tweaks, and then this will be ready to merge. |
Sorry, something went wrong.
|
Great! I was just about to say, since |
Sorry, something went wrong.
|
@embray I think it's good to go once the latest CI run finishes, but another set of eyes looking over the changes wouldn't hurt (if it's just docs comments though, then it would probably make sense to defer those to a new PR so we can restore Cygwin compatibility in the meantime) |
Sorry, something went wrong.
Sorry, something went wrong.
This link doesn't seem to be working for me. I'm also watching other videos on YouTube currently so this seems to be this specific URL. |
Sorry, something went wrong.

Do not merge until approved the PEP final!Update (2017-09-09): PEP 539 has been accepted.
Thread Specific Storage (TSS) API
Implement PEP 539 for Thread Specific Stroage (TSS) API: it is a new Thread Local Storage (TLS) API to CPython which would supersede use of the existing TLS API within the CPython interpreter, while deprecating the existing API.
Highlights of changes
[TEMP] Add an example function toxxlimitedmodulehttps://bugs.python.org/issue25658