-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update python libraries and tests from CPython 3.11 #4564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Pasting the comment (#4592 (review)) here too for anyone else who might need it: You can use the following command to test your changes locally (in a manner similar to RustPython's CI): # this runs all of the tests (not necessary if you know which test is affected)
cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v
# this runs only the test suite named "test_whatever" (usually located at `Lib/test/test_whatever.py`)
cargo run --release --features ssl,jit -- -m test -j 1 -u all --slowest --fail-env-changed -v test_whatever For a list of all resources and more command-line options, you can execute |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Thanks to everyone who participated in this series of patches! I am going to close this issue in favor of #5104 |
Though it will be sometimes blocked by rust side issues, don't worry!
Please just create PR about the broken test and and create issues related to the new bugs.
If you are new to updating cpython libraries, this guide will be useful:
https://github.com/RustPython/RustPython/wiki/How-to-update-test-files
When updating module Lib/X, please don't forget to also update Lib/test/test_X
A few libraries doesn't need to be updated because CPython also kept it same as previous version. In that case, please leave a comment to let us mark it as done. Thank you!
Tips
git checkout v3.11.2
from CPython repository.cargo run --features ssl -- -m test -v <test_name>
. e.g. If you changedtest_unicode.py
,cargo run --features ssl -- -m test -v test_unicode
--release
likecargo run --release --features ssl -- -m test -v test_unicode
List of libraries
__future__.py
from __future__ import generator_stop
#4060?__hello__.py
Update __hello__ from cpython #4570__phello__
Update __hello__ from cpython #4570_collections_abc.py
updated _collections_abc.py and test_collections.py to CPython 3.11.2 #5016_compat_pickle.py
_compression.py
Update _compression, gzip, and test_gzip for CPython v3.11.2 #4688_markupbase.py
Update _markupbase, html/parser for CPython v3.11.2 #4703unchanged_osx_support.py
_py_abc.py
_pycodecs.py
_pydecimal.py
_pyio.py
_sitebuiltins.py
_threading_local.py
_weakrefset.py
abc.py
Update abc.py from Python 3.11 #4985aifc.py
antigravity.py
— feat(antigravity): update to 3.11 #4591argparse.py
— feat(argparse): update to 3.11 #4592ast.py
asynchat.py
asyncio
asyncore.py
base64.py
Commit 185111dbdb.py
Deprecated.binhex.py
bisect.py
Update bisect.py and test_bisect.py from CPython v3.11.2 #4774bz2.py
Unchangedcalendar.py
Update calendar.py from CPython 3.11 #4669cgi.py
cgitb.py
chunk.py
cmd.py
code.py
codecs.py
codeop.py
collections
_collections.OrderedDict
type (a.k.a.collections.OrderedDict
) #3418colorsys.py
compileall.py
Update compileall to CPython 3.11.5 #5070concurrent
configparser.py
feat(configparser): update to 3.11 #4595contextlib.py
Update test/test_contextlib.py from CPython 3.11.2 #4649 Update contextlib.py and test_contextlib from CPython 3.11.2 #4659contextvars.py
contextvars
) #3188copy.py
Update copy.py from CPython 3.11 #4674copyreg.py
csv.py
ctypes
dataclasses.py
pendingmatch
statement support.datetime.py
dbm
decimal.py
difflib.py
update test_difflib from CPython3.11.2 #5063dis.py
distutils
doctest.py
email
encodings
ensurepip
Update ensurepip from cpython 3.11.2 #4590enum.py
Update enum to CPython 3.11.5 #5074filecmp.py
fileinput.py
Update fileinput to CPython 3.11.5 #5071fnmatch.py
Deprecatedformatter.py
fractions.py
Update fractions to CPython 3.11.5 #5072ftplib.py
Update ftplib to CPython 3.11.5 #5073functools.py
gc.py
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
Update glob.py and test/test_glob.py from CPython v3.11.2 #4744graphlib.py
gzip.py
Update _compression, gzip, and test_gzip for CPython v3.11.2 #4688hashlib.py
heapq.py
hmac.py
unchangedhtml
http
imghdr.py
imp.py
importlib
Update importlib from CPython 3.11.2 #4561inspect.py
io.py
ipaddress.py
json
keyword.py
unchangedlinecache.py
locale.py
Update test.support from CPython 3.11.2 #4537logging
mailbox.py
mimetypes.py
multiprocessing
netrc.py
nntplib.py
ntpath.py
nturl2path.py
numbers.py
opcode.py
unchangedoperator.py
optparse.py
unchangedos.py
pathlib.py
pdb.py
pickle.py
array.__reduce__
toarray.__reduce_ex__
#3876pickletools.py
pkgutil.py
platform.py
plistlib.py
posixpath.py
pprint.py
pty.py
py_compile.py
pydoc.py
pydoc_data
queue.py
quopri.py
random.py
Fix int.from_bytes and Update random.py and test/test_random.py from CPython v3.11.2 #4748re.py
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py
signal.py
site.py
smtpd.py
smtplib.py
sndhdr.py
socket.py
socketserver.py
sqlite3
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py
statistics.py
string.py
stringprep.py
struct.py
subprocess.py
Update subprocess to CPython 3.11 #4981sunau.py
sysconfig.py
Update sysconfig, test_sys and test_syslog from CPython 3.11 #4569tabnanny.py
tarfile.py
telnetlib.py
tempfile.py
textwrap.py
this.py
threading.py
timeit.py
token.py
tokenize.py
tomllib
trace.py
Update trace from CPython 3.11.2 #4586traceback.py
tty.py
types.py
typing.py
unittest
Update unittest from CPython 3.11 #4560urllib
uu.py
uuid.py
venv
warnings.py
weakref.py
webbrowser.py
wsgiref
xdrlib.py
xml
xmlrpc
zipapp.py
zipfile.py
zipimport.py
wasi
instead ofunknown
#4539PYTHONSAFEPATH
#4541List of tests without python libraries
test/test___all__.py
test/test__locale.py
test/test__opcode.py
test/test_abstract_numbers.py
test/test_array.py
Update test_array.py from Cpython v3.11.2 #4745array.__reduce__
toarray.__reduce_ex__
#3876test/test_asdl_parser.py
test/test_asyncgen.py
test/test_atexit.py
Update test_atexit from cpython 3.11.2 #4621test/test_audioop.py
test/test_audit.py
unchangedtest/test_augassign.py
test/test_baseexception.py
— Update test_baseexception.py from cpython 3.11.2 #4624test/test_bigaddrspace.py
test/test_bigmem.py
Update test_bigmem from cpython 3.11.2 #4625test/test_binascii.py
strict_mode
keyword parameter inbinascii.a2b_base64()
#4374unchangedtest/test_binop.py
test/test_bool.py
Update test/test_bool from cpython 3.11.2 #4631test/test_buffer.py
Update test/test_buffer from CPython 3.11.2 #4632unchangedtest/test_bufio.py
test/test_builtin.py
update test_builtin.py from cpython v3.11.2 #4765test/test_bytes.py
Update test_bytes.py from CPython v3.11.2 #4746test/test_bz2.py
test/test_c_locale_coercion.py
test/test_call.py
unchangedtest/test_charmapcodec.py
test/test_check_c_globals.py
test/test_class.py
test/test_clinic.py
unchangedtest/test_cmath.py
test/test_cmd_line.py
Update test_cmd_line from Cpython v3.11.2 #4801test/test_cmd_line_script.py
Update test_cmd_line_script from Cpython v3.11.2 #4802unchangedtest/test_code_module.py
unchangedtest/test_codeccallbacks.py
test/test_compare.py
Update test_compare from Cpython v3.11.2 #4803test/test_compile.py
Update test_compile from Cpython v3.11.2 #4804test/test_complex.py
update test_complex.py from cpython 3.11.2 #4755unchangedtest/test_contains.py
test/test_context.py
Update test_context from Cpython v3.11.2 #4805test/test_contextlib_async.py
test/test_coroutines.py
CPython specifictest/test_crashers.py
Update test_crashers from Cpython v3.11.2 #4807test/test_csv.py
test/test_decorators.py
Update test_decorators from Cpython v3.11.2 #4806unchangedtest/test_defaultdict.py
test/test_deque.py
updated test_deque.py from CPython v3.11.2 #4761unchangedtest/test_descr.py
test/test_descrtut.py
test/test_devpoll.py
Update test_devpoll from Cpython v3.11.2 #4808test/test_dict.py
Update test_dict.py from CPython v3.11.2 #4763Not implemented in RustPythontest/test_dict_version.py
Update test_dict_version.py from Cpython v3.11.2 #4809unchangedtest/test_dictcomps.py
test/test_dictviews.py
Update test_dictviews.py from Cpython v3.11.2 #4810test/test_docxmlrpc.py
Update test_docxmlrpc.py from Cpython v3.11.2 #4811test/test_dtrace.py
Update test_dtrace.py from Cpython v3.11.2 #4812test/test_dynamic.py
Update test_dynamic.py from Cpython v3.11.2 #4813unchangedtest/test_dynamicclassattribute.py
test/test_eintr.py
Update test_eintr.py from Cpython v3.11.2 #4814CPython specific.test/test_embed.py
Update test_embed.py from Cpython v3.11.2 #4815test/test_enumerate.py
test/test_eof.py
Add test_eof.py from Cpython v3.11.2 #4753test/test_epoll.py
Update test_epoll.py from Cpython v3.11.2 #4816unchangedtest/test_errno.py
test/test_except_star.py
test/test_exception_group.py
Add test_exception_group.py from Cpython v3.11.2 #4817test/test_exception_hierarchy.py
Update test_exception_hierarchy.py from Cpython v3.11.2 #4818test/test_exception_variations.py
test/test_exceptions.py
Update test_exceptions.py from Cpython v3.11.2 #4819test/test_extcall.py
test/test_faulthandler.py
Update test_faulthandler.py from Cpython v3.11.2 #4820unchangedtest/test_fcntl.py
unchangedtest/test_file.py
test/test_file_eintr.py
test/test_fileio.py
Update test_fileio.py from Cpython v3.11.2 #4821CPython specifictest/test_fileutils.py
Add test_fileutils.py from Cpython v3.11.2 #4822test/test_finalization.py
test/test_float.py
Update test_float.py from Cpython v3.11.2 #4823CPython specifictest/test_flufl.py
Add test_flufl.py from Cpython v3.11.2 #4824test/test_fork1.py
test/test_format.py
Update test_format.py from Cpython v3.11.2 #4825test/test_frame.py
test/test_frozen.py
test/test_fstring.py
test/test_funcattrs.py
Add test_funcattrs.py from Cpython v3.11.2 #4829test/test_future.py
Update test_future.py from Cpython v3.11.2 #4830unchangedtest/test_future3.py
unchangedtest/test_future4.py
unchangedtest/test_future5.py
test/test_gdb.py
test/test_generator_stop.py
test/test_generators.py
test/test_genericalias.py
Update test_genericclass.py from Cpython v3.11.2 #4831test/test_genericclass.py
test/test_genexps.py
test/test_getpath.py
test/test_global.py
Update test_global.py from Cpython v3.11.2 #4832test/test_grammar.py
test/test_grp.py
Update test_grp.py from Cpython v3.11.2 #4833test/test_hash.py
Update test_hash.py from Cpython v3.11.2 #4834test/test_hashlib.py
Update test_hashlib.py from Cpython v3.11.2 & refactor hashlib #4835unchangedtest/test_index.py
test/test_int.py
unchangedtest/test_int_literal.py
test/test_interpreters.py
unchangedtest/test_ioctl.py
unchangedtest/test_isinstance.py
test/test_iter.py
unchangedtest/test_iterlen.py
test/test_itertools.py
Update test_itertools.py from Cpython v3.11.2 #4836unchangedtest/test_keywordonlyarg.py
test/test_kqueue.py
Add test_kqueue.py from Cpython v3.11.2 #4837test/test_largefile.py
Add test_largefile.py from Cpython v3.11.2 #4838CPython specifictest/test_launcher.py
test/test_list.py
test/test_listcomps.py
update test_listcomps.py from cpython 3.11.2 #4757test/test_lltrace.py
test/test_long.py
Update test_long.py from Cpython v3.11.2 #4840unchangedtest/test_longexp.py
test/test_marshal.py
test/test_math.py
update test_math.py from cpython 3.11.2 #4754unchangedtest/test_memoryio.py
unchangedtest/test_memoryview.py
test/test_metaclass.py
test/test_minidom.py
test/test_mmap.py
test/test_module.py
Update test_module.py from Cpython v3.11.2 #4842test/test_multibytecodec.py
unchangedtest/test_named_expressions.py
test/test_nis.py
test/test_numeric_tower.py
Update test_numeric_tower.py from Cpython v3.11.2 #4843test/test_opcache.py
Update test_opcache.py from Cpython v3.11.2 #4844unchangedtest/test_openpty.py
test/test_ordered_dict.py
Update test_ordered_dict.py from Cpython v3.11.2 #4846test/test_ossaudiodev.py
test/test_osx_env.py
test/test_patma.py
test/test_peepholer.py
test/test_pep646_syntax.py
test/test_picklebuffer.py
test/test_pkg.py
test/test_poll.py
Add test_poll.py from Cpython v3.11.2 #4888test/test_popen.py
Update test_popen.py from Cpython v3.11.2 #4889test/test_positional_only_arg.py
test/test_posix.py
Update test_posix.py from Cpython v3.11.2 #4890test/test_pow.py
Update test_pow.py from Cpython v3.11.2 #4891test/test_print.py
added test_print.py and marked TODOs #4778test/test_property.py
Update test_property.py from Cpython v3.11.2 #4892test/test_pulldom.py
Add test_pulldom.py from Cpython v3.11.2 #4893test/test_pwd.py
test/test_pyexpat.py
test/test_raise.py
test/test_range.py
test/test_readline.py
test/test_regrtest.py
test/test_repl.py
test/test_resource.py
test/test_richcmp.py
test/test_robotparser.py
test/test_sax.py
test/test_scope.py
test/test_script_helper.py
test/test_select.py
test/test_set.py
&=
and-=
operator between Set types do not work correctly. #3992test/test_setcomps.py
test/test_slice.py
test/test_smtpnet.py
test/test_sort.py
updated test_sort from cpython 3.11.2 #4749test/test_source_encoding.py
test/test_spwd.py
test/test_stable_abi_ctypes.py
test/test_startfile.py
test/test_strftime.py
test/test_string.py
Update test_string.py from Cpython v3.11.2 #4751test/test_string_literals.py
test/test_strptime.py
test/test_strtod.py
test/test_structseq.py
test/test_subclassinit.py
test/test_sundry.py
test/test_super.py
metaclass
and internal contents ofclasscell
in__build_class__
#3865test/test_support.py
wasi
instead ofunknown
#4539test/test_syntax.py
Update test_syntax from CPython 3.11.0 #4602test.test_sys
Update sysconfig, test_sys and test_syslog from CPython 3.11 #4569PYTHONSAFEPATH
#4541test/test_sys_setprofile.py
test/test_sys_settrace.py
test/test_syslog.py
Update sysconfig, test_sys and test_syslog from CPython 3.11 #4569test/test_tcl.py
test/test_thread.py
test/test_threadedtempfile.py
test/test_threadsignals.py
test/test_time.py
time.strftime(arg)
fails when arg is not valid format string #4157test/test_timeout.py
test/test_tix.py
test/test_tuple.py
test/test_type_annotations.py
test/test_type_cache.py
test/test_type_comments.py
test/test_typechecks.py
test/test_types.py
Update test/test_types from CPython 3.11.2 #4683test/test_ucn.py
test/test_unary.py
test/test_unicode.py
test/test_unicode_file.py
test/test_unicode_file_functions.py
Update test_unicode_file_functions.py from CPython 3.11.2 #4741test/test_unicode_identifiers.py
test/test_unicodedata.py
Update test_unicodedata from CPython 3.11.2 #4678unchangedtest/test_univnewlines.py
test/test_unpack.py
Update test/test_unpack.py from CPython 3.11.2 #4676test/test_unpack_ex.py
test/test_unparse.py
test/test_userdict.py
Update test/test_userlist.py and test_userdict.py from CPython 3.11.2 #4666test/test_userlist.py
Update test/test_userlist.py and test_userdict.py from CPython 3.11.2 #4666test/test_userstring.py
Update test/test_userstring.py from CPython 3.11.2 #4658unchangedtest/test_utf8_mode.py
unchangedtest/test_utf8source.py
test/test_wait3.py
test/test_wait4.py
test/test_weakset.py
Update test/test_weakset.py from CPython 3.11.2 #4657test/test_winconsoleio.py
test/test_winreg.py
test/test_winsound.py
test/test_with.py
Update test/test_with.py from CPython 3.11.2 #4648unchangedtest/test_yield_from.py
test/test_zlib.py
Update test/test_zlib.py from CPython 3.11.2 #4647test/test_asyncio
test/test_capi
test/test_import
Add test_import from CPython 3.11.2 #4599test/test_tools
Not yet added libraries
These libraris are not added yet. Pure python one will be possible while others are not.
_bootsubprocess.py
_pycodecs.py
cProfile.py
crypt.py
curses
idlelib
imaplib.py
imp.py
lzma.py
mailcap.py
modulefinder.py
msilib
pipes.py
poplib.py
pstats.py
pyclbr.py
symtable.py
tkinter
tracemalloc.py
turtle.py
wave.py
zoneinfo
The text was updated successfully, but these errors were encountered: