[920] | 1 | diff --git a/.github/issue_template.md b/.github/issue_template.md
|
---|
| 2 | new file mode 100644
|
---|
| 3 | index 00000000..9c724696
|
---|
| 4 | --- /dev/null
|
---|
| 5 | +++ b/.github/issue_template.md
|
---|
| 6 | @@ -0,0 +1,11 @@
|
---|
| 7 | +Note that issues in this repository are only for bugs or feature requests in the pywin32.
|
---|
| 8 | +
|
---|
| 9 | +**If you need support or help using this package, please follow [these instructions](https://github.com/mhammond/pywin32/blob/master/README.md#support)** - support or help requests will be closed without comment.
|
---|
| 10 | +
|
---|
| 11 | +For all bugs, please provide the following information.
|
---|
| 12 | +
|
---|
| 13 | +* Expected behavior and actual behavior.
|
---|
| 14 | +
|
---|
| 15 | +* Steps to reproduce the problem.
|
---|
| 16 | +
|
---|
| 17 | +* Version of Python and pywin32
|
---|
| 18 | diff --git a/CHANGES.txt b/CHANGES.txt
|
---|
| 19 | index 4b3fcbe3..d209569c 100644
|
---|
| 20 | --- a/CHANGES.txt
|
---|
| 21 | +++ b/CHANGES.txt
|
---|
| 22 | @@ -4,6 +4,10 @@ Generally created by hand after running:
|
---|
| 23 | hg log -rb2xx: > log.out
|
---|
| 24 | However contributors are encouraged to add their own entries for their work.
|
---|
| 25 |
|
---|
| 26 | +Since build 224:
|
---|
| 27 | +----------------
|
---|
| 28 | +* PythonWin is now able to start with non-English active keyboard layout.
|
---|
| 29 | +
|
---|
| 30 | Since build 223:
|
---|
| 31 | ----------------
|
---|
| 32 | * Built with a released version of Python 3.7, which fixes various date related
|
---|
| 33 | diff --git a/Pythonwin/pywin/scintilla/keycodes.py b/Pythonwin/pywin/scintilla/keycodes.py
|
---|
| 34 | index 6b783761..d9021828 100644
|
---|
| 35 | --- a/Pythonwin/pywin/scintilla/keycodes.py
|
---|
| 36 | +++ b/Pythonwin/pywin/scintilla/keycodes.py
|
---|
| 37 | @@ -35,7 +35,9 @@ def get_vk(chardesc):
|
---|
| 38 | # it is a character.
|
---|
| 39 | info = win32api.VkKeyScan(chardesc)
|
---|
| 40 | if info==-1:
|
---|
| 41 | - return None, None
|
---|
| 42 | + # Note: returning None, None causes an error when keyboard layout is non-English, see the report below
|
---|
| 43 | + # https://stackoverflow.com/questions/45138084/pythonwin-occasionally-gives-an-error-on-opening
|
---|
| 44 | + return 0, 0
|
---|
| 45 | vk = win32api.LOBYTE(info)
|
---|
| 46 | state = win32api.HIBYTE(info)
|
---|
| 47 | modifiers = 0
|
---|
| 48 | diff --git a/appveyor.yml b/appveyor.yml
|
---|
| 49 | index a45bdb39..f84cdbc4 100644
|
---|
| 50 | --- a/appveyor.yml
|
---|
| 51 | +++ b/appveyor.yml
|
---|
| 52 | @@ -20,6 +20,8 @@ environment:
|
---|
| 53 | PYTHON_MINOR: 5
|
---|
| 54 | - PYTHON_MAJOR: 3
|
---|
| 55 | PYTHON_MINOR: 6
|
---|
| 56 | + - PYTHON_MAJOR: 3
|
---|
| 57 | + PYTHON_MINOR: 7
|
---|
| 58 |
|
---|
| 59 | install:
|
---|
| 60 | # Prepare environment
|
---|
| 61 | @@ -42,6 +44,7 @@ init:
|
---|
| 62 | # Following the matrix here: https://wiki.python.org/moin/WindowsCompilers#Which_Microsoft_Visual_C.2B-.2B-_compiler_to_use_with_a_specific_Python_version_.3F
|
---|
| 63 | - if "%PLATFORM%"=="x86" set VC_ARCH=x86
|
---|
| 64 | - if "%PLATFORM%"=="x64" set VC_ARCH=amd64
|
---|
| 65 | + - if "%PYTHON_MAJOR%"=="3" if "%PYTHON_MINOR%"=="7" set VC_VERSION=14.0
|
---|
| 66 | - if "%PYTHON_MAJOR%"=="3" if "%PYTHON_MINOR%"=="6" set VC_VERSION=14.0
|
---|
| 67 | - if "%PYTHON_MAJOR%"=="3" if "%PYTHON_MINOR%"=="5" set VC_VERSION=14.0
|
---|
| 68 | - if "%PYTHON_MAJOR%"=="3" if "%PYTHON_MINOR%"=="4" set VC_VERSION=10.0
|
---|
| 69 | diff --git a/setup.py b/setup.py
|
---|
| 70 | index 8c397e1e..7c35d909 100644
|
---|
| 71 | --- a/setup.py
|
---|
| 72 | +++ b/setup.py
|
---|
| 73 | @@ -1883,6 +1883,7 @@ com_extensions += [
|
---|
| 74 | depends=["%(internet)s/internet_pch.h" % dirs]),
|
---|
| 75 | WinExt_win32com('mapi', libraries="advapi32", pch_header="PythonCOM.h",
|
---|
| 76 | include_dirs=["%(mapi)s/mapi_headers" % dirs],
|
---|
| 77 | + optional_headers=['edkmdb.h', 'edkguid.h'],
|
---|
| 78 | sources=("""
|
---|
| 79 | %(mapi)s/mapi.i %(mapi)s/mapi.cpp
|
---|
| 80 | %(mapi)s/PyIABContainer.i %(mapi)s/PyIABContainer.cpp
|
---|
| 81 | @@ -1911,6 +1912,7 @@ com_extensions += [
|
---|
| 82 | """ % dirs).split()),
|
---|
| 83 | WinExt_win32com_mapi('exchange', libraries="advapi32",
|
---|
| 84 | include_dirs=["%(mapi)s/mapi_headers" % dirs],
|
---|
| 85 | + optional_headers=['edkmdb.h', 'edkguid.h'],
|
---|
| 86 | sources=("""
|
---|
| 87 | %(mapi)s/exchange.i %(mapi)s/exchange.cpp
|
---|
| 88 | %(mapi)s/PyIExchangeManageStore.i %(mapi)s/PyIExchangeManageStore.cpp
|
---|
| 89 | @@ -2438,6 +2440,17 @@ cmdclass = { 'install': my_install,
|
---|
| 90 | 'build_scripts' : my_build_scripts,
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | +classifiers = [ 'Environment :: Win32 (MS Windows)',
|
---|
| 94 | + 'Intended Audience :: Developers',
|
---|
| 95 | + 'License :: OSI Approved :: Python Software Foundation License',
|
---|
| 96 | + 'Operating System :: Microsoft :: Windows',
|
---|
| 97 | + 'Programming Language :: Python :: 2.7',
|
---|
| 98 | + 'Programming Language :: Python :: 3.5',
|
---|
| 99 | + 'Programming Language :: Python :: 3.6',
|
---|
| 100 | + 'Programming Language :: Python :: 3.7',
|
---|
| 101 | + 'Programming Language :: Python :: Implementation :: CPython',
|
---|
| 102 | + ]
|
---|
| 103 | +
|
---|
| 104 | dist = setup(name="pywin32",
|
---|
| 105 | version=str(build_id),
|
---|
| 106 | description="Python for Window Extensions",
|
---|
| 107 | @@ -2449,6 +2462,7 @@ dist = setup(name="pywin32",
|
---|
| 108 | author_email = "mhammond@skippinet.com.au",
|
---|
| 109 | url="https://github.com/mhammond/pywin32",
|
---|
| 110 | license="PSF",
|
---|
| 111 | + classifiers = classifiers,
|
---|
| 112 | cmdclass = cmdclass,
|
---|
| 113 | options = {"bdist_wininst":
|
---|
| 114 | {"install_script": "pywin32_postinstall.py",
|
---|
| 115 | diff --git a/win32/Lib/win32con.py b/win32/Lib/win32con.py
|
---|
| 116 | index a37967f7..eb6b8a90 100644
|
---|
| 117 | --- a/win32/Lib/win32con.py
|
---|
| 118 | +++ b/win32/Lib/win32con.py
|
---|
| 119 | @@ -2060,6 +2060,9 @@ PROCESS_CREATE_PROCESS = (128)
|
---|
| 120 | PROCESS_SET_QUOTA = (256)
|
---|
| 121 | PROCESS_SET_INFORMATION = (512)
|
---|
| 122 | PROCESS_QUERY_INFORMATION = (1024)
|
---|
| 123 | +PROCESS_SUSPEND_RESUME = (2048)
|
---|
| 124 | +PROCESS_QUERY_LIMITED_INFORMATION = (4096)
|
---|
| 125 | +PROCESS_SET_LIMITED_INFORMATION = (8192)
|
---|
| 126 | PROCESS_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 4095)
|
---|
| 127 | THREAD_TERMINATE = (1)
|
---|
| 128 | THREAD_SUSPEND_RESUME = (2)
|
---|
| 129 | @@ -2070,6 +2073,9 @@ THREAD_QUERY_INFORMATION = (64)
|
---|
| 130 | THREAD_SET_THREAD_TOKEN = (128)
|
---|
| 131 | THREAD_IMPERSONATE = (256)
|
---|
| 132 | THREAD_DIRECT_IMPERSONATION = (512)
|
---|
| 133 | +THREAD_SET_LIMITED_INFORMATION = (1024)
|
---|
| 134 | +THREAD_QUERY_LIMITED_INFORMATION = (2048)
|
---|
| 135 | +THREAD_RESUME = (4096)
|
---|
| 136 | TLS_MINIMUM_AVAILABLE = 64
|
---|
| 137 | EVENT_MODIFY_STATE = 2
|
---|
| 138 | MUTANT_QUERY_STATE = 1
|
---|
| 139 | diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py
|
---|
| 140 | index 83a119dc..6d65af7d 100644
|
---|
| 141 | --- a/win32/Lib/win32timezone.py
|
---|
| 142 | +++ b/win32/Lib/win32timezone.py
|
---|
| 143 | @@ -715,14 +715,22 @@ class TimeZoneInfo(datetime.tzinfo):
|
---|
| 144 | @staticmethod
|
---|
| 145 | def _get_indexed_time_zone_keys(index_key='Index'):
|
---|
| 146 | """
|
---|
| 147 | - Get the names of the registry keys indexed by a value in that key.
|
---|
| 148 | + Get the names of the registry keys indexed by a value in that key,
|
---|
| 149 | + ignoring any keys for which that value is empty or missing.
|
---|
| 150 | """
|
---|
| 151 | key_names = list(TimeZoneInfo._get_time_zone_key_names())
|
---|
| 152 | +
|
---|
| 153 | def get_index_value(key_name):
|
---|
| 154 | key = TimeZoneInfo._get_time_zone_key(key_name)
|
---|
| 155 | - return key[index_key]
|
---|
| 156 | + return key.get(index_key)
|
---|
| 157 | +
|
---|
| 158 | values = map(get_index_value, key_names)
|
---|
| 159 | - return zip(values, key_names)
|
---|
| 160 | +
|
---|
| 161 | + return (
|
---|
| 162 | + (value, key_name)
|
---|
| 163 | + for value, key_name in zip(values, key_names)
|
---|
| 164 | + if value
|
---|
| 165 | + )
|
---|
| 166 |
|
---|
| 167 | @staticmethod
|
---|
| 168 | def get_sorted_time_zone_names():
|
---|
| 169 | @@ -786,25 +794,6 @@ class _RegKeyDict(dict):
|
---|
| 170 | except WindowsError: pass
|
---|
| 171 |
|
---|
| 172 |
|
---|
| 173 | -# for backward compatibility
|
---|
| 174 | -def deprecated(func, name='Unknown'):
|
---|
| 175 | - """This is a decorator which can be used to mark functions
|
---|
| 176 | - as deprecated. It will result in a warning being emmitted
|
---|
| 177 | - when the function is used."""
|
---|
| 178 | - def newFunc(*args, **kwargs):
|
---|
| 179 | - warnings.warn("Call to deprecated function %s." % name,
|
---|
| 180 | - category=DeprecationWarning)
|
---|
| 181 | - return func(*args, **kwargs)
|
---|
| 182 | - newFunc.__name__ = func.__name__
|
---|
| 183 | - newFunc.__doc__ = func.__doc__
|
---|
| 184 | - newFunc.__dict__.update(func.__dict__)
|
---|
| 185 | - return newFunc
|
---|
| 186 | -
|
---|
| 187 | -GetTimeZoneNames = deprecated(TimeZoneInfo._get_time_zone_key_names, 'GetTimeZoneNames')
|
---|
| 188 | -GetIndexedTimeZoneNames = deprecated(TimeZoneInfo._get_indexed_time_zone_keys, 'GetIndexedTimeZoneNames')
|
---|
| 189 | -GetSortedTimeZoneNames = deprecated(TimeZoneInfo.get_sorted_time_zone_names, 'GetSortedTimeZoneNames')
|
---|
| 190 | -# end backward compatibility
|
---|
| 191 | -
|
---|
| 192 | def utcnow():
|
---|
| 193 | """
|
---|
| 194 | Return the UTC time now with timezone awareness as enabled
|
---|
| 195 | @@ -860,7 +849,7 @@ def resolveMUITimeZone(spec):
|
---|
| 196 | spec should be of the format @path,-stringID[;comment]
|
---|
| 197 | see http://msdn2.microsoft.com/en-us/library/ms725481.aspx for details
|
---|
| 198 | """
|
---|
| 199 | - pattern = re.compile('@(?P<dllname>.*),-(?P<index>\d+)(?:;(?P<comment>.*))?')
|
---|
| 200 | + pattern = re.compile(r'@(?P<dllname>.*),-(?P<index>\d+)(?:;(?P<comment>.*))?')
|
---|
| 201 | matcher = pattern.match(spec)
|
---|
| 202 | assert matcher, 'Could not parse MUI spec'
|
---|
| 203 |
|
---|
| 204 | diff --git a/win32/Lib/winnt.py b/win32/Lib/winnt.py
|
---|
| 205 | index 15584efa..021a32b1 100644
|
---|
| 206 | --- a/win32/Lib/winnt.py
|
---|
| 207 | +++ b/win32/Lib/winnt.py
|
---|
| 208 | @@ -194,6 +194,9 @@ PROCESS_CREATE_PROCESS = (128)
|
---|
| 209 | PROCESS_SET_QUOTA = (256)
|
---|
| 210 | PROCESS_SET_INFORMATION = (512)
|
---|
| 211 | PROCESS_QUERY_INFORMATION = (1024)
|
---|
| 212 | +PROCESS_SUSPEND_RESUME = (2048)
|
---|
| 213 | +PROCESS_QUERY_LIMITED_INFORMATION = (4096)
|
---|
| 214 | +PROCESS_SET_LIMITED_INFORMATION = (8192)
|
---|
| 215 | MAXIMUM_PROCESSORS = 32
|
---|
| 216 | THREAD_TERMINATE = (1)
|
---|
| 217 | THREAD_SUSPEND_RESUME = (2)
|
---|
| 218 | @@ -204,6 +207,9 @@ THREAD_QUERY_INFORMATION = (64)
|
---|
| 219 | THREAD_SET_THREAD_TOKEN = (128)
|
---|
| 220 | THREAD_IMPERSONATE = (256)
|
---|
| 221 | THREAD_DIRECT_IMPERSONATION = (512)
|
---|
| 222 | +THREAD_SET_LIMITED_INFORMATION = (1024)
|
---|
| 223 | +THREAD_QUERY_LIMITED_INFORMATION = (2048)
|
---|
| 224 | +THREAD_RESUME = (4096)
|
---|
| 225 | JOB_OBJECT_ASSIGN_PROCESS = (1)
|
---|
| 226 | JOB_OBJECT_SET_ATTRIBUTES = (2)
|
---|
| 227 | JOB_OBJECT_QUERY = (4)
|
---|