Commit Graph

53 Commits

Author SHA1 Message Date
Jeong YunWon
cdd38488f8 allow AsciiStr/AsciiString -> PyStr conversion 2021-10-11 02:01:14 +09:00
Jeong YunWon
afe9b9cde0 vm.ctx.new_bool returns PyIntRef 2021-10-11 02:01:14 +09:00
Jeong YunWon
616dfc19e2 vm.new_tuple to convert rust tuple to python tuple 2021-10-11 01:06:07 +09:00
Jeong YunWon
40379a9bc1 new_float returns PyFloat 2021-10-11 01:05:38 +09:00
Jeong YunWon
741cfea565 vm.ctx.new_int returns PyInt 2021-10-11 01:05:38 +09:00
snowapril
1deb59ce40 modify PyType::name caller codes to use BorrowedValue
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-10 16:07:24 +09:00
Jeong YunWon
c83eb12d0a Merge pull request #3258 from youknowone/ascii-buffer
ArgAsciiBuffer
2021-10-09 16:27:47 +09:00
Noa
c778480404 WAPM release script 2021-10-08 17:02:18 -05:00
Jeong YunWon
e19609ced3 Use PyRef::into_object(vm) instead of into_ref(vm).into() combo 2021-10-08 01:56:02 +09:00
Jeong YunWon
4fb1cdb316 PyObjectWrap 2021-10-08 01:56:00 +09:00
Ben Lewis
48e5feb994 Add AsciiBytesLike to accept both an ascii string or a buffer. 2021-10-07 23:23:32 +09:00
Jeong YunWon
5bee8fc8f6 Merge pull request #3240 from DimitrisJim/numlike_args
Add numlike for handling of numlike arguments
2021-10-07 22:27:51 +09:00
jfh
c0420721e0 Rename from ArgTypeLike to ArgIntoType, numlike to number. 2021-10-07 15:30:57 +03:00
jfh
b2a2238566 Add ArgBoolLike. 2021-10-07 12:56:01 +03:00
jfh
856f77fb77 Add ArgFloatLike. 2021-10-07 12:34:30 +03:00
jfh
7387324f59 Add ArgComplexLike 2021-10-07 12:06:26 +03:00
Moreal
12709e6fde Use pymodule instead of py_module! for re 2021-10-07 02:16:11 +09:00
Jeong YunWon
d49ab19fab Merge pull request #3209 from osman-turan/main
Add missing randbytes method on random
2021-10-07 01:14:22 +09:00
Jim Fasarakis-Hilliard
c8651a255b Merge pull request #3237 from DimitrisJim/restore_test_cmath
Restore test_cmath to original form.
2021-10-06 19:08:55 +03:00
Osman Turan
0f6a773187 Merge branch 'RustPython:main' into main 2021-10-06 17:32:18 +03:00
jfh
ac40213a6a Restore test_cmath to original form. 2021-10-06 17:20:42 +03:00
Jeong YunWon
fccbc45a2e Merge pull request #3172 from youknowone/try-into-object
PyObjectRef::try_into_value
2021-10-06 22:25:41 +09:00
Jeong YunWon
f9fbc486d8 Merge pull request #3136 from youknowone/buffer-writable
ResizeGuard -> BufferResizeGuard
2021-10-06 22:25:01 +09:00
Jeong YunWon
cf9e3f301a Merge pull request #3233 from DimitrisJim/use_try
Clean up overflow cases.
2021-10-06 22:19:29 +09:00
Jeong YunWon
ad111f19b7 ResizeGuard -> BufferResizeGuard 2021-10-06 20:21:36 +09:00
Jeong YunWon
38b62e2585 PyObjectRef::try_into_value
as counterpart of TryFromObject::try_from_object

This is useful when the type to infer is known
2021-10-06 20:15:13 +09:00
jfh
d5b7f1ead1 Clean up overflow cases. 2021-10-06 14:00:38 +03:00
Jeong YunWon
92de3619fa move IntoPy{Object, Exception, Result} to vm::function
which are used to define function arguments - those functions are mostly placed in the crate
2021-10-06 19:10:16 +09:00
rishit khandelwal
1823dc09fa add asin and acos 2021-10-05 17:01:49 +05:30
Noah
bbdaa98731 obj2txt safety comment 2021-10-04 12:46:01 -05:00
Jeong YunWon
efce02f19d Merge pull request #3210 from RustPython/coolreader18/fix-windows-ssl
Fix windows ssl
2021-10-05 02:43:19 +09:00
Jeong YunWon
dba32493d6 Add safety comment to stdlib/src/ssl.rs 2021-10-05 02:43:08 +09:00
Jeong YunWon
bbbdaf32e4 Merge pull request #3202 from youknowone/pyiter-more
Remove not very useful iterator utilty functions
2021-10-04 16:19:49 +09:00
Jim Fasarakis-Hilliard
c1e81bf963 Merge pull request #3137 from youknowone/fix-array-repr
Fix array repr
2021-10-04 08:13:10 +03:00
Jeong YunWon
32770249eb remove iterator::stop_iter_with_value 2021-10-04 04:53:46 +09:00
Noah
7ba21876ad Remove manual ssl bindings 2021-10-02 22:20:31 -05:00
Noah
7d478789d2 Fix obj2txt 2021-10-02 22:20:31 -05:00
Noah
f8c45d14f0 Improve SSLError message 2021-10-02 22:20:31 -05:00
Noah
6d4de560f7 Don't use RAND_pseudo_bytes anymore 2021-10-02 22:20:31 -05:00
Noah
8223cb3f68 Fix load_verify_locations to load all certs in cadata 2021-10-02 22:20:31 -05:00
Osman Turan
131c0b195d Add missing randbytes method on random 2021-10-03 05:38:16 +03:00
Jim Fasarakis-Hilliard
0edb11ac1e Merge pull request #3195 from youknowone/py-names
clean up py* attributes names
2021-10-02 16:00:10 +03:00
Jeong YunWon
2c8020a081 clean up py* attributes names 2021-10-02 16:59:33 +09:00
snowapril
aa2a7f01ee add PyMapping as PyObjectRef wrapper
Modify original `PyMapping` to `PyMappingMethods` and create `PyMapping`
struct as `PyObjectRef` wrapper for implementing `PyMapping_*`
functions. https://docs.python.org/3/c-api/mapping.html

Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 16:45:34 +09:00
snowapril
4fd0681498 move mapping protocol to rustpython_vm::protocol
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-02 14:47:19 +09:00
snowapril
1fbbdaabe3 support delitem in ass_subscript 2021-10-02 14:43:20 +09:00
snowapril
fc761b4e5b add mapping protocol to proper types 2021-10-02 14:43:20 +09:00
Jim Fasarakis-Hilliard
2a31646d2f Merge pull request #3181 from emhagman/cmath-sinh-cosh
Add sinh and cosh to cmath implementation
2021-10-01 21:03:31 +03:00
Eric Hagman
014dc9d20f fix: run cargo fmt 2021-10-01 13:04:56 -04:00
Eric Hagman
787f6c1be6 Merge remote-tracking branch 'upstream/main' into cmath-sinh-cosh 2021-10-01 10:00:09 -04:00