Commit Graph

113 Commits

Author SHA1 Message Date
Zackery Spytz 5be666010e bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389) 2019-08-23 11:38:41 -07:00
Steve Dower df2d4a6f3d
bpo-37834: Normalise handling of reparse points on Windows (GH-15231)
bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only

bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
2019-08-21 15:27:33 -07:00
Steve Dower 75e064962e
bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287) 2019-08-21 13:43:06 -07:00
shireenrao 24fe46081b bpo-36266: Add module name in ImportError when DLL not found on Windows (GH-15180) 2019-08-17 13:50:39 -07:00
shireenrao f4e725f224 bpo-25172: Raise appropriate ImportError msg when crypt module used on Windows (GH-15149) 2019-08-08 21:02:49 +01:00
Steve Dower 87ce9588ce
bpo-37778: Fixes the icons used for file associations to the Microsoft Store package (GH-15150) 2019-08-07 10:50:17 -07:00
Steve Dower 1fab9cbfba
bpo-37734: Fix use of registry values to launch Python from Microsoft Store app (GH-15146) 2019-08-07 10:49:40 -07:00
Greg Bowser 8fbece135d bpo-36590: Add Bluetooth RFCOMM and support for Windows. (GH-12767)
Support for RFCOMM, L2CAP, HCI, SCO is based on the BTPROTO_* macros
being defined. Winsock only supports RFCOMM, even though it has a
BTHPROTO_L2CAP macro. L2CAP support would build on windows, but not
necessarily work.

This also adds some basic unittests for constants (all of which existed
prior to this commit, just not on windows) and creating sockets.

pair: Nate Duarte <slacknate@gmail.com>
2019-08-02 13:29:52 -07:00
Steve Dower 123536fdab
bpo-37672: Switch Windows Store package to use pip.ini for user mode (GH-14939) 2019-07-24 15:13:22 -07:00
Minmin Gong 05f2d84cae bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095) 2019-07-13 16:11:43 +03:00
Miro Hrončok 72cd653c4e bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)
bdist_wininst depends on MBCS codec, unavailable on non-Windows,
and bdist_wininst have not worked since at least Python 3.2, possibly
never on Python 3.

Here we document that bdist_wininst is only supported on Windows,
and we mark it unsupported otherwise to skip tests.

Distributors of Python 3 can now safely drop the bdist_wininst .exe files
without the need to skip bdist_wininst related tests.
2019-07-01 14:12:40 +02:00
Steve Dower 9048c49322
bpo-37369: Fix initialization of sys members when launched via an app container (GH-14428)
sys._base_executable is now always defined on all platforms, and can be overridden through configuration.
Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
2019-06-29 10:34:11 -07:00
Ruslan Kuprieiev 042821ae3c bpo-37380: subprocess: don't use _active on win (GH-14360)
As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380#msg346333
[2] https://bugs.python.org/issue36067#msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
2019-06-28 18:12:16 +02:00
animalize 7fd2ba354e bpo-35360: Update Windows builds to use SQLite 3.28.0 (GH-14179) 2019-06-24 16:22:14 -07:00
Steve Dower f5690925df bpo-37351: Removes libpython38.a from standard Windows distribution (#14276) 2019-06-21 14:28:46 -07:00
Zackery Spytz 28fca0c422 bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051)
On Windows, os.dup() no longer creates an inheritable fd when handling a
character file.
2019-06-17 09:17:14 +02:00
Paul Monson b4c7defe58 bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073)
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].

This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.

In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7

@zooba 


https://bugs.python.org/issue36779
2019-06-12 16:13:27 -07:00
Łukasz Langa 3b5deb0116
Python 3.8.0b1 2019-06-04 19:44:34 +02:00
Zackery Spytz 3c8724fc60 bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980) 2019-05-28 17:16:33 +02:00
Andrew Svetlov bafd4b5ac8 bpo-29883: Asyncio proactor udp (GH-13440)
Follow-up for #1067


https://bugs.python.org/issue29883
2019-05-28 02:52:15 -07:00
Erik Janssens 925af1d99b bpo-36965: Fix includes in main.c on Windows with non-MSC compilers (GH-13421)
Include windows.h rather than crtdbg.h to get STATUS_CONTROL_C_EXIT constant.
Moreover, include windows.h on Windows, not only when MSC is used.
2019-05-21 12:11:11 +02:00
Paul Monson fb7e7505ed bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779) 2019-05-15 15:38:55 -07:00
Łukasz Langa c1004b8546
Python 3.8.0a4 2019-05-06 20:30:25 +02:00
Paul Monson 62dfd7d6fe bpo-35920: Windows 10 ARM32 platform support (GH-11774) 2019-04-25 18:36:45 +00:00
Steve Dower 4c3efd9cd0
bpo-36649: Remove trailing spaces for registry keys when installed via the Store (GH-12865) 2019-04-17 14:31:32 -07:00
Paul Monson f4e5661e85 bpo-36509: Add iot layout for Windows IoT containers (GH-12663)
This enables using the `--preset-iot` option with the PC/layout script, but does not enable IoT builds as part of any normal release.
2019-04-12 09:55:57 -07:00
Lorenz Mende 6955d44b41 bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)





https://bugs.python.org/issue34144
2019-04-10 10:19:16 -07:00
Vidar Tonaas Fauske 0e10766574 bpo-31512: Add non-elevated symlink support for Windows (GH-3652) 2019-04-09 11:19:46 -07:00
Ammar Askar e16467af0b bpo-34060: Report system load when running test suite for Windows (GH-8357)
While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.

Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.
2019-04-09 08:20:41 -04:00
Paul Moore e724152796 bpo-36010: Add venv to the nuget distribution (GH-12367) 2019-03-30 09:32:05 -07:00
Steve Dower 2438cdf0e9
bpo-36085: Enable better DLL resolution on Windows (GH-12302) 2019-03-29 16:37:16 -07:00
Paul Monson 32119e10b7 bpo-35947: Update Windows to the current version of libffi (GH-11797)
We now use a pre-built libffi binary from our binaries repository, and no longer vendor the full implementation.
2019-03-29 16:30:10 -07:00
kctherookie d93fbbf88e bpo-35941: Fix ssl certificate enumeration for windows (GH-12486)
Add a function to collect certificates from several certificate stores into one certificate collection store that is then enumerated. This ensures we load as many certificates as we can access.
2019-03-28 10:59:06 -07:00
Giampaolo Rodola 3eca28c613
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183) 2019-03-28 15:20:30 +01:00
Steve Dower 4a9a505d6f
bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566) 2019-03-27 08:14:53 -07:00
Łukasz Langa 9a448855b5
v3.8.0a3 2019-03-25 20:36:40 +01:00
Serhiy Storchaka c1e2c288f4
bpo-36312: Fix decoders for some code pages. (GH-12369) 2019-03-20 21:45:18 +02:00
Anthony Sottile 25ec4a45dc bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282) 2019-03-12 08:39:57 -07:00
Zackery Spytz 6673decfa0 bpo-24643: Fix "#define timezone _timezone" clashes on Windows (GH-12019) 2019-02-25 15:56:44 -08:00
Łukasz Langa 23f4589b4b
v3.8.0a2 2019-02-25 13:08:32 +01:00
Paul Monson 8a1657b934 bpo-35976: Enable Windows projects to build with platform ARM32 (GH-11825)
This change adds the necessary items to the build projects to avoid erroring out right at the start. It does not add _support_ for targeting Windows on ARM32, but is a necessary prerequisite for adding it.
2019-02-14 08:31:30 -08:00
Steve Dower 85e102a2b0
bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744) 2019-02-04 17:15:13 -08:00
Łukasz Langa e7afe1ab25 Python 3.8.0a1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAlxW66AACgkQsmmV4xAl
 BWh3QQ//ZMI2a0KicKZ/MTnaW0cpTSQ5MoikOVL98z1Mx2MGDm5k5pzxN7E4qT39
 WPcnUJyK6o6juigq49qwpufaHRDhn/FoscFpQgTwf4POw23f6OB6karzV6xijOW7
 AoxjqKs7QhjIifAsxe76c4KzpR85tUgxJGsN4KHC6hwAbkri5HQ0372bjg+dkis1
 nmjnDwf6ZkzwtNqOwP5aAnm5z6XWXngQk1BHL1xG+ECXeAYTWEHbgjMlJpsc/28E
 rPDeL08BYiJYLuOghV71Yq3T1FSHicLwwKt0+Q61zBGsjwrEmqfRZpB4oOrr65Ca
 0QdqYbNwm9hkfp3/XnNV+JwBnBLJsd+vzEz3Lcu/hPb7YMAD7DMIrIeG6zVHVVEo
 9edurimM8w5QsmHyGFgVVEh4qImiGgmYSDFrU3l/u3SXjnSLnNJM2dGLMSmJ6N14
 komPeq4vg0daPqRPTbWHTZvjt7aidAJlSzrmjg45KOgv6TdJq8X/Sm/v70zopaXL
 gUW9SNHQY84WpHOni3+SKweh4IsmXT+ZagKHUVuf9h9W9U3u43eGYIWXlLbDUOTj
 tSx3scYJK97YIJjpz7RacAMrEcrn5gWrLnJemnlF5Bsv9tekKBP4vaF7hbkZn+0U
 6aPJ56OOSjtCMPrAl6uw9EbEz1ysPVY0wz6Lpcrb6j7dYCn81Ds=
 =g9Mg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAlxX+EUQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaIGiEACDEsoAjSDnlydMqQ94L5lpy+Tk9hOYiXjV
 ZG4JOhTSuWJzbEdjXHuwWf7rnXgu3xjgsct3wfkFkGuH11XxyyQRJ9u32zsCBE6k
 MO2CsNVVCKyFWM0CJ1A0BrILsVMY2N9mr3nmbiaGZt5eaIY7JUhTtpzhjmyrNIVL
 YWL+EfGgU/1xinsYXuhuOJXACBlJnxR8MOtdJ5X2HZb+6RokYj7efKP7Ty84vZIV
 bW7cngQsoac6C7QNalFRP6Z1pO81HoDQHxlAwh2dUU/4vYQTIZ3zNA7K8JbaJnWL
 bcQkUVvPr2OTqDkro2Hj6qKSpdroAu/7LzNjB3ky+iNkEtVonIX6H/sY9EfbwuYx
 3KS88d9ETdDkxVfRThp8pbedPJL8sIFVsR6E/PzUjLKyfqKQGdifKh+vzrfs642u
 3Xz7xJFyvCPT3xSeemRQRPODhWfPf1sd/rfHbk0SLBF5Se3lqFnNZ4/DhKXMr8/D
 BVozJSRD4P1A7xgEy59/jD5oIkkd8M9g6YtDTD5RYvfWxb/geLN+BAIXsIouRtTe
 ANPX0plC56FfY3xZYqeQi05f+C7j/P2FUKKL9tjiuxKJ8UQ3ftaDw39CneyDLMyy
 u/ynrv3H4EAWsV1qFjOeUIwc+k4rjlprcB+LRQguLBbBlFg1vj8MTOO+Kfgui0Lv
 y9Wpvhkeqw==
 =WuSS
 -----END PGP SIGNATURE-----

Merge tag 'v3.8.0a1'

Python 3.8.0a1
2019-02-04 09:30:59 +01:00
Steve Dower a8474d025c
bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745)
After reading __PYVENV_LAUNCHER__ we now set sys._base_executable value for later use.
Make the same changes for macOS to avoid extra platform checks.
2019-02-03 23:19:38 -08:00
Steve Dower 2f6fae6e51
bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746) 2019-02-03 23:08:18 -08:00
Łukasz Langa 8efa3b69f6
[blurb] v3.8.0a1 2019-02-03 14:02:52 +01:00
Minmin Gong 8ebc6451f3 bpo-35890 : Fix some API calling consistency (GH-11742)
Unicode version of Windows APIs are used in places, but not for GetVersionEx in Python/sysmodule.c
The wcstok_s is called on Windows in Modules/main.c and PC/launcher.c, but not in Python/pathconfig.c
2019-02-02 20:26:55 -08:00
Mark Becwar b82bfac436 bpo-29734: nt._getfinalpathname handle leak (GH-740)
Make sure that failure paths call CloseHandle outside of the function that failed
2019-02-02 13:08:23 -08:00
Shiva Saxena cb09047626 bpo-32560: inherit the py launcher's STARTUPINFO (GH-9000)
https://bugs.python.org/issue32560
2019-02-02 11:21:04 -08:00
Tony Roberts 4860f01ac0 bpo-33895: Relase GIL while calling functions that acquire Windows loader lock (GH-7789)
LoadLibrary, GetProcAddress, FreeLibrary and GetModuleHandle acquire the system loader lock. Calling these while holding the GIL will cause a deadlock on the rare occasion that another thread is detaching and needs to destroy its thread state at the same time.
2019-02-02 09:16:42 -08:00