cpython
cpython copied to clipboard
The Python programming language
gh-99183: Updated the documentation for str.count() and added a example to explain the documentation better.
* Issue: gh-96250
Deprecate using bytes-like objects except bytes and bytearray in builtins int(), float(), compile(), eval() and exec(). * Issue: gh-71759
BPO | [27572](https://bugs.python.org/issue27572) --- | :--- Nosy | @rhettinger, @bitdancer, @vadmium, @serhiy-storchaka, @zhangyangyu PRs | python/cpython#779 Files | [bytes_like_support_to_int.patch](https://bugs.python.org/file43790/bytes_like_support_to_int.patch "Uploaded as text/plain at 2016-07-19.09:01:58 by @zhangyangyu")[bytes_like_support_to_int_v2.patch](https://bugs.python.org/file43825/bytes_like_support_to_int_v2.patch "Uploaded as text/plain at...
The test was added in f3e2e092 before `_StopError` was removed in 41f69f4c, after which this test will not fail without the fix it covers. This PR fixes the test to...
Before: https://github.com/python/cpython/blob/b2694ab46997746eae7e913738623b39f6334473/Lib/test/test_mailbox.py#L34-L35 https://github.com/python/cpython/blob/b2694ab46997746eae7e913738623b39f6334473/Lib/test/test_mailbox.py#L2267-L2290 Since `_sample_headers` is a map with duplicate keys (ex: `Received`), not all keys are tested. After: Changed _sample_headers to a list of tuples so all keys are...
**Bug report** A sample of mail headers is used in tests here: https://github.com/python/cpython/blob/b2694ab46997746eae7e913738623b39f6334473/Lib/test/test_mailbox.py#L34-L35 However, `_sample_headers` is defined as a dict, despite having duplicate keys, such as `Received`: https://github.com/python/cpython/blob/b2694ab46997746eae7e913738623b39f6334473/Lib/test/test_mailbox.py#L2267-L2290 causing those...
Move most C API tests into Lib/test/test_capi/. https://bugs.python.org/issue34272
# Feature or enhancement Currently is there a way to specify the payload protocol identifier for an SCTP socket created using the socket library? For example, the SCTP socket object...
Add tests for operator module to improve coverage. * iconcat should have __getitem__ implemented. * Test index and not functions. * Test length_hint default value type. https://bugs.python.org/issue39664