From 0ad477827f682750dc21f4b130c4e2154d26822c Mon Sep 17 00:00:00 2001 From: John Marshall Date: Tue, 23 Jul 2024 20:42:56 +1200 Subject: [PATCH] Document some language facilities available in our py3.6 baseline --- doc/developer.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/developer.rst b/doc/developer.rst index 5bc30660..cefc9eaf 100644 --- a/doc/developer.rst +++ b/doc/developer.rst @@ -33,6 +33,24 @@ directories: :file:`import.py` about importing. +Python language level +===================== + +Pysam currently requires Python 3.6 as a minimum language level. +For example, this means that the following comparatively recent +language features and library functions are available for use: + +* f-strings +* ``raise ... from None`` +* :meth:`str.startswith`, :meth:`str.endswith`, :meth:`str.rstrip`, etc + +However in particular the the following should not be used in +pysam source code or infrastructure scripts: + +* :meth:`str.removeprefix`, :meth:`str.removesuffix` (new in 3.9) +* walrus ``:=`` operator (new in 3.8) + + Importing new versions of htslib and samtools =============================================