This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年04月17日 23:55 by larry, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| larry.remove.no.capsule.hack.1.diff | larry, 2014年04月17日 23:55 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg216766 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2014年04月17日 23:55 | |
I noticed this code in Objects/object.c today: /* Hack to force loading of pycapsule.o */ PyTypeObject *_PyCapsule_hack = &PyCapsule_Type; What is this doing? Note that PyCapsule_Type is referred to inside _Py_ReadyTypes(), so there's already a reference to it from this module. This global seems redundant. Attached is a patch that removes it. Trunk compiles and all tests pass with it applied, though I only tried on 64-bit Linux so I concede if this is handling some obscure edge case I probably wouldn't have hit it. |
|||
| msg236625 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2015年02月25日 21:55 | |
I've taken a bit of a liberty and picked the names of the last three guys who've worked on this file as I assume they're best qualified to comment. |
|||
| msg236937 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2015年03月01日 06:44 | |
I'm inclined to suggest you try removing it and see what happens on the buildbots. I remember we used to have a few interesting challenges at my old job convincing Visual Studio that we really were using a type definition and we should export it from the DLL. That was way back in the VC6 days though, so I expect the situation has improved by now. Added Steve to the nosy list to see if he's aware of any current Windows specific reasons this might be needed. |
|||
| msg237051 - (view) | Author: Steve Dower (steve.dower) * (Python committer) | Date: 2015年03月02日 15:48 | |
No current reasons I'm aware of (apart from not having a working up-to-date Windows buildbot right now - blocked on #23524) so I'd say go ahead. Pull it out and see what breaks. The fact that the comment says "pycapsule.o" and not "pycapsule.obj" probably means this wasn't a Windows issue in the first place. |
|||
| msg237052 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2015年03月02日 15:52 | |
You give me too much credit. I'm the chimp who put it there in the first place. Though, admittedly, it was a copy&paste job based on the ancient CObject. My guess is this was very helpful in 1.4, or something. ;-) |
|||
| msg237059 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月02日 16:45 | |
New changeset b22755f8ab5f by Larry Hastings in branch 'default': Issue #21293: Remove unnecessary "capsule hack". https://hg.python.org/cpython/rev/b22755f8ab5f |
|||
| msg237060 - (view) | Author: Larry Hastings (larry) * (Python committer) | Date: 2015年03月02日 16:46 | |
Yeah, I went ahead and checked this in. I'm living life on the *edge*. To the EXTREME! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:02 | admin | set | github: 65492 |
| 2015年03月02日 16:46:51 | larry | set | status: open -> closed messages: + msg237060 assignee: larry resolution: fixed stage: patch review -> resolved |
| 2015年03月02日 16:45:40 | python-dev | set | nosy:
+ python-dev messages: + msg237059 |
| 2015年03月02日 15:52:41 | larry | set | messages: + msg237052 |
| 2015年03月02日 15:48:49 | steve.dower | set | messages: + msg237051 |
| 2015年03月01日 06:44:07 | ncoghlan | set | nosy:
+ steve.dower messages: + msg236937 |
| 2015年02月25日 21:55:50 | BreamoreBoy | set | nosy:
+ BreamoreBoy, vstinner, ncoghlan, pitrou messages: + msg236625 |
| 2014年04月17日 23:55:53 | larry | create | |