Skip to content

Commit

Permalink
Remove temporary win32com.server.policy reexports hack marked for r…
Browse files Browse the repository at this point in the history
…emoval over 25 years ago (#2344)
  • Loading branch information
Avasam authored Oct 13, 2024
1 parent a6ca37a commit c670569
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html.
Coming in build 309, as yet unreleased
--------------------------------------

* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam)
Import `DispatcherWin32trace` and `DispatcherTrace` from `win32com.server.dispatcher` instead.
* Fixed `win32timezone.TimeZoneInfo` initialization from a `[DYNAMIC_]TIME_ZONE_INFORMATION` (#2339, @Avasam)
* Added runtime deprecation warning of `win2kras`, use `win32ras` instead (#2356, @Avasam)
* Improved handling of dict iterations and fallbacks (removes Python 2 support code, small general speed improvement) (#2332, #2330, @Avasam)
Expand Down
12 changes: 0 additions & 12 deletions com/win32com/server/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,3 @@ def _import_module(mname):
# Eeek - result of _import_ is "win32com" - not "win32com.a.b.c"
# Get the full module from sys.modules
return sys.modules[mname]


#######
#
# Temporary hacks until all old code moves.
#
# These have been moved to a new source file, but some code may
# still reference them here. These will end up being removed.
try:
from .dispatcher import DispatcherTrace, DispatcherWin32trace
except ImportError: # Quite likely a frozen executable that doesn't need dispatchers
pass
5 changes: 3 additions & 2 deletions com/win32comext/axdebug/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys

import win32api
import win32com.server.dispatcher
import win32com.server.policy
import win32com.server.util
import winerror
Expand Down Expand Up @@ -54,9 +55,9 @@ def RaiseNotImpl(who=None):
raise COMException(scode=winerror.E_NOTIMPL)


class Dispatcher(win32com.server.policy.DispatcherWin32trace):
class Dispatcher(win32com.server.dispatcher.DispatcherWin32trace):
def __init__(self, policyClass, object):
win32com.server.policy.DispatcherTrace.__init__(self, policyClass, object)
win32com.server.dispatcher.DispatcherTrace.__init__(self, policyClass, object)
import win32traceutil # Sets up everything.

# print(f"Object with win32trace dispatcher created ({object})")
Expand Down

0 comments on commit c670569

Please sign in to comment.