Commit Graph
1619 Commits
Author SHA1 Message Date
Jeong, YunWon 0940849029 Borrow tp_descr_get/tp_init arguments and by-value public helpers (#8803)
* Borrow tp_descr_get/tp_init arguments and by-value public helpers

- DescrGetFunc and GetDescriptor::descr_get take
  (&PyObject, Option<&PyObject>, Option<&PyObject>); impls call
  .to_owned() where they store or return an argument.
- InitFunc takes &PyObject and Initializer::init takes &Py<Self>.
- VirtualMachine::get_attribute_opt, print_exception,
  call_get_descriptor(_specific) and other helpers flagged by
  clippy::needless_pass_by_value take &PyObject / &Py<T>; callers in
  crates/, examples/ and tests/ drop the clones made for the call.

Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Grok CLI:grok-4.7

* Pass the borrowed zelf to internal_close in WindowsConsoleIO init

Assisted-by: Claude Code:claude-opus-5-5

* Fix borrowed signatures missed by the rebase

OrderedDict.init, classmethod_descriptor.descr_get, and the warnings
get_attribute_opt callers still used owned handles.

Assisted-by: Grok CLI:grok-4.7
2026-09-24 14:25:07 +09:00
Joshua Megnauth 86c7fa20c4 Fix missing workspace lints & fix lints (#8781)
Some of the workspace packages were missing the `[lints]` table. I
enabled the lints then fixed the resulting errors.
2026-09-24 07:49:50 +09:00
Jeong, YunWon 4cc7559aeb Drop gc_traversal from CodSpeed benches (#8750)
Remove benches/benchmarks/gc_traversal.py so CodSpeed no longer
includes that execution benchmark.

Assisted-by: Grok:4.6
2026-09-20 14:56:46 +09:00
Jeong, YunWon 0c5a47bae5 Unskip MP tests and shrink the flaky MP CI list (#8731)
* Unskip multiprocessing RLock repr test

Assisted-by: Grok:4.6

* Drop stable modules from the flaky MP CI list

Assisted-by: Grok:4.6

* Keep only multiprocessing fork on the flaky MP list

Assisted-by: Grok:4.6

* Drop gc_collect bench and unbreak two CI jobs

Remove benches/benchmarks/gc_collect.py so CodSpeed no longer
includes that execution benchmark.

On Windows, run test_multiprocessing_spawn serially; the
parallel snippets job hit a regrtest worker temp-dir error
while that suite was still running.

Install cargo-shear from a pinned prebuilt binary so the job
does not fall back to compiling 1.13.4 from source.

Assisted-by: Grok:4.6

* Unskip hang tests that now pass under -m test

Drop the RustPython hang skips on interpreter shutdown,
submit-after-shutdown, and connection pickling after they
passed with rustpython -m test.

Remove the unused expectedFailureIf around killpg on the
resource tracker deadlock test; os.killpg is present.

Pass matrix flaky-MP extras through the job environment
instead of interpolating them into the run script.

Assisted-by: Grok:4.6

* Restore hang skips and isolate spawn on CI

Put test_multiprocessing_spawn and
test_multiprocessing_forkserver back on the serial flaky MP
list. Ubuntu timed out in spawn test_notify_all under -j, and
forkserver.test_processes needed a rerun.

Restore the hang skips on interpreter shutdown, submit-after
shutdown, and connection pickling.

Assisted-by: Grok:4.6
2026-09-19 10:38:05 +09:00
Lee Dogeon 99a63f92aa benchmarks: add pyperformance workloads (#8633)
Add dependency-free CPU-bound workloads adapted from pyperformance 1.14.0 to cover interpreter, standard-library serialization, regex, numeric, and garbage-collection paths under the existing Criterion and CodSpeed harnesses. Keep inputs deterministic and scale expensive cases for simulation while checking that benchmark execution does not leak interpreter state.

Assisted-by: Codex:gpt-5.6-sol
2026-09-01 10:03:29 +09:00
Jeong YunWon e62a164f4d Move tests -> extra_tests 2020-09-13 06:58:57 +09:00
mode 3d8854527a Implement dict doc & reversed magic method
* Added dict doc & reversed magic method
* change pytest to testutils
* Implement reversed dictionary
2020-09-12 00:48:56 +09:00
Kangzhi Shi 7a2e4cd098 Add array test cmp operation on different type 2020-09-06 13:53:25 +02:00
Kangzhi Shi 48909327db Fix array compare oparation 2020-09-06 13:53:20 +02:00
Steve Shi 05b7acc95f Merge branch 'master' into dev_array_del 2020-09-04 10:25:47 +02:00
Noah 71344bbcf0 Merge pull request #2173 from qingshi163/dev3
Fix: array with float type should accept integer parameter
2020-09-02 08:32:11 -05:00
Kangzhi Shi fa6b8208ec Implement array delitem by slice 2020-09-02 11:37:27 +02:00
Noah 3b2a16f3b2 Merge pull request #2164 from skinny121/jit-args
Support arguments in jitted functions
2020-09-01 13:40:38 -05:00
Steve Shi ff05200faf Merge branch 'master' into dev3 2020-08-31 19:28:09 +02:00
Kangzhi Shi 1150f507e2 Fix: array with float type should accept integer parameter 2020-08-31 11:48:50 +02:00
Ben Lewis b79d7edb29 Fix not type checking arguments to jit function. 2020-08-31 20:19:36 +12:00
Kangzhi Shi 1922725af5 Implement array setitem by slice 2020-08-30 16:51:52 +02:00
Ben Lewis 751b54952f Fix bugs with passing arguments to jitted functions. 2020-08-29 16:01:52 +12:00
Ben Lewis c3f18a306e Use libffi to call jitted functions. 2020-08-28 19:52:04 +12:00
Noah 9598392aea Allow floats in jitted functions (#2150) 2020-08-26 08:36:56 -05:00
Ben LewisandNoah 93bbf19fd4 Fix specifying multiple features in test_snippets.py
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
2020-08-25 07:16:59 +12:00
Ben Lewis e70b2db78d Add jit feature when running tests, and run rustfmt. 2020-08-25 07:16:58 +12:00
Ben Lewis cfb8018a4f Add jit test. 2020-08-25 07:16:58 +12:00
Youngchan Lee ec5d168de2 Implement objcomplex::parse_str() to replace Complex64::from_str() 2020-08-18 02:19:58 +09:00
ugaemi 32584a6c63 Fix test bug 2020-08-16 02:59:55 +09:00
ugaemi 620e4b93ea Add __ne__ for array, bytearray 2020-08-16 02:59:15 +09:00
Alan Justino edbc7a94e4 Disable gc on RustPython tests 2020-08-12 14:00:02 -05:00
Jeong YunWon 651ad14b3d Fix whats_left.sh 2020-08-11 02:18:20 +09:00
hatee-hatee-hatee-hoandDaniel Alley 4903f8e5ab Implemented SetIterator
skip test TestWeirdBugs.test_merge_and_mutate

Co-Authored-By: Daniel Alley <dalley@redhat.com>
2020-08-09 16:24:38 +09:00
Basix 1505c9a88e Add tests 2020-07-26 17:08:31 +09:00
Depasse Arthur 12dee0d55a Adding base snippets tests for os.chown 2020-07-24 16:18:48 +02:00
Depasse Arthur dfffca4696 Running flake8 linter on test file 2020-07-24 16:18:48 +02:00
Antonio Yang ce0b511a31 init nestied formatting test case 2020-07-18 11:44:58 +08:00
Noah 55a95660c0 Merge branch 'master' into class-assign 2020-07-14 11:18:12 -05:00
BasixandNoah 94fa757479 Fix typo
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
2020-07-14 08:30:23 +09:00
Basix 4354d0b98a Fix file reading failure in non-ascii path 2020-07-13 23:44:37 +09:00
Ben Lewis f5f916f365 Support assigning to __class__. 2020-07-12 09:12:41 +12:00
lynskylate c609a6d33c Add annotation setup 2020-07-07 06:00:50 +08:00
Noah e06641dbe1 Fix all the weird Windows bugs 2020-06-22 04:10:44 -05:00
Jeong YunWon 8e8efe0ec8 reform every TODO: RUSTPYTHON to same format 2020-06-17 18:47:13 +09:00
Noah 2fc90e17ac Fix error messages for index overflows 2020-06-06 17:14:32 -05:00
Aviv Palivoda 38c0bf9d08 Support sign before dot in float parsing 2020-05-29 18:07:31 +03:00
Aviv Palivoda 7b6b92938f Support converting from string in complex 2020-05-29 17:06:41 +03:00
Noah 0ec86f17ee Add num_expected_failures stat to jsontests 2020-05-28 23:38:28 -05:00
Noah 0d7d4f0472 Add expected_failure result type to jsontests 2020-05-27 20:53:25 -05:00
Noah fc2f2d13f1 Add TODO in snippets.test_threading 2020-05-23 18:49:19 -05:00
TheAnyKey daaf906320 Implement Python 3.9 style string functions: removeprefix and removesuffix PEP616
* implement and test Py39 string operations removeprefix and removesuffix.
* Added test snippets for it using an also contained extension of testutils
2020-05-19 09:17:13 +09:00
Jeong YunWon 86dd0d6bfd suppress new version of flake8 lint error for test 2020-05-13 03:08:44 +09:00
TheAnyKey da09370fb6 Revert "merged from TheAnyKey/p39_string_rem_pre_suffix"
This reverts commit 84a6e8e8df.
2020-05-08 15:32:12 +00:00
TheAnyKey 84a6e8e8df merged from TheAnyKey/p39_string_rem_pre_suffix 2020-05-08 15:28:46 +00:00