Skip to content

Re-implement parts of imp in pure Python #58167

Closed

Description

@brettcannon
BPO 13959
Nosy @brettcannon, @birkenfeld, @pitrou, @vstinner, @benjaminp, @merwok, @meadori, @ericsnowcurrently, @berkerpeksag
PRs
  • bpo-32030: pass interp to _PyImport_Init() #4736
  • Dependencies
  • bpo-2377: Replace import w/ importlib.import
  • bpo-14605: Make import machinery explicit
  • bpo-14657: Avoid two importlib copies
  • bpo-15166: Implement imp.get_tag() using sys.implementation
  • bpo-15167: Re-implement imp.get_magic() in pure Python
  • Files
  • imp.diff
  • imp.diff
  • use_of_imp.txt: stdlib modules that use imp (could be refactored to use importlib)
  • imp_find_module.diff: sketch of find_module() implementation
  • issue13959_reload.diff: port of _imp.reload() to imp.py
  • issue13959_magic_and_tag.diff: one approach to moving the magic and tag code out of import.c
  • explicit_meta_path.diff
  • explicit_path_hooks.diff
  • issue13959_magic.diff: porting MAGIC to importlib
  • issue13959_tag.diff: porting TAG to importlib
  • imptest.py
  • issue13959_get_tag.diff: new TAG implementation using sys.implementation
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/brettcannon'
    closed_at = <Date 2012-07-09.20:23:48.007>
    created_at = <Date 2012-02-07.00:51:29.679>
    labels = ['library', 'release-blocker']
    title = 'Re-implement parts of imp in pure Python'
    updated_at = <Date 2017-12-06.16:25:57.617>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2017-12-06.16:25:57.617>
    actor = 'vstinner'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2012-07-09.20:23:48.007>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2012-02-07.00:51:29.679>
    creator = 'brett.cannon'
    dependencies = ['2377', '14605', '14657', '15166', '15167']
    files = ['24846', '24979', '24980', '25250', '25302', '25303', '25308', '25309', '25335', '25336', '25834', '26058']
    hgrepos = []
    issue_num = 13959
    keywords = ['patch']
    message_count = 76.0
    messages = ['152800', '155790', '156473', '156474', '156475', '156527', '156530', '156964', '158269', '158362', '158364', '158365', '158370', '158371', '158377', '158383', '158398', '158474', '158522', '158531', '158555', '158575', '158593', '158594', '158622', '158628', '158704', '158895', '158908', '158930', '158931', '158939', '158941', '158951', '158955', '158968', '158971', '158985', '158986', '158995', '158998', '158999', '159118', '159119', '159628', '159630', '159631', '159641', '159644', '159757', '159758', '159960', '159962', '159969', '160424', '160433', '160434', '160439', '160493', '160495', '160524', '162276', '162356', '162357', '162364', '162384', '162940', '163212', '163232', '163569', '163798', '164102', '165116', '165120', '165148', '307747']
    nosy_count = 12.0
    nosy_names = ['brett.cannon', 'georg.brandl', 'jpe', 'pitrou', 'vstinner', 'benjamin.peterson', 'eric.araujo', 'Arfrever', 'meador.inge', 'python-dev', 'eric.snow', 'berker.peksag']
    pr_nums = ['4736']
    priority = 'release blocker'
    resolution = 'fixed'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue13959'
    versions = ['Python 3.3']

    Activity

    1. python-dev commented on Apr 15, 2012

      python-devmannequin
      Mannequin

      New changeset 4dce3afc392c by Brett Cannon in branch 'default':
      Issue bpo-13959: Simplify imp.reload() by relying on a module's
      http://hg.python.org/cpython/rev/4dce3afc392c

    2. brettcannon commented on Apr 15, 2012

      @brettcannon
      MemberAuthor

      I am seeing how this is going to go down. the load_dynamic, load_source, etc. family of functions are simply dispatched to by load_module(). So to keep some semblance of backwards-compatibility, each of those modules need to be implemented and then have load_module() simply dispatch to them based on the "type" of module it is.

    3. python-dev commented on Apr 16, 2012

      python-devmannequin
      Mannequin

      New changeset 2df37938b8e1 by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.load_module() in imp.py.
      http://hg.python.org/cpython/rev/2df37938b8e1

    4. python-dev commented on Apr 16, 2012

      python-devmannequin
      Mannequin

      New changeset 4256df44023b by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.load_package() in imp.py.
      http://hg.python.org/cpython/rev/4256df44023b

    5. brettcannon commented on Apr 16, 2012

      @brettcannon
      MemberAuthor

      From Eric Smith on python-dev:

      • suffix, mode, type_ = details
      • if mode and (not mode.startswith(('r', 'U'))) or '+' in mode:
      •    raise ValueError('invalid file open mode {!r}'.format(mode))
        

      Should this be:
      if mode and (not mode.startswith(('r', 'U')) or '+' in mode):

      to match:

      • if (*mode) {
        ...
      •    if (!(*mode == 'r' || \*mode == 'U') || strchr(mode, '+')) {
        
      •        PyErr_Format(PyExc_ValueError,
        
      •                     "invalid file open mode %.200s", mode);
        
    6. python-dev commented on Apr 17, 2012

      python-devmannequin
      Mannequin

      New changeset 3b5b4b4bb43c by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.load_source() in imp.py.
      http://hg.python.org/cpython/rev/3b5b4b4bb43c

    7. ericsnowcurrently commented on Apr 17, 2012

      @ericsnowcurrently
      Member

      This is a mostly-working sketch of find_module() in imp.py. I've run out of time tonight, but wanted to get it up in case it's useful to anyone else (a.k.a Brett). If nobody's touched it before then, I'll finish it up tomorrow.

    8. brettcannon commented on Apr 17, 2012

      @brettcannon
      MemberAuthor

      I doubt I will beat you to it, Eric, but I did want to say that your overall design was what I had in my head when I was thinking about how to re-implement the function, so keep at it!

    9. python-dev commented on Apr 17, 2012

      python-devmannequin
      Mannequin

      New changeset 66bd85bcf916 by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.load_compiled() in imp.py.
      http://hg.python.org/cpython/rev/66bd85bcf916

    10. ericsnowcurrently commented on Apr 18, 2012

      @ericsnowcurrently
      Member

      2 "problems" with that last patch:

      • the types of the loaders that get returned by _bootstrap._find_module() are not the classes in _bootstrap (e.g. _frozen_importlib._SourceFileLoader). That doesn't smell right.
      • tokenize.get_encoding? is saying that Lib/test/badsyntax_pep3120.py has an encoding of utf-8, when test_find_module_encoding is expecting it to not. So does PyTokenizer_FindEncodingFilename (which the old import code used) behaving differently than tokenize.get_encoding()? FYI, tokenize.get_encoding() is what importlib uses...
    11. ericsnowcurrently commented on Apr 18, 2012

      @ericsnowcurrently
      Member

      rather, tokenize.detect_encoding()

    12. brettcannon commented on Apr 18, 2012

      @brettcannon
      MemberAuthor

      You could change Lib/imp.py to have import _frozen_importlib as _bootstrap if you want the same modules coming from imp, but I would argue against changing importlib itself being changed as that complicates development since if you screw up importlib._bootstrap when you compile it becomes a major pain to revert the importlib.h change, recompile, and continue to do that until you get it right. Plus you would only care about this if you are doing isinstance() checks on what kind of loader you have which you shouldn't care about since we have clearly defined ABCs to test against.

      As for Lib/test/badsyntax_pep3120.py, it *does* have a source encoding of UTF-8 since it does not explicitly specify an encoding. Based on the name I'm assuming the file itself has bad UTF-8 characters, but that doesn't mean that the file is not supposed to be interpreted as UTF-8.

    13. ericsnowcurrently commented on Apr 18, 2012

      @ericsnowcurrently
      Member

      On the _frozen_importlib point, I'm fine with that. It was just counter-intuitive that the importlib._bootstrap functions were returning loaders whose classes weren't also defined there.

      I'll have another look at that test tonight and run the patch through the full test suite, but otherwise I think find_module() is basically done.

    14. ericsnowcurrently commented on Apr 19, 2012

      @ericsnowcurrently
      Member

      Looking it over, I'm confident that tokenizer.detect_encoding() does not raise a SyntaxError where PyTokenizer_FindEncodingFilename() does. I've run out of time tonight, but I'll look at it more tomorrow.

      Once find_module() is done, I'd like to move on to reload(), which I expect will be pretty straightforward at this point. Then the feasibility of bpo-14618 should be clear.

    15. python-dev commented on Apr 20, 2012

      python-devmannequin
      Mannequin

      New changeset c820aa9c0c00 by Brett Cannon in branch 'default':
      Issue bpo-13959: Keep imp.get_magic() in C code, but cache in importlib
      http://hg.python.org/cpython/rev/c820aa9c0c00

    16. ericsnowcurrently commented on Apr 21, 2012

      @ericsnowcurrently
      Member

      I'd still like to consider this a bit more. When you're trying to understand imports, having one place to look (Lib/importlib/_bootstrap.py) is better than two, especially when the one is pure Python code. So it still may be worth it to pull in the odds and ends that play into that.

    17. python-dev commented on Apr 21, 2012

      python-devmannequin
      Mannequin

      New changeset b773a751c2e7 by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.cache_from_source() in Lib/imp.py.
      http://hg.python.org/cpython/rev/b773a751c2e7

      New changeset ea46ebba8a0f by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.source_from_cache() in Lib/imp.py.
      http://hg.python.org/cpython/rev/ea46ebba8a0f

    18. brettcannon commented on Apr 21, 2012

      @brettcannon
      MemberAuthor

      Time for a recap!

      I am personally not bothering with moving imp.get_tag() and imp.get_magic() to importlib._bootstrap as the amount of C code required to support the public C API is not worth it. If someone else once to do the work then by all means attach a patch.

      I still need to port imp.find_module() (and the various constants) and will base it off of Eric's code.

      NullImporter will get ported once issue bpo-14605 (exposing the import machinery) lands.

      get_suffixes() will also get ported, but that is a little bit more involved as I need to change how _DynLoadFiletab works by only storing the file extensions and not the other fluff (which is the same for all OSs).

      After all of that is done then I will expose some API in importlib to replace find_module() and load_*() functions and then deprecate them (see issue bpo-14551 for an ongoing discussion the possible API).

    19. self-assigned this
      on Apr 21, 2012
    20. ericsnowcurrently commented on Apr 22, 2012

      @ericsnowcurrently
      Member

      Yeah, I'm hoping to keep pressing those odds and ends forward. I have one lingering, oddball bug in find_module, but that patch is pretty much standing on its own.

    21. python-dev commented on Apr 22, 2012

      python-devmannequin
      Mannequin

      New changeset 085cf1480cfe by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.find_module() in Lib/imp.py.
      http://hg.python.org/cpython/rev/085cf1480cfe

    22. ericsnowcurrently commented on Apr 22, 2012

      @ericsnowcurrently
      Member

      Ported _imp.reload() (Python/import.c) to Lib/imp.py. Included is the change to PyImport_ReloadModule() to make it simply a wrapper around the pure Python imp.reload(). There's a good chance I don't have this right or that I have some reference leak. I haven't worked a ton on the C side of Python (sounds tropical). This patch also removes 'modules_reloading' from the interpreter state, since it's no longer used anywhere (see bpo-14618).

    23. ericsnowcurrently commented on Apr 22, 2012

      @ericsnowcurrently
      Member

      A patch for magic and tag. It's not quite finished, but I wanted to see if the approach was palatable. FYI, I'm also trying to push forward the sys.implementation stuff, which would help on the pyc tag.

    24. ericsnowcurrently commented on Apr 22, 2012

      @ericsnowcurrently
      Member

      After thinking about it, is MAGIC an implementation detail? It certainly reflects changes specific to the CPython interpreter. I'm much more comfortable with leaving implementation details in Python/import.c.

      On the other hand, there's already no small amount of rather CPython-specific stuff in Lib/importlib/_bootstrap.py, which belongs there. The pyc magic bytes are tightly coupled with it. Because of that, I realize, I'm still fine with the patch.

      But it makes me wonder if it might be worth having a clear separation between the general and CPython-specific stuff in _bootstrap.py, for the sake of people who look at the code for the first (or tenth) time. That's the same rationale I have for advocating moving as much over from import.c as relates to the importlib implementation.

    25. python-dev commented on Apr 22, 2012

      python-devmannequin
      Mannequin

      New changeset 4e853913054c by Brett Cannon in branch 'default':
      Issue bpo-13959: Continue to try to accomodate altsep in importlib by not
      http://hg.python.org/cpython/rev/4e853913054c

    26. brettcannon commented on Apr 22, 2012

      @brettcannon
      MemberAuthor

      First off, you should separate the patches for get_magic() and get_tag(). Second, why is there _get_pyc_magic_int() when it is never called? Third, all of this would be greatly simplified if you just had a _RAW_MAGIC_NUMBER of 3220, did the bytes object creation for _MAGIC_NUMBER in-place (i.e. no separate function), and then in the C code just got _RAW_MAGIC_NUMBER and did the MAGIC macro work there.

      As for what is CPython-specific and what isn't, only the other VMs can state that officially, so I'm not going to worry about that yet (but I will ask before Python 3.3 goes out so as to minimize backporting patches in the future). But importlib needs to stabilize more before that can happen.

    27. ericsnowcurrently commented on Apr 22, 2012

      @ericsnowcurrently
      Member

      Good feedback. The some of that code was the result of directly translating the C. I'll get a new, simpler patch up probably tomorrow night. Thanks.

    28. ericsnowcurrently commented on Apr 23, 2012

      @ericsnowcurrently
      Member

      How consistent do the semantics of reload() need to remain? (The C version does more type checking than the Python version probably needs to worry about. reload() seems to be one of those bits that doesn't have much test coverage.)

      Also, what's the best way to exercise the changes one makes to the C code?

    29. brettcannon commented on Apr 23, 2012

      @brettcannon
      MemberAuthor

      Loosening the type restrictions is fine.

      As for testing, that's what the test suite is supposed to do. So if need be just write tests in Python that exercise the C code.

    30. brettcannon commented on Apr 23, 2012

      @brettcannon
      MemberAuthor

      To try and narrow down the issue, I now have separate patches for an explicit sys.meta_path and a sys.path_hooks. Both fail on tests, but for different reasons.

      The explicit sys.meta_path is still failing on the __main__ issue on three of the tests and for threaded imports on the other.

      The explicit sys.path_hooks patch fails on two tests: one on threading and then test_cmd_line_script on apparently lacking an absolute file path thanks to issue bpo-8202 (and why an explicit sys.path_hooks triggers that I don't know).

      Both failures Nick might know about.

    31. ericsnowcurrently commented on Apr 24, 2012

      @ericsnowcurrently
      Member

      updated patch for magic number support in imp/importlib

    32. ericsnowcurrently commented on Apr 24, 2012

      @ericsnowcurrently
      Member

      updated patch for moving TAG to importlib/imp.py

    33. python-dev commented on Apr 29, 2012

      python-devmannequin
      Mannequin

      New changeset eb5c5c23ca9b by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.NullImporter in Lib/imp.py.
      http://hg.python.org/cpython/rev/eb5c5c23ca9b

    34. brettcannon commented on Apr 29, 2012

      @brettcannon
      MemberAuthor

      Update time!

      With NullImporter dealt with, that leaves get_magic(), get_tag(), reload(), and get_suffixes() as things to potentially move to Lib/imp.py. I would also like to re-implement PyImport_ExecCodeModuleObject() as it's keeping a lot of C code alive just for its personal use.

    35. merwok commented on Apr 29, 2012

      @merwok
      Member

      1659 lines less than 3.2’s import.c so far!

    36. python-dev commented on Apr 29, 2012

      python-devmannequin
      Mannequin

      New changeset eb68502731dd by Brett Cannon in branch 'default':
      Issues bpo-13959, 14647: Re-implement imp.reload() in Lib/imp.py.
      http://hg.python.org/cpython/rev/eb68502731dd

    37. brettcannon commented on Apr 29, 2012

      @brettcannon
      MemberAuthor

      So here is the deal with PyImport_ExecCodeModuleObject(): bootstrapping and Barry has made this a little annoying. =)

      First off, PyImport_ImportFrozenModuleObject() uses PyImport_ExecCodeModuleObject(), so that precludes just directly importing imp to handle this function entirely. OK, so that means just trying to chop out the path manipulation stuff since that is duplicating code found in imp/importlib.

      The problem, though, is that PyImport_ExecCodeModuleWithPathnames() will take its pathname argument and try to get a source path from it if it points to some .pyc file (PEP-3147 or sourceless .pyc, and if that new path exists then it is used instead of the given path. Unfortunately that API was introduced in Python 3.2, so there is a backwards-compatibility issue in that one can't just rip out the code w/o supporting it. But those semantics are the reason the equivalent of imp.source_from_cache() continues to exist in Python/import.c.

      I see two options here. One is to simply leave the C code in, but that has the drawback of duplicated Python and C code. Two is to stick in a call to imp.source_from_cache() between PyImport_ExecCodeModuleWithPathnames() and PyImport_ExecCodeModuleObject() so the former retains the semantics and the latter doesn't pick up the bad habit before 3.3 is released.

    38. benjaminp commented on May 1, 2012

      @benjaminp
      Contributor
    39. brettcannon commented on May 1, 2012

      @brettcannon
      MemberAuthor

      That test is going to stay intermittent until issue bpo-14657 gets resolved else the exact reason for the failure is going to be hard to debug remotely.

    40. python-dev commented on May 4, 2012

      python-devmannequin
      Mannequin

      New changeset 257cbd2fac38 by Brett Cannon in branch 'default':
      Issue bpo-13959: Re-implement imp.get_suffixes() in Lib/imp.py.
      http://hg.python.org/cpython/rev/257cbd2fac38

    41. brettcannon commented on May 4, 2012

      @brettcannon
      MemberAuthor

      OK, I'm waiting on issue bpo-14657 (avoiding the _frozen_importlib/importlib dichotomy) is resolved before I document the new imp.extension_suffixes() as it would be good to know where I should pull in the source and bytecode suffixes.

      I think this only leaves get_magic() and get_tag() as the only things to move + trying to figure out how to handle PyImport_ExecCodeModuleObject() and its grip on various bits of C code.

    42. python-dev commented on May 4, 2012

      python-devmannequin
      Mannequin

      New changeset 22b0689346f9 by Brett Cannon in branch 'default':
      Issue bpo-13959: Move module type constants to Lib/imp.py.
      http://hg.python.org/cpython/rev/22b0689346f9

    43. python-dev commented on May 11, 2012

      python-devmannequin
      Mannequin

      New changeset b81ddaf0db47 by Brett Cannon in branch 'default':
      Issue bpo-13959: Deprecate imp.get_suffixes() for new attributes on
      http://hg.python.org/cpython/rev/b81ddaf0db47

    44. ericsnowcurrently commented on May 11, 2012

      @ericsnowcurrently
      Member

      Question on this one:

      <snip>
      @@ -126,7 +131,7 @@ def load_compiled(name, pathname, file=N
       # XXX deprecate
       def load_package(name, path):
           if os.path.isdir(path):
      -        extensions = _bootstrap._SOURCE_SUFFIXES + [_bootstrap._BYTECODE_SUFFIX]
      +        extensions = machinery.SOURCE_SUFFIXES[:] + [machinery.BYTECODE_SUFFIXES]
               for extension in extensions:
                   path = os.path.join(path, '__init__'+extension)
                   if os.path.exists(path):
      </snip>

      Should that be the following?

        extensions = machinery.SOURCE_SUFFIXES[:] + machinery.BYTECODE_SUFFIXES[:]

      Also, why the "[:]"?

      Finally, in a couple spots you use the first element of the list (like the old case of "machinery.SOURCE_SUFFIXES[0]" in source_from_cache() and the new one in find_module()). Will this be a problem where the source file has one of the other suffixes? I'm not sure it's a big enough deal for the moment to worry about, but thought I'd ask. :)

    45. brettcannon commented on May 11, 2012

      @brettcannon
      MemberAuthor

      Yes.

      And the [:] copies the list so I don't accidentally mutate in-place (did that once already, so now I'm just being paranoid; I doubt I need it hardly anywhere I don't do +=).

      As for using SOURCE_SUFFIXES[0], I'm done following the ported code. I really don't care if .pyw isn't supported in that case. But in general people shouldn't assume just .py (or .py at all).

    46. python-dev commented on May 11, 2012

      python-devmannequin
      Mannequin

      New changeset 626d5c6fbd95 by Brett Cannon in branch 'default':
      Issue bpo-13959: Have
      http://hg.python.org/cpython/rev/626d5c6fbd95

    47. python-dev commented on May 12, 2012

      python-devmannequin
      Mannequin

      New changeset 7bf8ac742d2f by Brett Cannon in branch 'default':
      Issue bpo-13959: Introduce importlib.find_loader().
      http://hg.python.org/cpython/rev/7bf8ac742d2f

    48. brettcannon commented on May 12, 2012

      @brettcannon
      MemberAuthor

      I have importlib.find_loader() coded up, but getting rid of find_module() is going to be a pain thanks to pkgutil, multiprocessing.forking, modulefinder, and idlelib.EditorWindow.

    49. python-dev commented on May 13, 2012

      python-devmannequin
      Mannequin

      New changeset 59870239813c by Brett Cannon in branch 'default':
      Issue bpo-13959: Document imp.find_module/load_module as deprecated.
      http://hg.python.org/cpython/rev/59870239813c

    50. brettcannon commented on Jun 4, 2012

      @brettcannon
      MemberAuthor

      Need to update the docstrings for imp.find_module() and load_module() to mention the functions are deprecated since there is no specific raised deprecation, only documented deprecation.

    51. jpe commented on Jun 5, 2012

      jpemannequin
      Mannequin

      This may be a known problem, but imp.load_module fails when trying to load a C extension. This is with the 3.3a4 release on Windows, though I suspect the problem is cross-platform.

    52. brettcannon commented on Jun 5, 2012

      @brettcannon
      MemberAuthor

      Does it work in Python 3.2, John? If it does then it's just an oversight thanks to the lack of tests in test_imp and it shouldn't be too difficult to support.

      But do realize I have deprecated the function. =)

    53. jpe commented on Jun 5, 2012

      jpemannequin
      Mannequin

      On 6/5/12 1:08 PM, Brett Cannon wrote:

      Brett Cannon<brett@python.org> added the comment:

      Does it work in Python 3.2, John? If it does then it's just an oversight thanks to the lack of tests in test_imp and it shouldn't be too difficult to support.

      But do realize I have deprecated the function. =)

      Attached is a short test file to demonstrate this. It assumes the
      standard win32 layout, but shouldn't be hard to modify. It does work in
      Python 3.2, but the else: clause in 3.3's imp.load_module function
      raises an ImportError. I think the fix is to add an elif C_EXTENSION:
      clause that loads the .so / .pyd.

      I've already rewritten my code to use importlib when running in Python 3.3.

    54. brettcannon commented on Jun 6, 2012

      @brettcannon
      MemberAuthor

      You're right about the solution, John. I (or someone else) just needs to code it up.

    55. python-dev commented on Jun 15, 2012

      python-devmannequin
      Mannequin

      New changeset 034c814eb187 by Brett Cannon in branch 'default':
      Issue bpo-13959: Add to imp.find_module() and load_module's docstrings
      http://hg.python.org/cpython/rev/034c814eb187

    56. birkenfeld commented on Jun 19, 2012

      @birkenfeld
      Member

      Which parts are still missing here?

    57. ericsnowcurrently commented on Jun 19, 2012

      @ericsnowcurrently
      Member

      Here are the things I'm aware of:

      • implement imp.get_tag() using sys.implementation
      • *maybe* implement imp.get_magic() in pure Python (patch already attached here)
      • (low priority) find a way to rip out the bulk of PyImport_ExecCodeModuleObject() from imp.c, if practical

      From my discussions with Brett, there was a laundry list he was aiming to get in for 3.3 (for import stuff in general). I know much of it got done, but not all of it. Of the remainder, I'm not sure how much of that he still wants to see get in. Some of it pertains to this issue, though not all.

    58. birkenfeld commented on Jun 23, 2012

      @birkenfeld
      Member

      OK, sounds like none of it would block beta1.

    59. brettcannon commented on Jun 24, 2012

      @brettcannon
      MemberAuthor

      Sorry, been on vacation the past week.

      Georg is right, nothing left is a b1 blocker, just stuff I want to get in before 3.3 ships.

    60. birkenfeld commented on Jun 26, 2012

      @birkenfeld
      Member

      Moving back to blocker for beta2.

    61. python-dev commented on Jul 9, 2012

      python-devmannequin
      Mannequin

      New changeset efb5e6ab10f4 by Brett Cannon in branch 'default':
      Issue bpo-15167 (as part of bpo-13959): imp.get_magic() is no implemented in
      http://hg.python.org/cpython/rev/efb5e6ab10f4

    62. brettcannon commented on Jul 9, 2012

      @brettcannon
      MemberAuthor

      Since the final issue is just a nicety, I am considering this issue closed.

    63. ericsnowcurrently commented on Jul 10, 2012

      @ericsnowcurrently
      Member

      hurray!

    64. vstinner commented on Dec 6, 2017

      @vstinner
      Member

      New changeset 672b6ba by Victor Stinner in branch 'master':
      bpo-32030: pass interp to _PyImport_Init() (bpo-4736)
      672b6ba

    65. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    release-blockerstdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions