Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ef1db3

Browse files
committed
Merge with 3.5
2 parents dd7cb10 + a2ea0e4 commit 8ef1db3

11 files changed

Lines changed: 192 additions & 89 deletions

File tree

Misc/NEWS

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ Core and Builtins
138138
Library
139139
-------
140140

141+
- Issue #25092: Fix datetime.strftime() failure when errno was already set to
142+
EINVAL.
143+
144+
- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
145+
of datetime.datetime: microseconds are now rounded to nearest with ties
146+
going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
147+
towards minus infinity (ROUND_FLOOR). It's important that these methods use
148+
the same rounding mode than datetime.timedelta to keep the property:
149+
(datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t).
150+
It also the rounding mode used by round(float) for example.
151+
141152
- Issue #25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on
142153
Windows to support date after year 2038. It was a regression introduced in
143154
Python 3.5.0.
@@ -239,6 +250,19 @@ Build
239250
Windows
240251
-------
241252

253+
- Issue #25102: Windows installer does not precompile for -O or -OO.
254+
255+
- Issue #25081: Makes Back button in installer go back to upgrade page when
256+
upgrading.
257+
258+
- Issue #25091: Increases font size of the installer.
259+
260+
- Issue #25126: Clarifies that the non-web installer will download some
261+
components.
262+
263+
- Issue #25213: Restores requestedExecutionLevel to manifest to disable
264+
UAC virtualization.
265+
242266
- Issue #25022: Removed very outdated PC/example_nt/ directory.
243267

244268

Modules/timemodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ time_strftime(PyObject *self, PyObject *args)
653653
PyErr_NoMemory();
654654
break;
655655
}
656+
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
657+
errno = 0;
658+
#endif
656659
_Py_BEGIN_SUPPRESS_IPH
657660
buflen = format_time(outbuf, i, fmt, &buf);
658661
_Py_END_SUPPRESS_IPH

PC/python.manifest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<trustInfo>
4+
<security>
5+
<requestedPrivileges>
6+
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
7+
</requestedPrivileges>
8+
</security>
9+
</trustInfo>
310
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
411
<application>
512
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>

Tools/msi/bundle/Default.thm

Lines changed: 80 additions & 80 deletions
Large diffs are not rendered by default.

Tools/msi/bundle/Default.wxl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ Select Customize to review current options.</String>
8686
<String Id="InstallLauncherAllUsersLabel">for &amp;all users (requires elevation)</String>
8787
<String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
8888
<String Id="PrecompileLabel">&amp;Precompile standard library</String>
89-
<String Id="Include_symbolsLabel">Install debugging &amp;symbols</String>
90-
<String Id="Include_debugLabel">Install debu&amp;g binaries (requires VS 2015 or later)</String>
89+
<String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
90+
<String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2015 or later)</String>
9191

9292
<String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
9393
<String Id="ProgressLabel">[ActionLikeInstalling]:</String>

Tools/msi/bundle/SideBar.png

37.8 KB
Loading

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
323323
SavePageSettings();
324324
if (_modifying) {
325325
GoToPage(PAGE_MODIFY);
326+
} else if (_upgrading) {
327+
GoToPage(PAGE_UPGRADE);
326328
} else {
327329
GoToPage(PAGE_INSTALL);
328330
}
@@ -2524,6 +2526,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
25242526
case BOOTSTRAPPER_ACTION_INSTALL:
25252527
if (_upgradingOldVersion) {
25262528
_installPage = PAGE_UPGRADE;
2529+
_upgrading = TRUE;
25272530
} else if (SUCCEEDED(BalGetNumericVariable(L"SimpleInstall", &simple)) && simple) {
25282531
_installPage = PAGE_SIMPLE_INSTALL;
25292532
} else {
@@ -3029,6 +3032,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
30293032
_suppressDowngradeFailure = FALSE;
30303033
_suppressRepair = FALSE;
30313034
_modifying = FALSE;
3035+
_upgrading = FALSE;
30323036

30333037
_overridableVariables = nullptr;
30343038
_taskbarList = nullptr;
@@ -3113,6 +3117,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
31133117
BOOL _suppressDowngradeFailure;
31143118
BOOL _suppressRepair;
31153119
BOOL _modifying;
3120+
BOOL _upgrading;
31163121

31173122
int _crtInstalledToken;
31183123

Tools/msi/bundle/bundle.wxl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
33
<String Id="CRTDescription">C Runtime Update (KB2999226)</String>
44
<String Id="CompileAllDescription">Precompiling standard library</String>
5+
<String Id="CompileAllODescription">Precompiling standard library (-O)</String>
6+
<String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
57
</WixLocalization>

Tools/msi/bundle/packagegroups/postinstall.wxs

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,64 @@
4040
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
4141
</MsiPackage>
4242

43-
<?define CompileAllCommand=-$(var.ShortVersion)$(var.Suffix32) -E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
43+
<?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
4444
<ExePackage Id="compileall_AllUsers"
4545
SourceFile="py.exe"
4646
Compressed="yes"
4747
DisplayName="!(loc.CompileAllDescription)"
48-
InstallCommand='$(var.CompileAllCommand)'
49-
RepairCommand='$(var.CompileAllCommand)'
48+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
49+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
5050
Permanent="yes"
5151
PerMachine="yes"
5252
Vital="no"
5353
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
54+
<ExePackage Id="compileallO_AllUsers"
55+
SourceFile="py.exe"
56+
Compressed="yes"
57+
DisplayName="!(loc.CompileAllODescription)"
58+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
59+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
60+
Permanent="yes"
61+
PerMachine="yes"
62+
Vital="no"
63+
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
64+
<ExePackage Id="compileallOO_AllUsers"
65+
SourceFile="py.exe"
66+
Compressed="yes"
67+
DisplayName="!(loc.CompileAllOODescription)"
68+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
69+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
70+
Permanent="yes"
71+
PerMachine="yes"
72+
Vital="no"
73+
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
74+
5475
<ExePackage Id="compileall_JustForMe"
5576
SourceFile="py.exe"
5677
Compressed="yes"
5778
DisplayName="!(loc.CompileAllDescription)"
58-
InstallCommand='$(var.CompileAllCommand)'
59-
RepairCommand='$(var.CompileAllCommand)'
79+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
80+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
81+
Permanent="yes"
82+
PerMachine="no"
83+
Vital="no"
84+
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
85+
<ExePackage Id="compileallO_JustForMe"
86+
SourceFile="py.exe"
87+
Compressed="yes"
88+
DisplayName="!(loc.CompileAllODescription)"
89+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
90+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
91+
Permanent="yes"
92+
PerMachine="no"
93+
Vital="no"
94+
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
95+
<ExePackage Id="compileallOO_JustForMe"
96+
SourceFile="py.exe"
97+
Compressed="yes"
98+
DisplayName="!(loc.CompileAllOODescription)"
99+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
100+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
60101
Permanent="yes"
61102
PerMachine="no"
62103
Vital="no"

Tools/msi/make_zip.proj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
1515
<TargetExt>.zip</TargetExt>
1616
<TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
17+
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
1718
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
1819
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>
1920
<Environment>set DOC_FILENAME=python$(PythonVersion).chm
@@ -23,6 +24,7 @@ set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.
2324
<Target Name="_Build">
2425
<Exec Command="setlocal
2526
$(Environment)
27+
$(CleanCommand)
2628
$(Arguments)" />
2729
</Target>
2830

0 commit comments

Comments
 (0)