Commit Graph
13509 Commits
Author SHA1 Message Date
Kirill Podoprigora 4e7b3bc8f2 Update pprint.py and test_pprint.py to 3.12 (#5195) 2024-03-12 22:36:10 +09:00
Kirill Podoprigora 83d1ad8a2c Update test_operator.py to 3.12 (#5194) 2024-03-12 22:35:21 +09:00
Kirill Podoprigora 7f02324dce Update Lib/test/test_hmac.py to 3.12 version (#5188) 2024-03-11 22:04:35 +09:00
Jeong, YunWon d453026d19 Merge pull request #5191 from dchiquito/fix-failing-tests
Fix convenient failing tests
2024-03-11 15:03:39 +09:00
wellweek 2fde8e91e5 fix some typos (#5187)
Signed-off-by: wellweek <xiezitai@outlook.com>
2024-03-11 15:01:37 +09:00
Daniel Chiquito 23ebbd021b Skip test_format.test_locale
I had previously `test_locale` as expected to fail, as it did indeed
fail on my system due to unimplemented functionality. As it happens, it
passes in CI because the locale settings used there (`C`, I believe)
just happen to format integers the same with "%d" as "%n".

I mistakenly un-marked it because I thought I misunderstood the problem.
2024-03-10 22:53:39 -04:00
Daniel Chiquito 9b974bda0d Re-enable test_format.test_locale
Technically speaking, my system was misconfigured, leading me to disable
the test in the first place.

`test_locale` calls `locale.setlocale(locale.LC_ALL, '')`, which reads
the value of the `LANG` environment variable and uses that to look up
and reset all the locale settings. My system has `LANG=en_US.UTF-8`,
which is apparently not what this test was expecting. If `LANG` is unset
or set to `C`, the test passes, as it does in CI.
2024-03-10 22:30:41 -04: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
Daniel Chiquito ead42beff6 Disable test_locale in test_format.py
See https://github.com/RustPython/RustPython/issues/5181
2024-03-09 18:22:57 -05:00
Daniel Chiquito 35229721ea Fix test_cmd_line.py
The failing test was unsetting `PYTHONPATH`, but neglecting to unset
`RUSTPYTHONPATH`, which obviously was not significant for the original
CPython test. Including `RUSTPYTHONPATH` in the test fixes it.
2024-03-09 18:22:57 -05:00
rrupy 2f8e5189d3 Use ast::Suite::parse instead of deprecated parse_program. (#5186) 2024-03-05 22:37:42 +09:00
Jeong, YunWon 4c8cd67db9 Merge pull request #5176 from Blues-star/csv
Update csv.py and test_csv.py from CPython v3.12
2024-03-05 22:37:09 +09:00
Blues-starandJeong, YunWon 54247df801 implement more csv features
Co-authored-by: Jeong, YunWon <jeong@youknowone.org>
2024-03-05 15:10:35 +09:00
Blues-star e4be47a08b Mark failing tests as expectedFailure 2024-03-05 15:10:35 +09:00
Blues-star d2bf69e354 Update test_csv.py from CPython v3.12.0 2024-03-05 15:10:35 +09:00
Blues-star 88ee64d585 Update csv.py from CPython v3.12.0 2024-03-05 15:10:35 +09:00
Jeong, YunWon d0c827ed38 Merge pull request #5184 from youknowone/symboltable
better symboltable error message
2024-02-29 22:19:46 +09:00
Jeong YunWon d26766b7bc better symboltable error message 2024-02-29 21:30:31 +09:00
Jeong, YunWon e6c6f966f7 Merge pull request #5180 from dchiquito/3.12-collections
Update `_collections_abc.py` and `test_collections.py` to 3.12.2
2024-02-26 13:20:36 +09:00
Daniel Chiquito 407f251866 Un-skip passing typing test
I missed that the typing test I disabled was on a base test class.
Moving the expected failure to the subclass allows the passing test to
pass.
2024-02-24 13:33:17 -05:00
Daniel Chiquito 6cd9e54427 Update test_ordered_dict.py to 3.12.2 2024-02-24 12:00:07 -05:00
Daniel Chiquito c9ec4507ad Disable broken test_repr in test_typing.py
This should be resolved when `typing.py` and `test_typing.py` are
updated to 3.12.
2024-02-24 11:58:26 -05:00
Daniel Chiquito 9481df23e1 Disable test_Buffer
This test will not work until the `__buffer__` and `__release_buffer__`
methods are implemented on the appropriate builtin types, which is
outside the current scope.
2024-02-24 11:02:41 -05:00
Daniel Chiquito 0bd8c2504c Update test_collections.py to 3.12.2 2024-02-23 20:16:16 -05:00
Daniel Chiquito bcb35919a4 Update collections/__init__.py to 3.12.2 2024-02-23 20:14:41 -05:00
Daniel Chiquito 5dc6d5582a Update _collections_abc.py to 3.12.2 2024-02-23 20:13:41 -05:00
Jeong, YunWon a8ab7dd388 Merge pull request #5175 from Blues-star/copy
Update `copy.py` and `test_copy.py` from CPython v3.12
2024-02-21 12:02:54 +09:00
Jeong, YunWon 7c722c23a5 Merge pull request #5174 from Blues-star/code
Update code.py and test_code.py from CPython v3.12
2024-02-21 12:02:05 +09:00
Blues-star 83b8c3a3fc Update test_copy.py from CPython v3.12.0 2024-02-20 19:38:58 +08:00
Blues-star 36a36b200d Update copy.py from CPython v3.12.0 2024-02-20 19:37:42 +08:00
Jeong, YunWon d297e73a55 Merge pull request #5172 from Blues-star/main
Update `configparser.py` and `test_configparser.py` from CPython v3.12
2024-02-20 18:26:05 +09:00
Blues-star 572053df82 est_co_lnotab_is_deprecated, 'test_invalid_bytecode' and est_code_hash_uses_bytecode test exceptions, add TODO 2024-02-19 20:30:06 +08:00
Blues-star def5661728 Update test_code.py from CPython v3.12.0 2024-02-19 20:13:59 +08:00
Blues-star 078cd0d88c Update code.py from CPython v3.12.0 2024-02-19 20:04:09 +08:00
Blues-star d061837467 Update test_configparser.py from CPython v3.12.0 2024-02-19 19:25:17 +08:00
Blues-star defc3ac7f1 Update configparser.py from CPython v3.12.0 2024-02-19 19:22:38 +08:00
Dmitry ErlikhandDmitry Erlikh 97a0705d2e Fix Windows CI (#5168)
* pin openssl version for windows CI

* use cargo vcpkg

* install openssl with vcpkg

* use Swatinem/rust-cache right after dtolnay/rust-toolchain

* cargo install --target-dir=target cargo-vcpkg
---------

Co-authored-by: Dmitry Erlikh <d.erlikh@smartrecruiters.com>
2024-02-19 02:36:18 +09:00
Jeong, YunWon a88c2fe000 Fix miri test failure (#5170) 2024-02-19 00:39:47 +09:00
Jeong, YunWon 2a62ef7344 Merge pull request #5169 from Blues-star/main
Update `calendar.py` and `test_calendar.py`  from CPython v3.12
2024-02-19 00:30:15 +09:00
Blues-star 258342e1ca Update test_calendar.py from CPython v3.12.0 2024-02-18 15:36:45 +08:00
Blues-star 69e8e4be43 Update calendar.py from CPython v3.12.0 2024-02-18 15:33:01 +08:00
Jeong, YunWon 1c93c1630b Merge pull request #5164 from dchiquito/frozenset-hash
Use CPython hash algorithm for frozenset
2024-02-10 14:55:24 +09:00
Jeong, YunWon ec9f2cedd1 Merge pull request #5165 from dchiquito/unused-collections-bool
Removed unused __bool__ methods
2024-02-10 12:00:55 +09:00
Jeong, YunWon 10055772d8 Merge pull request #5163 from dchiquito/fix-benches
Fix benchmarks by replacing rust-cpython with pyo3

- Replace `cpython` and `python3-sys` dependencies with `pyo3`.
- Add `html_report` feature to `criterion`, it will be required in a
  future release.
- Remove `anyhow`. It was unused and cargo cleaned it up automatically.
- Use `compile` and `exec` from within the CPython context to
compile and execute benchmarks. There's probably more overhead to that than
the internal API had, but that overhead should be consistent per
benchmark.
2024-02-10 11:49:17 +09:00
Ikko Eltociear Ashimine 61e40de32b Fix typo in slot.rs (#5162)
overriden -> overridden
2024-02-10 11:43:40 +09:00
Daniel Chiquitoandfanninpm 074d228a7a Use correct TODO syntax
Co-authored-by: fanninpm <luxverdans@sbcglobal.net>
2024-02-09 21:41:45 -05:00
Daniel Chiquito bf461cdebc Use CPython hash algorithm for frozenset
The original hash algorithm just XOR'd all the hashes of the elements of
the set, which is problematic. The CPython algorithm is required to pass
the tests.

- Replace `PyFrozenSet::hash` with CPython's algorithm
- Remove unused `hash_iter_unorded` functions
- Add `frozenset` benchmark
- Enable tests
- Lower performance expectations on effectiveness test
- Adjust `slot::hash_wrapper` so that it doesn't rehash the computed
  hash value in the process of converting PyInt to PyHash.
2024-02-09 21:02:40 -05:00
Daniel Chiquito ffc52ef87c Removed unused __bool__ methods
Python does not define `list().__bool__`, `dict().__bool__`, and
`str().__bool__`, and some tests were failing because they were
defined.
I could not find any references to them and deleting them doesn't
seem to break anything.
2024-02-09 20:58:17 -05:00
Daniel Chiquito ea1f72e92d Replace rust-cpython with pyo3 in benches
Update the actual benchmark harnesses.

Because the internal APIs previously used are no longer available, I
opted to use `compile` and `exec` from within the CPython context to
compile and execute code. There's probably more overhead to that than
the internal API had, but that overhead should be consistent per
benchmark.

If anyone cares about hyperoptimizing benchmarks then they can optimize
the harness as well.
2024-02-09 16:12:47 -05:00
Daniel Chiquito 9693ad9b11 Replace rust-cpython with pyo3 in benchmarks
The benchmarks have been broken since Python 3.10 deprecated the API
they were using to parse and execute CPython baselines. Since then
rust-cpython has been deprecated in favor of pyo3.

- Replace `cpython` and `python3-sys` with `pyo3`.
- Add `html_report` feature to `criterion`, it will be required in a
  future release.
- Remove `anyhow`. It was unused and cargo cleaned it up automatically.
2024-02-09 15:15:22 -05:00