Skip to content

Commit

Permalink
Fix py.exe -m win32verstamp command and other ISC typos (#2225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored May 28, 2024
1 parent d7fc9a3 commit 518ac84
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ https://mhammond.github.io/pywin32_installers.html.

Coming in build 307, as yet unreleased
--------------------------------------

### pywin32
* Fixed `py.exe -m win32verstamp` command and other quote typos caused by Implied String Concatenation (#2225, @Avasam)
* Fixed VT_SAFEARRAY(VT_RECORD) which were missing the last element (#2247)
* Fixed `MFC redist DLLs not found` by preferring corresponding version but accepting different version (#2248, @andreabravetti)
* Fixed `pywintypes.error: (5, 'RegOpenKeyEx', 'Access is denied.')` when running service with debug parameter and no elevation (#2238, @jmartens)
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/test/test_pywin.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def t_print(*args):
pywin.scintilla.IDLEenvironment.test()
ed = scriptutils.GetActiveEditControl()
doc = ed.GetDocument()
assert "hi " "there" in ed.GetTextRange()
assert "hi there" in ed.GetTextRange()
assert doc.IsModified()

# edit w auto-indent
Expand Down
2 changes: 1 addition & 1 deletion pywin32_postinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def RegisterHelpFile(register=True, lib_dir=None):
SetPyKeyVal("Help\\Pythonwin Reference", None, chm_file)
return chm_file
else:
print("NOTE: PyWin32.chm can not be located, so has not " "been registered")
print("NOTE: PyWin32.chm can not be located, so has not been registered")
else:
UnsetPyKeyVal("Help\\Pythonwin Reference", None, delete_key=True)
return None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def link(
# allow --skip-verstamp on the cmdline - but if it's not there, the
# verstamp must work.)
if not skip_verstamp:
args = ["py.exe", "-m" "win32verstamp"]
args = ["py.exe", "-m", "win32verstamp"]
args.append(f"--version={pywin32_version}")
args.append("--comments=https://github.com/mhammond/pywin32")
args.append(f"--original-filename={os.path.basename(output_filename)}")
Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/NetValidatePasswordPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main():
"-u",
"--username",
action="store",
help="The username to pass to the function (only for the " "change command",
help="The username to pass to the function (only for the 'change' command)",
)

parser.add_option(
Expand Down
4 changes: 2 additions & 2 deletions win32/Demos/security/setkernelobjectsecurity.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
new_sd = win32security.GetKernelObjectSecurity(ph, all_info)

if new_sd.GetSecurityDescriptorDacl().GetAceCount() != dacl_ace_cnt + 1:
print("New dacl doesn" "t contain extra ace ????")
print("New dacl doesn't contain extra ace ????")
if new_sd.GetSecurityDescriptorSacl().GetAceCount() != sacl_ace_cnt + 1:
print("New Sacl doesn" "t contain extra ace ????")
print("New Sacl doesn't contain extra ace ????")
if (
win32security.LookupAccountSid("", new_sd.GetSecurityDescriptorOwner())[0]
!= "Power Users"
Expand Down
4 changes: 2 additions & 2 deletions win32/Demos/security/setnamedsecurityinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@

## could do additional checking to make sure added ACE contains expected info
if new_sd.GetSecurityDescriptorDacl().GetAceCount() != dacl_ace_cnt + 1:
print("New dacl doesn" "t contain extra ace ????")
print("New dacl doesn't contain extra ace ????")
if new_sd.GetSecurityDescriptorSacl().GetAceCount() != sacl_ace_cnt + 1:
print("New Sacl doesn" "t contain extra ace ????")
print("New Sacl doesn't contain extra ace ????")
if (
win32security.LookupAccountSid("", new_sd.GetSecurityDescriptorOwner())[0]
!= "Power Users"
Expand Down
4 changes: 2 additions & 2 deletions win32/Demos/security/setsecurityinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@
new_sd = win32security.GetSecurityInfo(ph, win32security.SE_KERNEL_OBJECT, all_info)

if new_sd.GetSecurityDescriptorDacl().GetAceCount() != dacl_ace_cnt + 1:
print("New dacl doesn" "t contain extra ace ????")
print("New dacl doesn't contain extra ace ????")
if new_sd.GetSecurityDescriptorSacl().GetAceCount() != sacl_ace_cnt + 1:
print("New Sacl doesn" "t contain extra ace ????")
print("New Sacl doesn't contain extra ace ????")
if (
win32security.LookupAccountSid("", new_sd.GetSecurityDescriptorOwner())[0]
!= "Power Users"
Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/security/sspi/socket_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def sspi_client():
serve()
else:
parser.error(
"You must supply 'client' or 'server' - " "use --help for details"
"You must supply 'client' or 'server' - use --help for details"
)
except KeyboardInterrupt:
pass
Expand Down
6 changes: 3 additions & 3 deletions win32/test/test_odbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def testDates(self):
def test_set_nonzero_length(self):
self.assertEqual(
self.cur.execute(
"insert into %s (userid,username) " "values (?,?)" % self.tablename,
"insert into %s (userid,username) values (?,?)" % self.tablename,
["Frank", "Frank Millman"],
),
1,
Expand All @@ -240,7 +240,7 @@ def test_set_nonzero_length(self):
def test_set_zero_length(self):
self.assertEqual(
self.cur.execute(
"insert into %s (userid,username) " "values (?,?)" % self.tablename,
"insert into %s (userid,username) values (?,?)" % self.tablename,
[b"Frank", ""],
),
1,
Expand All @@ -251,7 +251,7 @@ def test_set_zero_length(self):
def test_set_zero_length_unicode(self):
self.assertEqual(
self.cur.execute(
"insert into %s (userid,username) " "values (?,?)" % self.tablename,
"insert into %s (userid,username) values (?,?)" % self.tablename,
["Frank", ""],
),
1,
Expand Down

0 comments on commit 518ac84

Please sign in to comment.