Commit Graph
38 Commits
Author SHA1 Message Date
Jeong, YunWon 3ec7b5c375 Implement Windows SemLock in _multiprocessing module (#7199)
* Implement Windows SemLock in _multiprocessing module

Add SemLock class using Windows semaphore APIs (CreateSemaphoreW,
WaitForSingleObjectEx, ReleaseSemaphore) so test_multiprocessing
suites are no longer skipped with "lacks a functioning sem_open".
Also add sem_unlink as no-op and flags dict for Windows.

* Fix _multiprocessing recv to return bytes and improve SemLock reliability

- recv() now returns bytes instead of int (matching CPython)
- Remove spurious GetLastError() check after CreateSemaphoreW
- Add signal checking during blocking SemLock acquire

* Include winerror in OSError.__reduce__ on Windows

* Remove expectedFailure for tests now passing with Windows SemLock

* Fix OSError.__reduce__ to preserve winerror when filename is None

When filename is None, __reduce__ was reconstructing a 2-element
(errno, msg) tuple, dropping the winerror at position 3 in the
original args. Use the original args tuple instead, matching CPython.

* Validate maxvalue > 0 in SemLock and document winerror __reduce__ divergence

* Reject embedded null characters in mmap tagname and _winapi file mapping names
2026-02-24 10:12:29 +09:00
Padraic Fanning 92a5cf0ac8 Mark erroring tests 2026-02-01 20:27:22 -05:00
CPython Developers 02537b56fd Update socket from v3.14.2-288-g06f9c8ca1c 2026-02-01 20:23:50 -05:00
Terry Tianlin LuanandJeong, YunWon 609dbb1439 Downgraded skips in tests (#6716)
* Downgraded skips in tests

* Fixed failing tests

* Fixed test_ftplib + test_socket + test_ssl + test_threaded_import failures

* Removed comments about which tests are run in which environment

* Addressed PR comments

* Annotated skips on failing tests

* Removed unneeded tests

* Removed unneeded sys import from test_ftplib

* Added annotation to test_ftplib

* Readded skipIf to test_cleanup_with_symlink_modes with a more general ENV_POLLUTING_TESTS_WINDOWS

* Addressed PR comments

* Made changes to minimize diff in PR

* Apply suggestion from @youknowone

---------

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-01-15 21:43:22 +09:00
Jeong, YunWon 39aa6f9524 use accept_raw (#6578) 2025-12-29 23:17:16 +09:00
Jeong YunWon ed62c8ef58 mark failures 2025-12-29 11:27:08 +09:00
Jeong, YunWon 183cebe8a1 Upgrade socket from 3.13.11 2025-12-29 11:27:08 +09:00
Jeong YunWon 2271f74642 del for socket 2025-12-29 11:25:34 +09:00
Jeong, YunWon 012799f560 Fix enum and os.read related to signal (#6552)
* fix enum

* fix os.read to check signals
2025-12-28 10:13:03 +09:00
Jeong, YunWon 79cd048e1f native ExceptionGroup (#6358) 2025-12-09 23:02:44 +09:00
Jeong YunWon 9e2f6bd187 mark failing tests of test_socket 2025-03-30 14:20:17 +09:00
Jeong YunWon b620f03728 Update socket from CPython 3.12.2 2025-03-30 13:55:55 +09:00
Noa a86126419c Fix remaining tests 2025-03-25 19:05:12 -05:00
Noa 5c22697344 Implement fsencode/fsdecode for FsPath 2025-03-25 19:05:12 -05:00
Jeong YunWon 1cec856c63 skip flaky test_socket sendmsg tests in macos 2024-04-25 22:04:40 +09:00
Jeong YunWon 5fd5939395 skip flaky socket test in macOS 2024-04-23 16:24:15 +09:00
Daniel Chiquito de7e4e49da Disable broken test_socket.py tests
There are a substantial number of socket tests that are disabled due to
`bind(): bad family` errors. It seems like RustPython only supports a
small subset of the required connection families, so the failing tests
are broken for the same reasons.
2024-03-09 18:22:57 -05:00
dvermd 0d0139b322 Update enum to CPython 3.11.5 (#5074)
part of: #4564
2023-10-03 22:32:38 +09:00
Jeong YunWon dfb37d9a44 setattro uses Py<PyStr> 2023-03-20 19:00:02 +09:00
Jeong YunWon 367a948ff0 Adapt unittest.expectedFailureIf 2023-03-02 04:41:15 +09:00
Jeong YunWon 19504a6b9d mark failing tests again 2022-08-15 01:08:58 +09:00
CPython Developers 939257411b Update socket{server} from CPython 3.10.6 2022-08-15 00:34:06 +09:00
Padraic Fanning 0b1a54220e Unmark passing test on macOS and Windows 2022-07-04 20:52:03 -04:00
Padraic Fanning b39263db3b Mark erroring test on Windows 2022-07-04 20:50:03 -04:00
Padraic Fanning 92f790efc1 Mark erroring/failing tests 2022-07-04 20:18:56 -04:00
Padraic Fanning 165df16945 Unmark passing tests due to CI limitations 2022-06-22 20:19:39 -04:00
Padraic Fanning c8748bc98e Fix test.support imports 2022-02-13 17:56:08 -05:00
Padraic Fanning 75390dd787 Fix test.support imports 2022-02-12 20:48:57 -05:00
Dean Li 5ee4fb899b test: use os_helper 2021-11-28 20:51:32 +08:00
Jeong YunWon 913b78ca44 Revert "Merge pull request #3433 from deantvv/test-update"
This reverts commit 9fa5c5ac66, reversing
changes made to e7fa32c687.
2021-11-17 17:06:51 +09:00
Dean Li 49a5805d11 test: use os_helper 2021-11-13 02:18:33 +00:00
Padraic Fanning bd9aa2f938 Fix CI failures for macOS in test_socket 2021-10-17 19:01:37 -04:00
Padraic Fanning 9c219e3836 Clean up skip in test_socket 2021-10-17 19:01:36 -04:00
Lee Dogeon 63b1696458 Derive name from tp_name 2021-09-09 00:07:36 +09:00
Dean Li 06b40b3602 socket: impl herror
There is one todo that is waiting for hstrerror to land in libc crate.
For now it shows the same error as cpython when hstrerror is not
available.
2021-08-07 15:26:09 +08:00
coolreader18 a2fc8796e8 Fix windows tests 2021-06-11 16:15:33 -05:00
Noah 74f9722033 Mark failing tests 2021-06-10 20:54:49 -05:00
Noah b69c14c2a6 Add test_socket.py from CPython 3.8 2021-06-10 20:54:49 -05:00