Commits

Ronald Oussoren committed 2afba3a

Delete framework wrapper _metadata modules from sys.modules

This should remove the last reference to those modules, and should
reclaim some memory after import.

  • Participants
  • Parent commits 948ea04

Comments (0)

Files changed (55)

pyobjc-framework-AVFoundation/Lib/AVFoundation/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['AVFoundation._metadata']

pyobjc-framework-Accounts/Lib/Accounts/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['Accounts._metadata']

pyobjc-framework-AddressBook/Lib/AddressBook/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['AddressBook._metadata']

pyobjc-framework-AppleScriptKit/Lib/AppleScriptKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (AppKit,))
+
+del sys.modules['AppleScriptKit._metadata']

pyobjc-framework-AppleScriptObjC/Lib/AppleScriptObjC/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['AppleScriptObjC']

pyobjc-framework-Automator/Lib/Automator/__init__.py

             'objc': objc,
             '__loader__': globals().get('__loader__', None),
         }, (AppKit,))
+
+del sys.modules['Automator._metadata']

pyobjc-framework-CFNetwork/Lib/CFNetwork/__init__.py

 import CFNetwork._manual
 for nm in dir(CFNetwork._manual):
     setattr(mod, nm, getattr(CFNetwork._manual, nm))
+
+del sys.modules['CFNetwork._metadata']

pyobjc-framework-CalendarStore/Lib/CalendarStore/__init__.py

         'objc': objc,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['CalendarStore._metadata']

pyobjc-framework-Cocoa/Lib/AppKit/__init__.py

     mod.NSImageNameApplicationIcon
 except AttributeError:
     mod.NSImageNameApplicationIcon = "NSApplicationIcon"
+
+del sys.modules['AppKit._metadata']

pyobjc-framework-Cocoa/Lib/CoreFoundation/__init__.py

     setattr(mod, nm, getattr(CoreFoundation._CoreFoundation, nm))
 for nm in dir(CoreFoundation._static):
     setattr(mod, nm, getattr(CoreFoundation._static, nm))
+
+del sys.modules['CoreFoundation._metadata']

pyobjc-framework-Cocoa/Lib/Foundation/__init__.py

             '__loader__': globals().get('__loader__', None),
         }, (CoreFoundation,))
 
+del sys.modules['Foundation._metadata']
+
 import Foundation._Foundation
 for nm in dir(Foundation._Foundation):
     if nm.startswith('_'): continue

pyobjc-framework-Collaboration/Lib/Collaboration/__init__.py

         '__loader__': globals().get('__loader__', None),
         'objc': objc,
     }, (Foundation,))
+
+del sys.modules['Collaboration._metadata']

pyobjc-framework-CoreData/Lib/CoreData/__init__.py

         '__loader__': globals().get('__loader__', None),
         'objc': objc
     }, (Foundation,))
+
+del sys.modules['CoreData._metadata']

pyobjc-framework-CoreLocation/Lib/CoreLocation/__init__.py

         'kCLErrorGeocodeFoundNoResult': kCLErrorGeocodeFoundNoResult,
         'kCLErrorGeocodeCanceled': kCLErrorGeocodeCanceled,
     }, (Foundation,))
+
+del sys.modules['CoreLocation._metadata']

pyobjc-framework-CoreText/Lib/CoreText/__init__.py

 import CoreText._manual as m
 for nm in dir(m):
     setattr(mod, nm, getattr(m, nm))
+
+del sys.modules['CoreText._metadata']

pyobjc-framework-CoreWLAN/Lib/CoreWLAN/__init__.py

                 '__path__': __path__,
                 '__loader__': globals().get('__loader__', None),
             }, (Foundation,))
+
+del sys.modules['CoreWLAN._metadata']

pyobjc-framework-DictionaryServices/Lib/DictionaryServices/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['DictionaryServices._metadata']

pyobjc-framework-DiskArbitration/Lib/DiskArbitration/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (CoreFoundation,))
+
+del sys.modules['DiskArbitration._metadata']

pyobjc-framework-EventKit/Lib/EventKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['EventKit._metadata']

pyobjc-framework-ExceptionHandling/Lib/ExceptionHandling/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['ExceptionHandling._metadata']

pyobjc-framework-FSEvents/Lib/FSEvents/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation, FSEvents._callbacks,))
+
+del sys.modules['FSEvents._metadata']

pyobjc-framework-GameKit/Lib/GameKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['GameKit._metadata']

pyobjc-framework-InputMethodKit/Lib/InputMethodKit/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['InputMethodKit._metadata']

pyobjc-framework-InstallerPlugins/Lib/InstallerPlugins/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( AppKit,))
+
+del sys.modules['InstallerPlugins._metadata']

pyobjc-framework-InstantMessage/Lib/InstantMessage/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation, Quartz,))
+
+del sys.modules['InstantMessage._metadata']

pyobjc-framework-InterfaceBuilderKit/Lib/InterfaceBuilderKit/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( AppKit,))
+
+del sys.modules['InterfaceBuilderKit._metadata']

pyobjc-framework-LatentSemanticMapping/Lib/LatentSemanticMapping/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['LatentSemanticMapping._metadata']

pyobjc-framework-LaunchServices/Lib/LaunchServices/__init__.py

     '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
 
+del sys.modules['LaunchServices._metadata']
+
 
 # Load an undocumented, yet announced function. This function was announced
 # in TN2029 (http://developer.apple.com/technotes/tn/tn2029.html)

pyobjc-framework-Message/Lib/Message/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['Message._metadata']

pyobjc-framework-OpenDirectory/Lib/CFOpenDirectory/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( CoreFoundation, Foundation,))
+
+del sys.modules['CFOpenDirectory._metadata']

pyobjc-framework-OpenDirectory/Lib/OpenDirectory/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, (CFOpenDirectory,))
+
+del sys.modules['OpenDirectory._metadata']

pyobjc-framework-PreferencePanes/Lib/PreferencePanes/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( AppKit,))
+
+del sys.modules['PreferencePanes._metadata']

pyobjc-framework-PubSub/Lib/PubSub/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['PubSub._metadata']

pyobjc-framework-QTKit/Lib/QTKit/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Cocoa, Quartz,))
+
+del sys.modules['QTKit._metadata']

pyobjc-framework-Quartz/Lib/Quartz/CoreGraphics/__init__.py

        'objc': objc,
     }, ( CoreFoundation,))
 
+del sys.modules['Quartz.CoreGraphics._metadata']
+
 
 def _load(mod):
     import Quartz

pyobjc-framework-Quartz/Lib/Quartz/CoreVideo/__init__.py

        'objc': objc,
     }, ( CoreFoundation, ))
 
+del sys.modules['Quartz.CoreVideo._metadata']
+
 def _load(mod):
     import Quartz
     Quartz.CoreVideo = mod

pyobjc-framework-Quartz/Lib/Quartz/ImageIO/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Quartz.CoreGraphics,))
+
+del sys.modules['Quartz.ImageIO._metadata']

pyobjc-framework-Quartz/Lib/Quartz/ImageKit/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Cocoa, ))
+
+del sys.modules['Quartz.ImageKit._metadata']

pyobjc-framework-Quartz/Lib/Quartz/PDFKit/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( AppKit,))
+
+del sys.modules['Quartz.PDFKit._metadata']

pyobjc-framework-Quartz/Lib/Quartz/QuartzComposer/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Quartz.CoreGraphics, Foundation,))
+
+del sys.modules['Quartz.QuartzComposer._metadata']

pyobjc-framework-Quartz/Lib/Quartz/QuartzCore/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, (Foundation,))
+del sys.modules['Quartz.QuartzCore._metadata']

pyobjc-framework-Quartz/Lib/Quartz/QuartzFilters/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+
+del sys.modules['Quartz.QuartzFilters._metadata']

pyobjc-framework-Quartz/Lib/Quartz/QuickLookUI/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Cocoa,))
+
+del sys.modules['Quartz.QuickLookUI._metadata']

pyobjc-framework-ScreenSaver/Lib/ScreenSaver/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( AppKit,))
+
+del sys.modules['ScreenSaver._metadata']

pyobjc-framework-ScriptingBridge/Lib/ScriptingBridge/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+del sys.modules['ScriptingBridge._metadata']
 
 # Override the default behaviour of the bridge to ensure that we
 # make the minimal amount of AppleScript calls.

pyobjc-framework-SearchKit/Lib/SearchKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (CoreFoundation,))
+del sys.modules['SearchKit._metadata']
 
 
 

pyobjc-framework-ServerNotification/Lib/ServerNotification/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+del sys.modules['ServerNotification._metadata']

pyobjc-framework-ServiceManagement/Lib/ServiceManagement/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( CoreFoundation, ))
+del sys.modules['ServiceManagement._metadata']

pyobjc-framework-Social/Lib/Social/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+del sys.modules['Social._metadata']

pyobjc-framework-StoreKit/Lib/StoreKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+del sys.modules['StoreKit._metadata']

pyobjc-framework-SyncServices/Lib/SyncServices/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( CoreData,))
+del sys.modules['SyncServices._metadata']

pyobjc-framework-SystemConfiguration/Lib/SystemConfiguration/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation, SystemConfiguration._manual,))
+del sys.modules['SystemConfiguration._metadata']
 
 import SystemConfiguration._manual as m
 for nm in dir(m):

pyobjc-framework-WebKit/Lib/JavaScriptCore/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (CoreFoundation,))
+del sys.modules['JavaScriptCore._metadata']

pyobjc-framework-WebKit/Lib/WebKit/__init__.py

         '__path__': __path__,
         '__loader__': globals().get('__loader__', None),
     }, (Foundation,))
+
+del sys.modules['WebKit._metadata']

pyobjc-framework-XgridFoundation/Lib/XgridFoundation/__init__.py

        '__loader__': globals().get('__loader__', None),
        'objc': objc,
     }, ( Foundation,))
+del sys.modules['XgridFoundation._metadata']