diff --git a/Misc/NEWS b/Misc/NEWS index a15aa221d18..5c318f992a0 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -138,6 +138,17 @@ Core and Builtins Library ------- +- Issue #25092: Fix datetime.strftime() failure when errno was already set to + EINVAL. + +- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods + of datetime.datetime: microseconds are now rounded to nearest with ties + going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding + towards minus infinity (ROUND_FLOOR). It's important that these methods use + the same rounding mode than datetime.timedelta to keep the property: + (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t). + It also the rounding mode used by round(float) for example. + - Issue #25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on Windows to support date after year 2038. It was a regression introduced in Python 3.5.0. @@ -239,6 +250,19 @@ Build Windows ------- +- Issue #25102: Windows installer does not precompile for -O or -OO. + +- Issue #25081: Makes Back button in installer go back to upgrade page when + upgrading. + +- Issue #25091: Increases font size of the installer. + +- Issue #25126: Clarifies that the non-web installer will download some + components. + +- Issue #25213: Restores requestedExecutionLevel to manifest to disable + UAC virtualization. + - Issue #25022: Removed very outdated PC/example_nt/ directory. diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 9de3c843322..d2caacdc6dd 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -653,6 +653,9 @@ time_strftime(PyObject *self, PyObject *args) PyErr_NoMemory(); break; } +#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__) + errno = 0; +#endif _Py_BEGIN_SUPPRESS_IPH buflen = format_time(outbuf, i, fmt, &buf); _Py_END_SUPPRESS_IPH diff --git a/PC/python.manifest b/PC/python.manifest index 3ac2630e272..9b7b2f8e515 100644 --- a/PC/python.manifest +++ b/PC/python.manifest @@ -1,5 +1,12 @@ + + + + + + + diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm index d919bea7449..f575a98fa24 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -1,136 +1,136 @@ - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI + #(loc.Caption) + Segoe UI + Segoe UI + Segoe UI + Segoe UI + Segoe UI + Segoe UI - #(loc.HelpHeader) - + #(loc.HelpHeader) + #(loc.HelpText) - + - #(loc.InstallHeader) - + #(loc.InstallHeader) + #(loc.InstallMessage) - - + + - #(loc.ShortPrependPathLabel) - #(loc.ShortInstallLauncherAllUsersLabel) + #(loc.ShortPrependPathLabel) + #(loc.ShortInstallLauncherAllUsersLabel) - + - #(loc.InstallUpgradeHeader) - + #(loc.InstallUpgradeHeader) + #(loc.InstallUpgradeMessage) - - + + - + - #(loc.InstallHeader) - + #(loc.InstallHeader) + - + - + - #(loc.Custom1Header) - + #(loc.Custom1Header) + - #(loc.Include_docLabel) - #(loc.Include_docHelpLabel) + #(loc.Include_docLabel) + #(loc.Include_docHelpLabel) - #(loc.Include_pipLabel) - #(loc.Include_pipHelpLabel) + #(loc.Include_pipLabel) + #(loc.Include_pipHelpLabel) - #(loc.Include_tcltkLabel) - #(loc.Include_tcltkHelpLabel) + #(loc.Include_tcltkLabel) + #(loc.Include_tcltkHelpLabel) - #(loc.Include_testLabel) - #(loc.Include_testHelpLabel) + #(loc.Include_testLabel) + #(loc.Include_testHelpLabel) - #(loc.Include_launcherLabel) - #(loc.InstallLauncherAllUsersLabel) - #(loc.Include_launcherHelpLabel) + #(loc.Include_launcherLabel) + #(loc.InstallLauncherAllUsersLabel) + #(loc.Include_launcherHelpLabel) - - - + + + - #(loc.Custom2Header) - + #(loc.Custom2Header) + - #(loc.InstallAllUsersLabel) - #(loc.AssociateFilesLabel) - #(loc.ShortcutsLabel) - #(loc.PrependPathLabel) - #(loc.PrecompileLabel) - #(loc.Include_symbolsLabel) - #(loc.Include_debugLabel) + #(loc.InstallAllUsersLabel) + #(loc.AssociateFilesLabel) + #(loc.ShortcutsLabel) + #(loc.PrependPathLabel) + #(loc.PrecompileLabel) + #(loc.Include_symbolsLabel) + #(loc.Include_debugLabel) - #(loc.CustomLocationLabel) - - - #(loc.CustomLocationHelpLabel) + #(loc.CustomLocationLabel) + + + #(loc.CustomLocationHelpLabel) - - - + + + - #(loc.ProgressHeader) - + #(loc.ProgressHeader) + - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - + #(loc.ProgressLabel) + #(loc.OverallProgressPackageText) + + - #(loc.ModifyHeader) - + #(loc.ModifyHeader) + - - - + + + - + - #(loc.SuccessHeader) - + #(loc.SuccessHeader) + #(loc.SuccessRestartText) - - + + - #(loc.FailureHeader) - + #(loc.FailureHeader) + #(loc.FailureHyperlinkLogText) #(loc.FailureRestartText) - - + + \ No newline at end of file diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl index 7af907e0b52..f3d89d9348c 100644 --- a/Tools/msi/bundle/Default.wxl +++ b/Tools/msi/bundle/Default.wxl @@ -86,8 +86,8 @@ Select Customize to review current options. for &all users (requires elevation) Install &launcher for all users (recommended) &Precompile standard library - Install debugging &symbols - Install debu&g binaries (requires VS 2015 or later) + Download debugging &symbols + Download debu&g binaries (requires VS 2015 or later) [ActionLikeInstallation] Progress [ActionLikeInstalling]: diff --git a/Tools/msi/bundle/SideBar.png b/Tools/msi/bundle/SideBar.png index 9c18fff33a6..a23ce5e1458 100644 Binary files a/Tools/msi/bundle/SideBar.png and b/Tools/msi/bundle/SideBar.png differ diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index 35ed2fe73be..99884e4c9aa 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -323,6 +323,8 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication { SavePageSettings(); if (_modifying) { GoToPage(PAGE_MODIFY); + } else if (_upgrading) { + GoToPage(PAGE_UPGRADE); } else { GoToPage(PAGE_INSTALL); } @@ -2524,6 +2526,7 @@ private: case BOOTSTRAPPER_ACTION_INSTALL: if (_upgradingOldVersion) { _installPage = PAGE_UPGRADE; + _upgrading = TRUE; } else if (SUCCEEDED(BalGetNumericVariable(L"SimpleInstall", &simple)) && simple) { _installPage = PAGE_SIMPLE_INSTALL; } else { @@ -3029,6 +3032,7 @@ public: _suppressDowngradeFailure = FALSE; _suppressRepair = FALSE; _modifying = FALSE; + _upgrading = FALSE; _overridableVariables = nullptr; _taskbarList = nullptr; @@ -3113,6 +3117,7 @@ private: BOOL _suppressDowngradeFailure; BOOL _suppressRepair; BOOL _modifying; + BOOL _upgrading; int _crtInstalledToken; diff --git a/Tools/msi/bundle/bundle.wxl b/Tools/msi/bundle/bundle.wxl index 684e0dac4e3..d7a65c48dc4 100644 --- a/Tools/msi/bundle/bundle.wxl +++ b/Tools/msi/bundle/bundle.wxl @@ -2,4 +2,6 @@ C Runtime Update (KB2999226) Precompiling standard library + Precompiling standard library (-O) + Precompiling standard library (-OO) diff --git a/Tools/msi/bundle/packagegroups/postinstall.wxs b/Tools/msi/bundle/packagegroups/postinstall.wxs index 7b0f3fc818e..b40c2a5a305 100644 --- a/Tools/msi/bundle/packagegroups/postinstall.wxs +++ b/Tools/msi/bundle/packagegroups/postinstall.wxs @@ -40,23 +40,64 @@ - + + + + + + python-$(PythonVersion)-embed-$(ArchName) .zip $(OutputPath)\en-us\$(TargetName)$(TargetExt) + rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)" "$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py" $(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName) set DOC_FILENAME=python$(PythonVersion).chm @@ -23,6 +24,7 @@ set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140. diff --git a/Tools/msi/make_zip.py b/Tools/msi/make_zip.py index c256008acaa..96fdad2197b 100644 --- a/Tools/msi/make_zip.py +++ b/Tools/msi/make_zip.py @@ -15,6 +15,20 @@ TKTCL_RE = re.compile(r'^(_?tk|tcl).+\.(pyd|dll)', re.IGNORECASE) DEBUG_RE = re.compile(r'_d\.(pyd|dll|exe)$', re.IGNORECASE) PYTHON_DLL_RE = re.compile(r'python\d\d?\.dll$', re.IGNORECASE) +EXCLUDE_FROM_LIBRARY = { + '__pycache__', + 'ensurepip', + 'idlelib', + 'pydoc_data', + 'site-packages', + 'tkinter', + 'turtledemo', +} + +EXCLUDE_FILE_FROM_LIBRARY = { + 'bdist_wininst.py', +} + def is_not_debug(p): if DEBUG_RE.search(p.name): return False @@ -37,16 +51,21 @@ def is_not_debug_or_python(p): def include_in_lib(p): name = p.name.lower() if p.is_dir(): - if name in {'__pycache__', 'ensurepip', 'idlelib', 'pydoc_data', 'tkinter', 'turtledemo'}: + if name in EXCLUDE_FROM_LIBRARY: return False if name.startswith('plat-'): return False if name == 'test' and p.parts[-2].lower() == 'lib': return False + if name in {'test', 'tests'} and p.parts[-3].lower() == 'lib': + return False return True + if name in EXCLUDE_FILE_FROM_LIBRARY: + return False + suffix = p.suffix.lower() - return suffix not in {'.pyc', '.pyo'} + return suffix not in {'.pyc', '.pyo', '.exe'} def include_in_tools(p): if p.is_dir() and p.name.lower() in {'scripts', 'i18n', 'pynche', 'demo', 'parser'}: