Jiseok CHOI
2e16f51c68
use FromArgs
2025-09-01 15:43:07 +09:00
Jiseok CHOI
a2b194a6f8
sqlite3: Support 'size' keyword argument in Cursor::fetchmany
2025-09-01 15:23:04 +09:00
ShaharNaveh
d28164c150
Update test_ucn.py from 3.13.7
2025-08-24 00:17:50 +03:00
Jiseok CHOI
e909e32f31
sqlite: Fix missing ProgrammingError for parameter mismatch ( #6104 )
2025-08-21 13:19:38 +09:00
Shahar Naveh
9417e1023d
Update xml from 3.13.7 ( #6100 )
2025-08-21 13:15:39 +09:00
Jeong, YunWon
bfc513e997
Fix future clippy warnings ( #6103 )
2025-08-20 17:34:29 +09:00
Shahar Naveh
242814fa72
Update locale.py from 3.13.6 and made _locale available on android ( #6091 )
2025-08-20 13:44:57 +09:00
Jeong, YunWon
158c027c23
Rust 1.89 clippy fix ( #6082 )
2025-08-08 15:00:18 +09:00
Jack O'Connor
b480d234dd
Reorder struct lconv members to match locale.h ( #6073 )
...
`struct lconv` in locale.h
https://codebrowser.dev/glibc/glibc/locale/locale.h.html#lconv::int_p_cs_precedes .
Order of relevant section in glibc locale.h
```C
char int_p_cs_precedes;
char int_p_sep_by_space;
char int_n_cs_precedes;
char int_n_sep_by_space;
```
2025-08-06 10:30:23 +09:00
Jiseok CHOI
a58d582001
Implement unsupported ops for sqlite3.Blob ( #6066 )
2025-08-05 17:53:06 +09:00
Jiseok CHOI
ec0a2325e4
Use Unconstructible trait for internal types
2025-08-01 18:04:15 +09:00
Jiseok CHOI
b2d6594bd9
Prevent direct instantiation of sqlite3.{Statement,Blob}
2025-08-01 13:39:45 +09:00
Jiseok CHOI
1e6da5f430
sqlite: Align Connection.__call__ error handling with CPython ( #6042 )
2025-07-30 14:05:17 +09:00
Jeong, YunWon
cee579e7ea
Merge pull request #6047 from youknowone/wtf8
2025-07-30 12:45:03 +09:00
Shahar Naveh
4bf32a04f4
Apply some clipy lints ( #6045 )
2025-07-30 12:16:02 +09:00
Jeong YunWon
d46c882347
remove try_to_str
...
Rewrite sqlite3 UTF8 validation
2025-07-30 12:14:47 +09:00
Jiseok CHOI
d8f1d188c3
stdlib(sqlite): Raise ProgrammingError in closed Blob context manager ( #6041 )
2025-07-27 21:47:05 +09:00
Jiseok CHOI
38ca076cb5
feat(stdlib/sqlite): Implement slice assignment for Blob ( #6039 )
2025-07-27 10:43:11 +09:00
Jack O'Connor
4079776c36
Add kde function and tests to RustPython statistics module ( #6030 )
...
* Copy CPython 3.13 statistics module into RustPython
* Adjust CPython "magic constants" in KDE tests
## test_kde
I'm not too sure why but this one takes a few seconds to run the second
for loop which calculates the cumulative distribution and does a rough
calculation of the area under the curve.
## test_kde_random
I have a lower bound for RustPython to sort a random list of 1_000_000
numbers on my laptop of > 1 hour. By dropping n to 30_000 sort will not
take an egregious amount of time to run. It is then necessary to lower
the tolerance for the math.isclose check, or the computed values may
**randomly** fail due to the higher variance caused by the smaller
sample size.
* Reintroduce expected failure in test_statistics.TestNormalDict.test_slots
* Sync Rust `normal_dist_inv_cdf` with Python equivalent
See https://github.com/python/cpython/pull/95265 .
To quote:
> Restores alignment with random.gauss(mu, sigma) and
random.normalvariate(mu, sigma) both. of which are equivalent to
sampling from NormalDist(mu, sigma).inv_cdf(random()). The two functions
in the random module happy accept sigma=0 and give a well-defined
result.
> This also lets the function gently handle a sigma getting smaller,
eventually becoming zero. As sigma decrease, NormalDist(mu,
sigma).inv_cdf(p) forms a tighter and tighter internal around mu and
becoming exactly mu in the limit. For example, NormalDist(100,
1E-300).inv_cdf(0.3) cleanly evaluates to 100.0but withsigma=1e-500``
the function previously would raised an unexpected error.
2025-07-26 00:42:22 +09:00
Shahar Naveh
c232b7f1f8
Update csv.py from 3.13.5 ( #6035 )
...
* Use `raise_if_stop!` macro
* Update `csv.py` from 3.13.5
* Mark failing tests
2025-07-25 19:08:01 +09:00
Jiseok CHOI
fb9147736d
stdlib(sqlite3): Raise ProgrammingError for missing named parameter ( #6036 )
2025-07-25 19:02:56 +09:00
Shahar Naveh
01edb93957
Resolve libc::RLIM_NLIMITS warning on android ( #6025 )
...
* Resolve warning on android
* Apply CodeRabbit suggestion
2025-07-25 10:46:32 +09:00
Jiseok CHOI
bcf56279ec
Raise UnicodeEncodeError for surrogates in sqlite.executescript ( #6024 )
2025-07-25 10:45:33 +09:00
Jiseok CHOI
57bdf35ee6
Enforce valid UTF-8 encoding for sqlite collation names ( #6015 )
...
* Make public `PyStr::ensure_valid_utf8`
* Enforce valid UTF-8 encoding for sqlite collation names
2025-07-21 23:42:47 +09:00
Jiseok CHOI
bbe98ddd86
Construct detailed message on text decode failure ( #6014 )
2025-07-21 22:33:09 +09:00
Jiseok CHOI
6f80ac0edd
Align SQL comment parsing with CPython ( #5996 )
2025-07-20 10:51:42 +09:00
Jiseok CHOI
f8d03fd680
Correctly implement isolation_level setter to handle deletion ( #5983 )
2025-07-18 23:08:51 +09:00
Jeong, YunWon
6a3dff63bb
Downcastable ( #5986 )
...
* simplify int power
* downcastasble
* deprecate payload*
2025-07-16 18:00:18 +09:00
Jiseok CHOI
5957f5d31a
Fix off-by-one error in SQL length limit check ( #5982 )
2025-07-16 01:53:20 +09:00
Jiseok CHOI
f465af3a7c
Reject SQL queries containing null characters ( #5981 )
2025-07-16 01:52:28 +09:00
Jiseok CHOI
6d2152cafe
Correctly handle None for protocol in adapt(..) ( #5979 )
2025-07-16 01:49:53 +09:00
Jiseok CHOI
ed433837b3
Introduce PyUtf8Str and fix(sqlite): validate surrogates in SQL statements ( #5969 )
...
* fix(sqlite): validate surrogates in SQL statements
* Add `PyUtf8Str` wrapper for safe conversion
2025-07-15 00:54:42 +09:00
Jiseok CHOI
5ab64b7002
fix(sqlite): align adaptation protocol with CPython ( #5964 )
2025-07-14 14:22:52 +09:00
Jiseok CHOI
d42e8f0042
fix(sqlite): produce correct error for surrogate characters ( #5962 )
2025-07-14 14:21:36 +09:00
Jiseok CHOI
3a6a766a03
fix(sqlite): implement PARSE_COLNAMES column name parsing ( #5923 )
2025-07-10 00:18:40 +09:00
Jiseok CHOI
e6fdef43dc
fix(sqlite): autocommit mode transaction handling to match CPython ( #5918 )
2025-07-09 20:13:26 +09:00
Jiseok CHOI
341341520e
Fix SQLite large integer overflow error handling ( #5916 )
2025-07-09 17:14:45 +09:00
Shahar Naveh
694fe50241
Use const fn where possible ( #5894 )
2025-07-04 22:26:20 +09:00
Shahar Naveh
4bd328906e
Update resource from 3.13.5 ( #5893 )
2025-07-04 10:09:06 +09:00
Shahar Naveh
69545c0798
Use Self where possible ( #5892 )
2025-07-04 10:08:43 +09:00
Jeong, YunWon
d40cbbb451
Fix cspell warning ( #5890 )
...
* Fix cspell warning
* cspell: -> spell-checker:
2025-07-03 12:04:43 +09:00
Jeong, YunWon
fffa735868
__class_getitem__ ( #5888 )
2025-07-03 11:01:53 +09:00
Jeong, YunWon
07a04acfaa
Allow heap getset creation ( #5854 )
...
* Update _threading_local.py
* allow heap-getset
2025-06-29 03:03:19 +09:00
Shahar Naveh
8cac4335b4
Constify functions & General nitpicks ( #5858 )
...
* General cleanups
* Add some newlines
* Use bitlag match
* More constify
* Don't convert to str twice
* constify more
* Use match directly instead of if & match!
* Constify more
* Constify more
* more consts
* Constify more
* Constify more
* Don't use bitflags_match macro
2025-06-28 23:08:30 +09:00
Jeong YunWon
3673372d3d
Fix cspell warnings
2025-06-27 12:32:59 +09:00
Jeong YunWon
993ea8923c
Rename members
2025-06-27 12:32:59 +09:00
Jeong, YunWon
fe2c9bf361
Fix stable clippy ( #5843 )
2025-06-27 12:12:21 +09:00
Shahar Naveh
1ae07813ee
Remove redundent to_owned() and to_string() calls ( #5836 )
...
* Remove redundent String conversion for errors
* cargo fmt
2025-06-25 23:42:26 +09:00
Shahar Naveh
ab09de8542
Remove unnecessary string conversions in error message construction ( #5826 )
...
* Make `new_X_error` recv `impl Into<String>`
* Maks the rest of the methods to be generic
* Remove `.to_owned()` from more files
2025-06-25 01:43:41 +09:00
Jeong, YunWon
6a992d4fa2
Add hashlib hasher repr ( #5833 )
2025-06-24 20:09:24 +09:00