Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-117431: Adapt str.find and friends to Argument Clinic (#117468) | Erlend E. Aasland | 2024-04-03 | 1 | -5/+5 |
| | | | | | | | | | | This change gives a significant speedup, as the METH_FASTCALL calling convention is now used. The following methods are adapted: - str.count - str.find - str.index - str.rfind - str.rindex | ||||
* | gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (#117466) | Erlend E. Aasland | 2024-04-03 | 1 | -2/+2 |
| | | | | This change gives a significant speedup, as the METH_FASTCALL calling convention is now used. | ||||
* | gh-110160: Fix flaky `test_find_periodic_pattern` in `string_tests` (#110170) | Nikita Sobolev | 2023-10-01 | 1 | -3/+11 |
| | |||||
* | gh-106487: Allow the 'count' argument of `str.replace` to be a keyword (#106488) | Hugo van Kemenade | 2023-07-10 | 1 | -0/+6 |
| | |||||
* | gh-81005: Refactor str tests to reflect that str and unicode are merged in ↵ | Daniel Fortunov | 2023-05-23 | 1 | -17/+9 |
| | | | | | | Python 3 (#13172) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> | ||||
* | gh-94808: Cover `str.rsplit` for UCS1, UCS2 or UCS4 (#98228) | Nikita Sobolev | 2022-10-15 | 1 | -0/+8 |
| | |||||
* | gh-94808: improve comments and coverage of fastsearch.h (GH-96760) | Dennis Sweeney | 2022-09-13 | 1 | -0/+48 |
| | |||||
* | bpo-45668: Fix PGO tests without test extensions (GH-29315) | Christian Heimes | 2021-11-01 | 1 | -5/+6 |
| | |||||
* | bpo-44110: Improve string's __getitem__ error message (GH-26042) | Miguel Brito | 2021-06-27 | 1 | -1/+7 |
| | |||||
* | bpo-41972: Use the two-way algorithm for string searching (GH-22904) | Dennis Sweeney | 2021-02-28 | 1 | -0/+39 |
| | | | | | Implement an enhanced variant of Crochemore and Perrin's Two-Way string searching algorithm, which reduces worst-case time from quadratic (the product of the string and pattern lengths) to linear. This applies to forward searches (like``find``, ``index``, ``replace``); the algorithm for reverse searches (like ``rfind``) is not changed. Co-authored-by: Tim Peters <tim.peters@gmail.com> | ||||
* | bpo-39939: Add str.removeprefix and str.removesuffix (GH-18939) | sweeneyde | 2020-04-22 | 1 | -0/+36 |
| | | | | | Added str.removeprefix and str.removesuffix methods and corresponding bytes, bytearray, and collections.UserString methods to remove affixes from a string if present. See PEP 616 for a full description. | ||||
* | bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981) | Serhiy Storchaka | 2019-10-30 | 1 | -0/+1 |
| | |||||
* | bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375) | Zackery Spytz | 2019-05-17 | 1 | -1/+1 |
| | | | | | | | The final addition (cur += step) may overflow, so use size_t for "cur". "cur" is always positive (even for negative steps), so it is safe to use size_t here. Co-Authored-By: Martin Panter <vadmium+py@gmail.com> | ||||
* | bpo-36549: str.capitalize now titlecases the first character instead of ↵ | Kingsley M | 2019-04-12 | 1 | -1/+1 |
| | | | | uppercasing it (GH-12804) | ||||
* | bpo-32677: Optimize str.isascii() (GH-5356) | INADA Naoki | 2018-01-28 | 1 | -0/+7 |
| | |||||
* | bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342) | INADA Naoki | 2018-01-27 | 1 | -0/+8 |
| | |||||
* | Remove relics of str8 (became bytes) and buffer (bytearray) type tests | Martin Panter | 2016-04-10 | 1 | -33/+0 |
| | | | | Remove redundant tests now that str is unicode. | ||||
* | Issue #26712: Unify (r)split, (l/r)strip tests into string_tests | Martin Panter | 2016-04-10 | 1 | -5/+31 |
| | | | | This eliminates a few redundant test cases. | ||||
* | Issue #26257: Eliminate buffer_tests.py and fix ByteArrayAsStringTest | Martin Panter | 2016-04-06 | 1 | -36/+40 |
| | | | | | | | | | | | | | | | | ByteArrayAsStringTest.fixtype() was converting test data to bytes, not byte- array, therefore many of the test cases inherited in this class were not actually being run on the bytearray type. The tests in buffer_tests.py were redundant with methods in string_tests .MixinStrUnicodeUserStringTest and string_tests.CommonTest. These methods are now moved into string_tests.BaseTest, where they will also get run for bytes and bytearray. This change also moves test_additional_split(), test_additional_rsplit(), and test_strip() from CommonTest to BaseTest, meaning these tests are now run for bytes and bytearray. I plan to eliminate redundancies with existing tests in test_bytes.py soon. | ||||
* | Issue #19587: Remove masked and redundant tests in test_bytes | Martin Panter | 2016-02-02 | 1 | -6/+4 |
| | | | | | | | | * test_contains() did not override anything * test_expandtabs/upper/lower() in FixedStringTest were masking usable tests in string_tests. These tests now get run for bytearray() and bytes(). * test_expandtabs/upper/lower() in buffer_tests were only run on bytearray() and are redundant with string_tests | ||||
* | Fix a couple of typos in code comments | Martin Panter | 2015-12-17 | 1 | -1/+1 |
| | |||||
* | Issue #24284: The startswith and endswith methods of the str class no longer | Serhiy Storchaka | 2015-05-31 | 1 | -0/+6 |
| | | | | | return True when finding the empty string and the indexes are completely out of range. | ||||
* | merge 3.4 (#22379) | Benjamin Peterson | 2014-09-28 | 1 | -8/+6 |
|\ | |||||
| * | check that exception messages are not empty (#22379) | Benjamin Peterson | 2014-09-28 | 1 | -8/+6 |
| | | | | | | | | Patch by Yongzhi Pan. | ||||
* | | Issue19995: passing a non-int to %o, %c, %x, or %X now raises an exception | Ethan Furman | 2014-03-19 | 1 | -2/+1 |
|/ | |||||
* | Issue #20532: Tests which use _testcapi now are marked as CPython only. | Serhiy Storchaka | 2014-02-07 | 1 | -8/+15 |
|\ | |||||
| * | Issue #20532: Tests which use _testcapi now are marked as CPython only. | Serhiy Storchaka | 2014-02-07 | 1 | -8/+15 |
| | | |||||
* | | Catch deprecation warnings emitted when non-integers are formatted with %c, %o | Serhiy Storchaka | 2014-02-06 | 1 | -1/+2 |
| | | | | | | | | and %x (introduced in issue #19995). | ||||
* | | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -2/+2 |
| | | |||||
* | | #17806: Added keyword-argument support for "tabsize" to str/bytes.expandtabs(). | Ezio Melotti | 2013-11-16 | 1 | -7/+20 |
|/ | |||||
* | Remove duplicated tests. | Ezio Melotti | 2013-04-21 | 1 | -21/+0 |
| | |||||
* | Issue #15989: Fix several occurrences of integer overflow | Serhiy Storchaka | 2013-01-19 | 1 | -0/+11 |
|\ | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277. | ||||
| * | Issue #15989: Fix several occurrences of integer overflow | Serhiy Storchaka | 2013-01-19 | 1 | -0/+11 |
| | | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277. | ||||
* | | #16910: test_bytes, test_unicode, and test_userstring now work with unittest ↵ | Ezio Melotti | 2013-01-10 | 1 | -1/+1 |
| | | | | | | | | test discovery. Patch by Zachary Ware. | ||||
* | | merge 3.2 (#15801) | Benjamin Peterson | 2012-08-28 | 1 | -0/+3 |
|\ \ | |/ | |||||
| * | use the stricter PyMapping_Check (closes #15801) | Benjamin Peterson | 2012-08-28 | 1 | -0/+3 |
| | | |||||
* | | Close #15534: Fix a typo in the fast search function of the string library ↵ | Victor Stinner | 2012-08-02 | 1 | -0/+8 |
| | | | | | | | | | | | | (_s => s) Replace _s with ptr to avoid future confusion. Add also non regression tests. | ||||
* | | Issue #14700: Fix two broken and undefined-behaviour-inducing overflow ↵ | Mark Dickinson | 2012-05-07 | 1 | -0/+4 |
| | | | | | | | | checks in old-style string formatting. Thanks Serhiy Storchaka for report and original patch. | ||||
* | | #14081: The sep and maxsplit parameter to str.split, bytes.split, and ↵ | Ezio Melotti | 2012-02-26 | 1 | -1/+23 |
| | | | | | | | | bytearray.split may now be passed as keyword arguments. | ||||
* | | use full unicode mappings for upper/lower/title case (#12736) | Benjamin Peterson | 2012-01-11 | 1 | -1/+1 |
| | | | | | | | | Also broaden the category of characters that count as lowercase/uppercase. | ||||
* | | Issue #12170: The count(), find(), rfind(), index() and rindex() methods | Antoine Pitrou | 2011-10-20 | 1 | -5/+30 |
| | | | | | | | | | | of bytes and bytearray objects now accept an integer between 0 and 255 as their first argument. Patch by Petri Lehtinen. | ||||
* | | Issue #13012: Allow 'keepends' to be passed as a keyword argument in ↵ | Mark Dickinson | 2011-09-24 | 1 | -3/+11 |
|/ | | | | str.splitlines, bytes.splitlines and bytearray.splitlines. | ||||
* | #12266: Fix str.capitalize() to correctly uppercase/lowercase titlecased and ↵ | Ezio Melotti | 2011-08-15 | 1 | -0/+17 |
| | | | | cased non-letter characters. | ||||
* | Use non-deprecated method name. | Ezio Melotti | 2011-04-20 | 1 | -7/+7 |
| | |||||
* | MERGE: startswith and endswith don't accept None as slice index. Patch by ↵ | Jesus Cea | 2011-04-20 | 1 | -0/+57 |
|\ | | | | | | | Torsten Becker. (closes #11828) | ||||
| * | startswith and endswith don't accept None as slice index. Patch by Torsten ↵ | Jesus Cea | 2011-04-20 | 1 | -0/+57 |
| | | | | | | | | Becker. (closes #11828) | ||||
| * | Merged revisions 86596 via svnmerge from | Ezio Melotti | 2010-11-21 | 1 | -11/+11 |
| | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........ | ||||
| * | Merged revisions 77731 via svnmerge from | Ezio Melotti | 2010-01-24 | 1 | -9/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77731 | ezio.melotti | 2010-01-24 22:59:24 +0200 (Sun, 24 Jan 2010) | 9 lines Merged revisions 77729 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77729 | ezio.melotti | 2010-01-24 22:48:35 +0200 (Sun, 24 Jan 2010) | 1 line remove archaic functions from test_support ........ ................ | ||||
* | | #9424: Replace deprecated assert* methods in the Python test suite. | Ezio Melotti | 2010-11-20 | 1 | -11/+11 |
| | |