Anders Kaseorg
b7f4ff7283
Parse Python 3.9+ parenthesized context managers
...
Since the upstream grammar for this is not LR(1), we abuse LALRPOP
macros and the Into/TryInto traits to build a cover grammar that
converts to either tuples or `with` items after additional validation.
It’s annoying and ugly, but something like this is basically our only
option short of switching to a more powerful parser algorithm.
Fixes #4145 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2022-12-12 00:47:33 -08:00
harupy
d3ba7e0d8a
Remove expectedFailure decorator
2022-12-10 19:45:34 +09:00
harupy
18293dc80c
Remove decorator on test_boolop
2022-12-05 08:23:07 +09:00
Kangzhi Shi
92e027af34
import tomllib from cpython3.11
2022-11-05 21:36:25 +02:00
Kim, YeonWoo
cc809f3237
Fix repr for union
2022-10-29 15:52:00 +09:00
Devon Hollowood
3739372d43
Implement more accurate hypot()
...
This uses the improved-accuracy hypotenuse algorithm from Borges 2019,
see https://arxiv.org/abs/1904.09481 .
2022-10-26 23:44:13 -07:00
Jeong YunWon
426f9f6359
Merge pull request #4231 from dvermd/improve_string_fstring_coverage
...
Improve string fstring coverage
2022-10-27 13:55:57 +09:00
Jeong YunWon
8ac45b6fb9
Merge pull request #4251 from devonhollowood/cleanup
...
Clean up a few obsolete TODOs in test_math.py
2022-10-27 13:41:35 +09:00
Devon Hollowood
dd5da766ab
Clean up a few obsolete TODOs in test_math.py
...
It looks like these were accidentally left in the codebase after #2773 .
2022-10-26 13:59:00 -07:00
dvermd
af04e3e92c
add format precision for string
2022-10-26 21:30:52 +02:00
dvermd
4f14fc746c
improve col_offset in new line and lalr
2022-10-26 21:30:51 +02:00
dvermd
c816b0b4da
Tag test_fstring failing tests as expectedFailure
2022-10-26 21:30:51 +02:00
dvermd
8dfab087f2
add CPython 3.10.8 fstring test
2022-10-26 21:30:31 +02:00
dvermd
dc595d1276
improve fstring parser
...
part of: #1671
2022-10-26 21:15:24 +02:00
dvermd
f2bfb78d3c
Fix ast types' _fields and use 0-based column
2022-10-27 03:09:38 +09:00
Jim Fasarakis-Hilliard
0b08786a04
Merge pull request #4248 from devonhollowood/log
...
Use improved log2() implementation for log10()
2022-10-25 23:09:45 +03:00
Kim, YeonWoo
b5aa8c8284
Add StopIteration type to marshal
2022-10-25 20:48:14 +09:00
Devon Hollowood
82b4990224
Use improved log2() implementation for log10()
...
This also fixes a bug in the log2() implementation, where very large
negative integer arguments would not raise an exception (and instead
would turn into NaNs).
2022-10-24 18:46:49 -07:00
Jeong YunWon
5466b17f03
Merge pull request #4241 from devonhollowood/log2
...
Allow log2() to work on large integers
2022-10-24 23:45:31 +09:00
Devon Hollowood
893f86e9cf
Respond to reviewer comments
2022-10-23 10:17:43 -07:00
Kim, YeonWoo
b35330b63a
Add _fields attribute to ast
2022-10-24 00:59:49 +09:00
Devon Hollowood
beeb0441ef
Allow log2() to work on large integers
2022-10-22 14:55:14 -07:00
Jeong YunWon
38b169e863
Merge pull request #4217 from oow214/type_annotations
...
Add annotations for type
2022-10-22 15:50:22 +09:00
Kim, YeonWoo
ff057b267d
Remove expectedFailure from test_default_annotations_exist
2022-10-22 01:52:09 +09:00
jeffwang0516
aa40195d24
Remove expected failures for method related tests
2022-10-21 14:29:19 +08:00
Dan Näsman
78586f0275
Chain reduce ( #4232 )
2022-10-21 15:04:25 +09:00
Kuan-Chun Wang
dda6f86ba3
Fix global behavior on class ( #4234 )
2022-10-21 13:06:50 +09:00
Jeong YunWon
2868e874c9
Merge pull request #4235 from dannasman/zip_longest_reduce
...
Add reduce and setstate for zip_longest
2022-10-20 18:02:19 +09:00
Devon Hollowood
052b87b6e7
Fix compatibility bug for min/max builtins
...
This was as simple as fixing the error messages produced when zero
arguments are passed.
2022-10-19 22:34:15 -07:00
Dan Nasman
f6e423c479
add reduce and setstate for zip_longest
2022-10-19 20:59:05 +03:00
CPython Developers
39784367ee
Add smtpd from cpython v3.10.8
2022-10-18 03:26:29 +09:00
Jeong YunWon
1f9d8524ff
Merge pull request #4225 from joohongpark/fix-float-fromhex
...
Fix class method of a float subclass
2022-10-17 15:10:10 +09:00
Charlie Marsh
610d408b4b
Add end locations to all nodes ( #4192 )
2022-10-17 13:18:30 +09:00
joohongpark
8960e78a6c
remove expeted failure
2022-10-16 14:46:23 +09:00
joohongpark
abb994d410
Fix class method
2022-10-16 11:59:05 +09:00
Steve Shi
186990f4f2
Refactor Sequence Protocol ( #4137 )
...
* Refactor Sequence Protocol
* rebase
* fixup
* fix inherit slots
* rebase
* fix io slot_init
* mark unsuccess test_xml_etree
2022-10-10 20:21:15 +02:00
Gyubong
38affeaed1
Add expectedFailure to test_warnings
2022-10-05 08:04:48 +09:00
Gyubong
706398c4c8
Update unittest/runner.py from CPython v3.12.0a0
2022-10-05 07:13:25 +09:00
Jeong YunWon
54d7c34668
Merge pull request #4194 from dvermd/oserror_attributes
...
Fill OSError attributes
2022-10-04 22:55:12 +09:00
dvermd
a18bad2ca3
Fill OSError attributes
2022-10-04 13:34:09 +02:00
Jeong YunWon
bd696b5369
Merge pull request #4199 from jopemachine/fix-harmonic_mean
...
Fix `int.inner_truediv`
2022-10-04 20:03:50 +09:00
Gyubong
773066f2dd
Remove expectedFailure
2022-10-04 17:28:00 +09:00
Jeong YunWon
46ff23977e
Merge pull request #4177 from jopemachine/add-co-names
...
Add `co_names` to `PyCode`
2022-10-04 17:03:17 +09:00
Gyubong
01aad3cf4e
Remove expectedFailure from test_dataclass_no_repr
2022-10-04 13:01:29 +09:00
Gyubong
7b106634a3
Update test_pprint.py from CPython v3.12.0a0
2022-10-04 12:15:04 +09:00
Gyubong
b0f620cd12
Update pprint.py from CPython v3.12.0a0
2022-10-04 12:14:53 +09:00
Gyubong
a6c07bc58f
Update test_code.py from CPython v3.12.0a0
2022-10-04 10:55:13 +09:00
Gyubong
44501f5ebf
Restore YIELD_FROM def_op
2022-10-04 10:53:57 +09:00
Gyubong
33e1007d7c
Update opcode.py from CPython v3.12.0a0
2022-10-04 10:47:30 +09:00
Jeong YunWon
fab53f0391
Merge pull request #4187 from dvermd/structseq_matchargs
...
match args without n_*_fields
2022-10-03 12:08:40 +09:00