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
Update Python libraries and tests from CPython 3.12 #5104
Labels
A-stdlib
C-compat
A discrepancy between RustPython and CPython
C-enhancement
New feature or request
good first issue
Good for newcomers
Comments
This was referenced Feb 18, 2024
|
|
This was referenced Feb 20, 2024
Merged
|
Modules:
Tests:
|
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-stdlib
C-compat
A discrepancy between RustPython and CPython
C-enhancement
New feature or request
good first issue
Good for newcomers

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

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.12.0from 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--releaselikecargo run --release --features ssl -- -m test -v test_unicodeList of libraries
__future__.pyUpdate os/posix/posixpath from CPython 3.12.2 #5257test_future_stmtfrom __future__ import generator_stop#4060?__hello__.pyunchanged__phello__unchanged_compression.py_markupbase.py_osx_support.pyunchanged_pycodecs.py_pyio.py_threading_local.py_weakrefset.pyabc.pyUpdate libraries and test files from CPython v3.12 #5134_collections_abc.py_py_abc.pyaifc.pyremoved in 3.13antigravity.pyunchangedargparse.pyUpdate libraries and test files from CPython v3.12 #5134ast.pyUpdate ast, test_ast from CPython 3.12.0 #5121asynchat.pyUpdate libraries and test files from CPython v3.12 #5134 removed in 3.13asyncioUpdate Lib/asyncio from CPython v3.12.3 #3858_contextvars_overlappedfor windowsasyncore.pyUpdate libraries and test files from CPython v3.12 #5134 removed in 3.13base64.pyUpdate libraries and test files from CPython v3.12 #5134bdb.pyUpdate libraries and test files from CPython v3.12 #5134bisect.pyUpdate libraries and test files from CPython v3.12 #5134bz2.pyUpdate libraries and test files from CPython v3.12 #5134calendar.pyUpdatecalendar.pyandtest_calendar.pyfrom CPython v3.12 #5169cgi.pyremoved in 3.13cgitb.pyUpdateLib/cgitb.pyto 3.12 #5197 removed in 3.13chunk.pyremoved in 3.13cmd.pyunchangedcode.pyUpdate code.py and test_code.py from CPython v3.12 #5174test_code_moduleis related testcodecs.pycodeop.pyUpdate test_opcodes.py, test_codeop.py and codeop.py from CPython v3.12 #5115collections_collections.OrderedDicttype (a.k.a.collections.OrderedDict) #3418colorsys.pyUpdateLib/colorsys.pyandLib/test/test_colorsys.pyto 3.12 #5198compileall.pyUpdateLib/compileall.pyandLib/test/test_compileall.py#5199concurrentconfigparser.pyUpdateconfigparser.pyandtest_configparser.pyfrom CPython v3.12 #5172contextlib.pycontextvars.pyunchangedcontextvars) #3188copy.pyUpdatecopy.pyandtest_copy.pyfrom CPython v3.12 #5175copyreg.py__getstate__csv.py【Need Update csv.rs】Update csv.py and test_csv.py from CPython v3.12 #5176ctypesdataclasses.pypendingmatchstatement support.datetime.py_pydatetime.pydbmdecimal.pyFirst step for Python 3.12 support #5078_pydecimal.py- depending oncontextvarsdifflib.pydis.pydistutilsdoctest.py- depending on_io.IncrementalNewlineDecoderemailencodingsUpdate glob/getopt/encodings #5253ensurepipUpdate ensurepip to Python 3.12 #5108enum.pyFirst step for Python 3.12 support #5078filecmp.pyRemove dummy_os import and update filecmp from CPython 3.12.2 #5258fileinput.pyfnmatch.pyfractions.pyftplib.pyUpdateLib/ftplib.pyandLib/test/test_ftplibto 3.12 #5196functools.pyFirst step for Python 3.12 support #5078gc.pygenericpath.pygetopt.pyUpdate glob/getopt/encodings #5253getpass.pygettext.pyUpdate gettext.py and related test to 3.12 version #5287glob.pyUpdate glob/getopt/encodings #5253graphlib.pyunchangedgzip.pyhashlib.pyheapq.pyunchangedhmac.pyUpdate Lib/test/test_hmac.py to 3.12 version #5188htmlhttpimghdr.pyremoved in 3.13imp.pyremoved in 3.12importlibFirst step for Python 3.12 support #5078inspect.pyio.pyipaddress.pyUpdate ipaddress from CPython v3.12.3 #5312jsonkeyword.pylinecache.pylocale.pyloggingmailbox.pymimetypes.pymultiprocessingUpdate multiprocessing from CPython 3.12.3 #5263netrc.pynntplib.pyremoved in 3.13ntpath.pyUpdate ntpath from CPython 3.12.3 #5262nturl2path.pynumbers.pyopcode.pyUpdate test_opcodes.py, test_codeop.py and codeop.py from CPython v3.12 #5115operator.pyUpdate Lib/test/test_operator.py to 3.12 #5194optparse.pyos.pyUpdate os/posix/posixpath from CPython 3.12.2 #5257 Update test_os from CPython v3.12.3 #5310pathlib.pyUpdate pathlib from CPython v3.12.3 #5311pdb.pypickle.pyUpdate pickle from CPython 3.12.3 #5260array.__reduce__toarray.__reduce_ex__#3876_compat_pickle.pytest/pickletester.pysupportstest_pickle.pyUpdate pickle from CPython 3.12.3 #5260test/test_picklebuffer.pypickletools.pyUpdate pickle from CPython 3.12.3 #5260pkgutil.pyplatform.pyplistlib.pyposixpath.pyUpdate os/posix/posixpath from CPython 3.12.2 #5257pprint.pyUpdateLib/pprint.pyandLib/test/test_pprint.pyto 3.12 #5195pty.pypy_compile.pypydoc.pypydoc_dataqueue.pyquopri.pyrandom.pyre.pyUpdate Sre Engine Implementing to CPython 3.12 #5125sre_compile.py,sre_constants.py,sre_parse.pyreprlib.pyrlcompleter.pyrunpy.pysched.pysecrets.pyselectors.pyUpdate subprocess/selectors from CPython 3.12.3 #5290shelve.pyshlex.pyshutil.pyBump shutil to 3.12.3 #5228signal.pyUpdate signal from CPython 3.12.3 #5280site.pyUpdate site from CPython v3.12.3 #5313_sitebuiltins.pysmtpd.pyremoved in 3.13smtplib.pysndhdr.pyremoved in 3.13socket.pysocketserver.pysqlite3ssl.pystat.pystatistics.pystring.pystringprep.pystruct.pysubprocess.pyUpdate subprocess/selectors from CPython 3.12.3 #5290sunau.pyremoved in 3.13sysconfig.pytabnanny.pytarfile.pytelnetlib.pyremoved in 3.13tempfile.pytextwrap.pythis.pythreading.pytimeit.pytoken.pytokenize.pytomllibtrace.pytraceback.pytty.pytypes.pytyping.pyImport typing Self Error #5149unittestFirst step for Python 3.12 support #5078urllibuu.pyUpdateuu.pyandtest_uu.pyfrom CPython v3.12.0 #5161 removed in 3.13uuid.pyvenvwarnings.pyweakref.pywebbrowser.pywsgirefxdrlib.pyremoved in 3.13xmlxmlrpczipapp.pyzipfile.pyzipimport.pyPYTHONSAFEPATH#4541List of tests without python libraries
test/test___all__.pytest/test__locale.pyUpdate test__locale.py and test_atexit.py from CPython v3.12 #5114test/test__opcode.pytest/test_abstract_numbers.pytest/test_array.pyarray.__reduce__toarray.__reduce_ex__#3876test/test_asdl_parser.pytest/test_asyncgen.pytest/test_atexit.pyUpdate test__locale.py and test_atexit.py from CPython v3.12 #5114test/test_audioop.pytest/test_audit.pytest/test_augassign.pytest/test_baseexception.pytest/test_bigaddrspace.pyUpdate test files from CPython v3.12.0 #5122test/test_bigmem.pyUpdate test files from CPython v3.12.0 #5122test/test_binascii.pytest/test_binop.pytest/test_bool.pyUpdate test files from CPython v3.12.0 #5122test/test_buffer.pytest/test_bufio.pyUpdate test files from CPython v3.12.0 #5122test/test_builtin.pytest/test_bytes.pytest/test_bz2.pytest/test_c_locale_coercion.pyUpdate test files from CPython v3.12.0 #5122test/test_call.pytest/test_charmapcodec.pytest/test_check_c_globals.pytest/test_class.pyUpdate test files from CPython v3.12.0 #5122test/test_clinic.pytest/test_cmath.pyUpdate test files from CPython v3.12.0 #5122test/test_cmd_line.pyUpdate test files from CPython v3.12.0 #5127test/test_cmd_line_script.pyUpdate test files from CPython v3.12.0 #5127test/test_codeccallbacks.pyunchangedtest/test_compare.pyUpdate test files from CPython v3.12.0 #5127test/test_compile.pytest_builtin.py test_compile unit test fix #5251test/test_complex.pyUpdate test files from CPython v3.12.0 #5127test/test_contains.pyunchangedtest/test_context.pyUpdate test files from CPython v3.12.0 #5127test/test_contextlib_async.pytest/test_coroutines.pytest/test_crashers.pyUpdate test_crashers from Cpython v3.11.2 #4807 CPython specifictest/test_csv.py【Need Update csv.rs】Update csv.py and test_csv.py from CPython v3.12 #5176test/test_decorators.pyUpdate test files from CPython v3.12.0 #5127test/test_defaultdict.pyUpdate test files from CPython v3.12.0 #5127test/test_deque.pyunchangedtest/test_descr.pyUpdate test files from CPython v3.12.0 #5127test/test_descrtut.pyUpdate test files from CPython v3.12.0 #5127test/test_devpoll.pyunchangedtest/test_dict.pyUpdate test files from CPython v3.12.0 #5127test/test_dict_version.pyUpdate test_dict_version.py from Cpython v3.11.2 #4809 Not implemented in RustPythontest/test_dictcomps.pyunchangedtest/test_dictviews.pyUpdate test files from CPython v3.12.0 #5127test/test_docxmlrpc.pyunchangedtest/test_dtrace.pyUpdate test files from CPython v3.12.0 #5127test/test_dynamic.pyUpdate test files from CPython v3.12.0 #5127test/test_dynamicclassattribute.pyunchangedtest/test_eintr.pyUpdate test files from CPython v3.12.0 #5127test/test_embed.pytest/test_enumerate.pytest/test_eof.pyUpdate test files from CPython v3.12.0 #5127test/test_epoll.pyUpdate test files from CPython v3.12.0 #5127test/test_errno.pyunchangedtest/test_except_star.pytest/test_exception_group.pyExceptionGroup #5254test/test_exception_hierarchy.pyunchangedtest/test_exception_variations.pytest/test_exceptions.pytest/test_extcall.pytest/test_faulthandler.pytest/test_fcntl.pytest/test_file.pyUpdate libraries and test files from CPython v3.12 #5134test/test_file_eintr.pytest/test_fileio.pytest/test_fileutils.pytest/test_finalization.pytest/test_float.pytest/test_flufl.pyAdd test_flufl.py from Cpython v3.11.2 #4824 CPython specifictest/test_fork1.pytest/test_format.pytest/test_frame.pytest/test_frozen.pytest/test_fstring.pytest/test_funcattrs.pytest/test_future.pytest/test_future3.pytest/test_future4.pytest/test_future5.pytest/test_gdb.pytest/test_generator_stop.pytest/test_generators.pytest/test_genericalias.pytest/test_genericclass.pytest/test_genexps.pytest/test_getpath.pytest/test_global.pytest/test_grammar.pytest/test_grp.pytest/test_hash.pytest/test_hashlib.pytest/test_index.pytest/test_int.pytest/test_int_literal.pytest/test_interpreters.pytest/test_ioctl.pytest/test_isinstance.pytest/test_iter.pytest/test_iterlen.pytest/test_itertools.pyAdd itertools.batched Support #5209test/test_keywordonlyarg.pytest/test_kqueue.pytest/test_largefile.pytest/test_launcher.pytest/test_list.pytest/test_listcomps.pytest/test_lltrace.pytest/test_long.pytest/test_longexp.pytest/test_marshal.pytest/test_math.pytest/test_memoryio.pytest/test_memoryview.pytest/test_metaclass.pytest/test_minidom.pytest/test_mmap.pytest/test_module.pyFirst step for Python 3.12 support #5078test/test_multibytecodec.pytest/test_named_expressions.pytest/test_nis.pytest/test_numeric_tower.pytest/test_opcache.pytest/test_openpty.pytest/test_ordered_dict.pytest/test_ossaudiodev.pytest/test_osx_env.pytest/test_patma.pytest/test_peepholer.pytest/test_pep646_syntax.pytest/test_pkg.pytest/test_poll.pytest/test_popen.pytest/test_positional_only_arg.pytest/test_posix.pyUpdate os/posix/posixpath from CPython 3.12.2 #5257test/test_pow.pytest/test_print.pytest/test_property.pytest/test_pulldom.pytest/test_pwd.pytest/test_pyexpat.pytest/test_raise.pytest/test_range.pytest/test_readline.pytest/test_regrtest.pytest/test_repl.pytest/test_resource.pytest/test_richcmp.pytest/test_robotparser.pytest/test_sax.pytest/test_scope.pytest/test_script_helper.pytest/test_select.pytest/test_set.py&=and-=operator between Set types do not work correctly. #3992test/test_setcomps.pytest/test_slice.pytest/test_smtpnet.pytest/test_sort.pytest/test_source_encoding.pytest/test_spwd.pytest/test_stable_abi_ctypes.pytest/test_startfile.pytest/test_strftime.pytest/test_string.pytest/test_string_literals.pytest/test_strptime.pytest/test_strtod.pytest/test_structseq.pytest/test_subclassinit.pytest/test_sundry.pytest/test_super.pymetaclassand internal contents ofclasscellin__build_class__#3865test/test_support.pyFirst step for Python 3.12 support #5078test/test_syntax.pytest.test_sysPYTHONSAFEPATH#4541test/test_sys_setprofile.pytest/test_sys_settrace.pytest/test_syslog.pytest/test_tcl.pytest/test_thread.pytest/test_threadedtempfile.pytest/test_threadsignals.pytest/test_time.pytime.strftime(arg)fails when arg is not valid format string #4157test/test_timeout.pytest/test_tix.pytest/test_tuple.pytest/test_type_annotations.pytest/test_type_cache.pytest/test_type_comments.pytest/test_typechecks.pytest/test_types.pytest/test_ucn.pytest/test_unary.pytest/test_unicode.pyFirst step for Python 3.12 support #5078test/test_unicode_file.pytest/test_unicode_file_functions.pytest/test_unicode_identifiers.pytest/test_unicodedata.pytest/test_univnewlines.pytest/test_unpack.pytest/test_unpack_ex.pytest/test_unparse.pytest/test_userdict.pytest/test_userlist.pytest/test_userstring.pytest/test_utf8_mode.pytest/test_utf8source.pytest/test_wait3.pytest/test_wait4.pytest/test_weakset.pytest/test_winconsoleio.pytest/test_winreg.pytest/test_winsound.pytest/test_with.pytest/test_yield_from.pytest/test_zlib.pytest/test_asynciotest/test_capitest/test_importtest/test_toolsNot yet added libraries
These libraris are not added yet. Pure python one will be possible while others are not.
_bootsubprocess.py_pycodecs.pycProfile.pycrypt.pyremoved in 3.13cursesidlelibimaplib.pyimp.pylzma.pymailcap.pyremoved in 3.13modulefinder.pymsilibremoved in 3.13pipes.pyremoved in 3.13poplib.pypstats.pypyclbr.pysymtable.pytkintertracemalloc.pyturtle.pywave.pyzoneinfoThe text was updated successfully, but these errors were encountered: