head 1.47; access; symbols pkgsrc-2026Q1:1.46.0.2 pkgsrc-2026Q1-base:1.46 pkgsrc-2025Q4:1.42.0.6 pkgsrc-2025Q4-base:1.42 pkgsrc-2025Q3:1.42.0.4 pkgsrc-2025Q3-base:1.42 pkgsrc-2025Q2:1.42.0.2 pkgsrc-2025Q2-base:1.42 pkgsrc-2025Q1:1.38.0.2 pkgsrc-2025Q1-base:1.38 pkgsrc-2024Q4:1.36.0.2 pkgsrc-2024Q4-base:1.36 pkgsrc-2024Q3:1.31.0.2 pkgsrc-2024Q3-base:1.31 pkgsrc-2024Q2:1.30.0.2 pkgsrc-2024Q2-base:1.30 pkgsrc-2024Q1:1.25.0.2 pkgsrc-2024Q1-base:1.25 pkgsrc-2023Q4:1.23.0.2 pkgsrc-2023Q4-base:1.23 pkgsrc-2023Q3:1.11.0.2 pkgsrc-2023Q3-base:1.11 pkgsrc-2023Q2:1.5.0.2 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.4.0.2 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.2.0.2 pkgsrc-2022Q4-base:1.2; locks; strict; comment @# @; 1.47 date 2026.03.25.22.52.08; author wiz; state Exp; branches; next 1.46; commitid 5KmfLoNsNAElspzG; 1.46 date 2026.03.20.14.01.10; author adam; state Exp; branches; next 1.45; commitid NhVxHvTfr0PlGIyG; 1.45 date 2026.03.19.16.58.45; author adam; state Exp; branches; next 1.44; commitid w8IPefoQf2OgHByG; 1.44 date 2026.03.04.06.51.45; author adam; state Exp; branches; next 1.43; commitid YGZczgUfr9NLOCwG; 1.43 date 2026.01.07.08.47.41; author wiz; state Exp; branches; next 1.42; commitid 1wQ3ICD8eebefrpG; 1.42 date 2025.06.04.14.14.17; author adam; state Exp; branches; next 1.41; commitid QGsnv8s0FZxH2AXF; 1.41 date 2025.04.17.21.51.22; author wiz; state Exp; branches; next 1.40; commitid xcIXAVA292fk6sRF; 1.40 date 2025.04.09.14.47.58; author adam; state Exp; branches; next 1.39; commitid 0IRavEVzlaBB1oQF; 1.39 date 2025.03.31.13.30.25; author jakllsch; state Exp; branches; next 1.38; commitid Rd7lZhijCG94TdPF; 1.38 date 2025.01.07.19.35.08; author riastradh; state Exp; branches; next 1.37; commitid Hc6jw8GhWWhOzAEF; 1.37 date 2025.01.07.19.34.41; author riastradh; state Exp; branches; next 1.36; commitid KvDm6JGvmEUEzAEF; 1.36 date 2024.12.06.06.19.12; author riastradh; state Exp; branches; next 1.35; commitid cD5K3iXGMM0xcpAF; 1.35 date 2024.12.05.07.51.12; author adam; state Exp; branches; next 1.34; commitid aVLjViiPBheYJhAF; 1.34 date 2024.11.14.22.20.31; author wiz; state Exp; branches; next 1.33; commitid JmuDYqwL4erbdFxF; 1.33 date 2024.11.01.12.53.15; author wiz; state Exp; branches; next 1.32; commitid QB4Wk02mZPuBuWvF; 1.32 date 2024.11.01.00.52.29; author wiz; state Exp; branches; next 1.31; commitid QT27BdVP362gvSvF; 1.31 date 2024.09.09.15.50.30; author adam; state Exp; branches; next 1.30; commitid pNKjnwfx6xQHb9pF; 1.30 date 2024.05.29.16.33.16; author adam; state Exp; branches; next 1.29; commitid n8aFyEjEVZA0JUbF; 1.29 date 2024.04.30.21.09.15; author cheusov; state Exp; branches; next 1.28; commitid qT4nTfmjkxy4cd8F; 1.28 date 2024.04.30.20.51.14; author cheusov; state Exp; branches; next 1.27; commitid C4BYvMjDXSO86d8F; 1.27 date 2024.04.30.17.13.55; author cheusov; state Exp; branches; next 1.26; commitid GNeawrCp0r9ATb8F; 1.26 date 2024.04.30.17.01.15; author cheusov; state Exp; branches; next 1.25; commitid ZAXr9b6hiQnHOb8F; 1.25 date 2024.02.02.15.50.55; author tsutsui; state Exp; branches; next 1.24; commitid ZAH8pB8Fi6dugSWE; 1.24 date 2024.01.13.04.24.28; author riastradh; state Exp; branches; next 1.23; commitid 5rlMHKq4ER4Q6fUE; 1.23 date 2023.12.28.13.12.24; author thor; state Exp; branches; next 1.22; commitid ZVzEyQuQuZNNweSE; 1.22 date 2023.12.11.10.23.42; author adam; state Exp; branches; next 1.21; commitid sjBbPNM5hn6B92QE; 1.21 date 2023.11.23.12.43.35; author jperkin; state Exp; branches; next 1.20; commitid XGrdRAjV3WLWuJNE; 1.20 date 2023.11.10.16.55.32; author nia; state Exp; branches; next 1.19; commitid eRWoVQdoEii3k5ME; 1.19 date 2023.11.10.12.13.22; author nia; state Exp; branches; next 1.18; commitid C9xFZzG0GNXcL3ME; 1.18 date 2023.11.08.13.19.51; author wiz; state Exp; branches; next 1.17; commitid PsuHTklAIsF4bOLE; 1.17 date 2023.11.07.11.27.22; author nia; state Exp; branches; next 1.16; commitid 3rsOttGpjXmoBFLE; 1.16 date 2023.10.25.21.33.15; author wiz; state Exp; branches; next 1.15; commitid lp2IovVSxYh4n3KE; 1.15 date 2023.10.24.22.09.38; author wiz; state Exp; branches; next 1.14; commitid MTsrqKm6aGrQAVJE; 1.14 date 2023.10.24.09.12.36; author wiz; state Exp; branches; next 1.13; commitid zvTiOYGSGM6SiRJE; 1.13 date 2023.10.23.08.50.35; author wiz; state Exp; branches; next 1.12; commitid bfCPYGGGyY0ydJJE; 1.12 date 2023.10.23.06.36.00; author wiz; state Exp; branches; next 1.11; commitid i2WIjA0vfzIVsIJE; 1.11 date 2023.08.25.08.28.22; author adam; state Exp; branches; next 1.10; commitid mw3wi7aDwRq4Z8CE; 1.10 date 2023.08.15.14.39.08; author schmonz; state Exp; branches; next 1.9; commitid LnsStECNTRqEmTAE; 1.9 date 2023.07.22.18.27.45; author js; state Exp; branches; next 1.8; commitid CAsWPltkDlxQoPxE; 1.8 date 2023.06.29.01.32.28; author riastradh; state Exp; branches; next 1.7; commitid zWThP11kNEMqwMuE; 1.7 date 2023.06.27.10.35.30; author riastradh; state Exp; branches; next 1.6; commitid f062063a1YkHAzuE; 1.6 date 2023.06.27.10.29.58; author riastradh; state Exp; branches; next 1.5; commitid TTPBXysp5i5OyzuE; 1.5 date 2023.06.22.11.16.06; author jperkin; state Exp; branches; next 1.4; commitid hTUk1DZXJqczYVtE; 1.4 date 2023.01.14.17.25.53; author wiz; state Exp; branches; next 1.3; commitid iMg2vPIv5sfk8x9E; 1.3 date 2023.01.14.17.22.25; author wiz; state Exp; branches; next 1.2; commitid 15F8xt4SepQ47x9E; 1.2 date 2022.11.02.11.36.23; author jperkin; state Exp; branches; next 1.1; commitid M3nmnJIpqt2Tx70E; 1.1 date 2022.10.31.09.50.40; author adam; state Exp; branches; next ; commitid dJ2usVQFvHvi1RZD; desc @@ 1.47 log @python*: restrict expat workaround to NetBSD<11.99.5 that version installs expat_config.h Pullups for 10, 11 have been filed, the pattern can be improved when they are merged. @ text @# $NetBSD: Makefile,v 1.46 2026/03/20 14:01:10 adam Exp $ .include "dist.mk" PKGNAME= python311-${PY_DISTVERSION} CATEGORIES= lang python MAINTAINER= pkgsrc-users@@NetBSD.org HOMEPAGE= https://www.python.org/ COMMENT= Interpreted, interactive, object-oriented programming language LICENSE= python-software-foundation CONFLICTS+= python-[0-9]* CONFLICTS+= py311-cElementTree-[0-9]* CONFLICTS+= py311-curses-[0-9]* CONFLICTS+= py311-cursespanel-[0-9]* CONFLICTS+= py311-expat-[0-9]* CONFLICTS+= py311-readline-[0-9]* CONFLICTS+= py311-sqlite3-[0-9]* SUPERSEDES+= py311-cElementTree-[0-9]* SUPERSEDES+= py311-curses-[0-9]* SUPERSEDES+= py311-cursespanel-[0-9]* SUPERSEDES+= py311-expat-[0-9]* SUPERSEDES+= py311-readline-[0-9]* SUPERSEDES+= py311-sqlite3-[0-9]* PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk PLIST_AWK_ENV+= PYVERS=311 PRINT_PLIST_AWK+= /^[^@@]/ && /[^\/]+\.pyc$$/ { PRINT_PLIST_AWK+= sub(/__pycache__\//, "") PRINT_PLIST_AWK+= sub(/\.cpython-311/, "")} PRINT_PLIST_AWK+= /^[^@@]/ && /[^\/]+\.opt-1.pyc$$/ { PRINT_PLIST_AWK+= sub(/.opt-[12].pyc$$/, ".pyo")} USE_CC_FEATURES= c11 USE_LANGUAGES= c c++ USE_TOOLS+= pkg-config GNU_CONFIGURE= yes CONFIGURE_ARGS+= --enable-shared CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl} CONFIGURE_ARGS+= --with-system-expat CONFIGURE_ARGS+= --with-system-ffi CONFIGURE_ARGS+= --without-ensurepip CONFIGURE_ENV+= OPT=${CFLAGS:M*:Q} CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLS_PATH.mkdir} PKGCONFIG_OVERRIDE+= Misc/python.pc.in Misc/python-embed.pc.in PTHREAD_OPTS+= require .include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.prefs.mk" # NetBSD-8 curses has enough support for py-curses USE_CURSES= getsyx wide # But we build as ncurses still to get the full feature set easily .if ${OPSYS} == "NetBSD" FAKE_NCURSES= yes .endif .if ${USE_CROSS_COMPILE:tl} == yes TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPATH} CONFIGURE_ARGS+= \ --with-build-python=${TOOLBASE:Q}/bin/python${PY_VER_SUFFIX} CONFIGURE_ARGS+= MACHDEP=${PY_PLATNAME} CONFIGURE_ARGS+= \ _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} CONFIGURE_ARGS+= ac_sys_system=${OPSYS} . if ${OPSYS} == "OSF1" CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=true . else CONFIGURE_ARGS+= ac_cv_buggy_getaddrinfo=false . endif CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptmx=yes CONFIGURE_ARGS.NetBSD+= ac_cv_file__dev_ptc=no .endif .if ${MACHINE_ARCH} == "vax" # XXX "checking whether float word ordering is bigendian... unknown" CONFIGURE_ARGS+= ax_cv_c_float_words_bigendian=no .endif # http://bugs.python.org/issue13241 .if ${MACHINE_PLATFORM:MDarwin-1[12].*} PKGSRC_COMPILER= clang PKG_CC= clang PKG_CXX= clang++ .endif # Used in socketmodule.c to determine if a sethostname declaration is required CFLAGS.SunOS+= -DPKGSRC_OPSYS_VERSION=${OPSYS_VERSION} LIBS.SunOS+= -lrt # fdatasync() .if ${OPSYS} == "SunOS" && ${OPSYS_VERSION} < 051100 SUBST_CLASSES+= setup SUBST_MESSAGE.setup= Replacing crypt with crypt_i SUBST_STAGE.setup= pre-configure SUBST_FILES.setup= setup.py SUBST_SED.setup= -e "s,'crypt','crypt_i'," .endif PY_VER_SUFFIX= 3.11 .if ${OPSYS} == "Darwin" USE_TOOLS+= gmake .endif .include "platname.mk" PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} # For Xcode 5 and up, we need to search the SDK path for headers, otherwise # certain modules will not be built. .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include .endif LDFLAGS.SunOS+= -lresolv PLIST_VARS+= nis .for incdir in ${_OPSYS_INCLUDE_DIRS} . if exists(${incdir}/rpc/rpc.h) HAVE_RPC_H= yes . elif exists(${incdir}/tirpc/rpc/rpc.h) CPPFLAGS+= -I${incdir}/tirpc HAVE_RPC_H= yes . endif . if exists(${incdir}/rpcsvc/yp_prot.h) HAVE_YP_PROT_H= yes . elif exists(${incdir}/nsl/rpcsvc/yp_prot.h) CPPFLAGS+= -I${incdir}/nsl HAVE_YP_PROT_H= yes . endif .endfor .if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes) PLIST.nis= yes .endif PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q} PRINT_PLIST_AWK+= { gsub(/${PY_PLATNAME}/, "$${PY_PLATNAME}") } PRINT_PLIST_AWK+= { gsub(/python${PY_VER_SUFFIX}/, \ "python$${PY_VER_SUFFIX}") } TEST_TARGET= test INSTALL_TARGET= altinstall REPLACE_INTERPRETER+= python REPLACE.python.old= .*python[^ ]* REPLACE.python.new= ${PREFIX}/bin/python${PY_VER_SUFFIX} REPLACE_FILES.python+= Lib/base64.py REPLACE_FILES.python+= Lib/cProfile.py REPLACE_FILES.python+= Lib/cgi.py REPLACE_FILES.python+= Lib/encodings/rot_13.py REPLACE_FILES.python+= Lib/idlelib/pyshell.py REPLACE_FILES.python+= Lib/lib2to3/pgen2/token.py REPLACE_FILES.python+= Lib/lib2to3/tests/data/different_encoding.py REPLACE_FILES.python+= Lib/lib2to3/tests/data/false_encoding.py REPLACE_FILES.python+= Lib/lib2to3/tests/pytree_idempotency.py REPLACE_FILES.python+= Lib/pdb.py REPLACE_FILES.python+= Lib/platform.py REPLACE_FILES.python+= Lib/profile.py REPLACE_FILES.python+= Lib/pydoc.py REPLACE_FILES.python+= Lib/quopri.py REPLACE_FILES.python+= Lib/smtpd.py REPLACE_FILES.python+= Lib/smtplib.py REPLACE_FILES.python+= Lib/tabnanny.py REPLACE_FILES.python+= Lib/tarfile.py REPLACE_FILES.python+= Lib/test/bisect_cmd.py REPLACE_FILES.python+= Lib/test/crashers/recursive_call.py REPLACE_FILES.python+= Lib/test/curses_tests.py REPLACE_FILES.python+= Lib/test/re_tests.py REPLACE_FILES.python+= Lib/test/regrtest.py REPLACE_FILES.python+= Lib/timeit.py REPLACE_FILES.python+= Lib/trace.py REPLACE_FILES.python+= Lib/turtledemo/__main__.py REPLACE_FILES.python+= Lib/turtledemo/bytedesign.py REPLACE_FILES.python+= Lib/turtledemo/clock.py REPLACE_FILES.python+= Lib/turtledemo/forest.py REPLACE_FILES.python+= Lib/turtledemo/fractalcurves.py REPLACE_FILES.python+= Lib/turtledemo/lindenmayer.py REPLACE_FILES.python+= Lib/turtledemo/minimal_hanoi.py REPLACE_FILES.python+= Lib/turtledemo/paint.py REPLACE_FILES.python+= Lib/turtledemo/peace.py REPLACE_FILES.python+= Lib/turtledemo/penrose.py REPLACE_FILES.python+= Lib/turtledemo/planet_and_moon.py REPLACE_FILES.python+= Lib/turtledemo/sorting_animate.py REPLACE_FILES.python+= Lib/turtledemo/tree.py REPLACE_FILES.python+= Lib/turtledemo/yinyang.py REPLACE_FILES.python+= Lib/uu.py REPLACE_FILES.python+= Lib/webbrowser.py # XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib # Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));' SUBST_CLASSES+= findlib SUBST_MESSAGE.findlib= Fixing find_library(). SUBST_STAGE.findlib= pre-configure SUBST_FILES.findlib= Lib/ctypes/macholib/dyld.py SUBST_FILES.findlib+= Lib/ctypes/util.py SUBST_FILES.findlib+= Lib/distutils/unixccompiler.py SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},' SUBST_SED.findlib+= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!" SUBST_NOOP_OK.findlib= yes SUBST_CLASSES+= pkgversion SUBST_STAGE.pkgversion= pre-configure SUBST_FILES.pkgversion= Lib/lib2to3/pgen2/driver.py SUBST_VARS.pkgversion= PKGVERSION_NOREV .include "options.mk" CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/venv/scripts/posix/pydoc CHECK_INTERPRETER_SKIP+= lib/python${PY_VER_SUFFIX}/test/ziptestdata/exe_with_z64 CHECK_INTERPRETER_SKIP+= lib/python${PY_VER_SUFFIX}/test/ziptestdata/exe_with_zip CHECK_INTERPRETER_SKIP+= lib/python${PY_VER_SUFFIX}/test/ziptestdata/header.sh # contain CONFIGURE_ARGS and CONFIGURE_ENV CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/_sysconfigdata* CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/__pycache__/_sysconfigdata* CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Makefile # Avoid error: Cannot generate ./Include/opcode.h, python not found ! post-configure: touch ${WRKSRC}/Include/opcode.h .if ${OPSYS} == "HPUX" post-install: hpux-postinstall .PHONY: hpux-postinstall hpux-postinstall: ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython3.11.sl \ ${DESTDIR}${PREFIX}/lib/libpython3.11.sl.1.0 .endif INSTALLATION_DIRS+= lib/python${PY_VER_SUFFIX}/site-packages pre-install: setuptools-preinstall .PHONY: setuptools-preinstall setuptools-preinstall: ${INSTALL_DATA} ${.CURDIR}/../../devel/py-setuptools/files/_distutils_system_mod \ ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/site-packages/_distutils_system_mod.py .if ${OPSYS} == "Linux" .include "../../databases/gdbm_compat/buildlink3.mk" .endif .include "../../archivers/bzip2/buildlink3.mk" .include "../../archivers/xz/buildlink3.mk" .include "../../databases/sqlite3/buildlink3.mk" .include "../../devel/gettext-lib/buildlink3.mk" .if ${USE_BUILTIN.gettext:U:tl} == no CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=yes .endif .include "../../devel/libffi/buildlink3.mk" .include "../../devel/libuuid/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" .include "../../security/openssl/buildlink3.mk" .if ${OPSYS} == NetBSD && ${OPSYS_VERSION} < 119905 PREFER.expat= pkgsrc # needs expat_config.h .endif .include "../../textproc/expat/buildlink3.mk" .include "../../mk/bdb.buildlink3.mk" .include "../../mk/curses.buildlink3.mk" .include "../../mk/dlopen.buildlink3.mk" .include "../../mk/oss.buildlink3.mk" .include "../../mk/bsd.pkg.mk" @ 1.46 log @python31*: force use expat from pkgsrc to fix builds across platforms @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.45 2026/03/19 16:58:45 adam Exp $ d253 1 d255 1 @ 1.45 log @Remove --with-system-expat configure option @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.44 2026/03/04 06:51:45 adam Exp $ d41 1 a43 1 CONFIGURE_ARGS+= --without-system-expat # requires expat_config.h d253 1 @ 1.44 log @python311 py311-html-docs: updated to 3.11.15 Python 3.11.15 Security gh-144125: BytesGenerator will now refuse to serialize (write) headers that are unsafely folded or delimited; see verify_generated_headers. (Contributed by Bas Bloemsaat and Petr Viktorin in gh-121650). gh-143935: Fixed a bug in the folding of comments when flattening an email message using a modern email policy. Comments consisting of a very long sequence of non-foldable characters could trigger a forced line wrap that omitted the required leading space on the continuation line, causing the remainder of the comment to be interpreted as a new header field. This enabled header injection with carefully crafted inputs. gh-143925: Reject control characters in data: URL media types. gh-143919: Reject control characters in http.cookies.Morsel fields and values. gh-143916: Reject C0 control characters within wsgiref.headers.Headers fields, values, and parameters. gh-142145: Remove quadratic behavior in xml.minidom node ID cache clearing. In order to do this without breaking existing users, we also add the ownerDocument attribute to xml.dom.minidom elements and attributes created by directly instantiating the Element or Attr class. Note that this way of creating nodes is not supported; creator functions like xml.dom.Document.documentElement() should be used instead. gh-137836: Add support of the “plaintext” element, RAWTEXT elements “xmp”, “iframe”, “noembed” and “noframes”, and optionally RAWTEXT element “noscript” in html.parser.HTMLParser. gh-136063: email.message: ensure linear complexity for legacy HTTP parameters parsing. Patch by Bénédikt Tran. gh-136065: Fix quadratic complexity in os.path.expandvars(). gh-119451: Fix a potential memory denial of service in the http.client module. When connecting to a malicious server, it could cause an arbitrary amount of memory to be allocated. This could have led to symptoms including a MemoryError, swapping, out of memory (OOM) killed processes or containers, or even system crashes. gh-119452: Fix a potential memory denial of service in the http.server module. When a malicious user is connected to the CGI server on Windows, it could cause an arbitrary amount of memory to be allocated. This could have led to symptoms including a MemoryError, swapping, out of memory (OOM) killed processes or containers, or even system crashes. gh-119342: Fix a potential memory denial of service in the plistlib module. When reading a Plist file received from untrusted source, it could cause an arbitrary amount of memory to be allocated. This could have led to symptoms including a MemoryError, swapping, out of memory (OOM) killed processes or containers, or even system crashes. Library gh-144833: Fixed a use-after-free in ssl when SSL_new() returns NULL in newPySSLSocket(). The error was reported via a dangling pointer after the object had already been freed. gh-144363: Update bundled libexpat to 2.7.4 gh-90949: Add SetAllocTrackerActivationThreshold() and SetAllocTrackerMaximumAmplification() to xmlparser objects to prevent use of disproportional amounts of dynamic memory from within an Expat parser. Patch by Bénédikt Tran. Core and Builtins gh-120384: Fix an array out of bounds crash in list_ass_subscript, which could be invoked via some specificly tailored input: including concurrent modification of a list object, where one thread assigns a slice and another clears it. gh-120298: Fix use-after free in list_richcompare_impl which can be invoked via some specificly tailored evil input. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.43 2026/01/07 08:47:41 wiz Exp $ a40 1 CONFIGURE_ARGS+= --with-system-expat @ 1.43 log @*: recursive bump for icu 78.1 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.42 2025/06/04 14:14:17 adam Exp $ a2 1 PKGREVISION= 1 d35 1 a37 1 USE_CC_FEATURES+= c11 d44 1 @ 1.42 log @python311 py311-html-docs: updated to 3.11.13 Python 3.11.13 final Security gh-135034: Fixes multiple issues that allowed tarfile extraction filters (filter="data" and filter="tar") to be bypassed using crafted symlinks and hard links. Addresses CVE 2024-12718, CVE 2025-4138, CVE 2025-4330, and CVE 2025-4517. gh-133767: Fix use-after-free in the “unicode-escape” decoder with a non-“strict” error handler. gh-128840: Short-circuit the processing of long IPv6 addresses early in ipaddress to prevent excessive memory consumption and a minor denial-of-service. Library gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address. gh-134062: ipaddress: fix collisions in __hash__() for IPv4Network and IPv6Network objects. gh-123409: Fix ipaddress.IPv6Address.reverse_pointer output according to RFC 3596, §2.5. Patch by Bénédikt Tran. bpo-43633: Improve the textual representation of IPv4-mapped IPv6 addresses (RFC 4291 Sections 2.2, 2.5.5.2) in ipaddress. Patch by Oleksandr Pavliuk. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.41 2025/04/17 21:51:22 wiz Exp $ d3 1 @ 1.41 log @*: recursive bump for icu 77 and libxml2 2.14 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.40 2025/04/09 14:47:58 adam Exp $ a2 1 PKGREVISION= 1 @ 1.40 log @python311 py311-html-docs: updated to 3.11.12 Python 3.11.12 final Security gh-131809: Update bundled libexpat to 2.7.1 gh-131261: Upgrade to libexpat 2.7.0 gh-105704: When using urllib.parse.urlsplit() and urllib.parse.urlparse() host parsing would not reject domain names containing square brackets ([ and ]). Square brackets are only valid for IPv6 and IPvFuture hosts according to RFC 3986 Section 3.2.2. gh-121284: Fix bug in the folding of rfc2047 encoded-words when flattening an email message using a modern email policy. Previously when an encoded-word was too long for a line, it would be decoded, split across lines, and re-encoded. But commas and other special characters in the original text could be left unencoded and unquoted. This could theoretically be used to spoof header lines using a carefully constructed encoded-word if the resulting rendered email was transmitted or re-parsed. gh-80222: Fix bug in the folding of quoted strings when flattening an email message using a modern email policy. Previously when a quoted string was folded so that it spanned more than one line, the surrounding quotes and internal escapes would be omitted. This could theoretically be used to spoof header lines using a carefully constructed quoted string if the resulting rendered email was transmitted or re-parsed. gh-119511: Fix a potential denial of service in the imaplib module. When connecting to a malicious server, it could cause an arbitrary amount of memory to be allocated. On many systems this is harmless as unused virtual memory is only a mapping, but if this hit a virtual address size limit it could lead to a MemoryError or other process crash. On unusual systems or builds where all allocated memory is touched and backed by actual ram or storage it could’ve consumed resources doing so until similarly crashing. Library gh-127257: In ssl, system call failures that OpenSSL reports using ERR_LIB_SYS are now raised as OSError. Documentation gh-121277: Writers of CPython’s documentation can now use next as the version for the versionchanged, versionadded, deprecated directives. C API gh-106883: Disable GC during the _PyThread_CurrentFrames() and _PyThread_CurrentExceptions() calls to avoid the interpreter to deadlock. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.39 2025/03/31 13:30:25 jakllsch Exp $ d3 1 @ 1.39 log @restore gettext-lib buildlink3.mk from previous python versions needed to successfully build embedded python for tevent package @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.38 2025/01/07 19:35:08 riastradh Exp $ a2 1 PKGREVISION= 2 @ 1.38 log @lang/python*: No need for :U with USE_CROSS_COMPILE. After including bsd.prefs.mk or bsd.fast.prefs.mk, this is guaranteed to be defined. If it isn't, there's a bug (like misspelling it), which we should flag early rather than quietly suppress. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.37 2025/01/07 19:34:41 riastradh Exp $ d3 1 a3 1 PKGREVISION= 1 d246 1 @ 1.37 log @lang/python3*: Use PY_VER_SUFFIX instead of copying & pasting it. Change is limited to cross-builds. No change to generated package; CONFIGURE_ARGS should be unchanged by this. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.36 2024/12/06 06:19:12 riastradh Exp $ d61 1 a61 1 .if ${USE_CROSS_COMPILE:U:tl} == yes @ 1.36 log @lang/python*: Use libreadline unconditionally. libedit breaks some applications. Maybe we can fix it later but for now let's just go back to using libreadline unconditionally like we did before. PKGREVISION++ because this materially affects the build product -- it built before this change but didn't work right for some applications. (No change to platforms without libedit -- which is most non-NetBSD platforms, probably -- but we don't have per-platform PKGREVISION, so gotta bump it for everyone.) No change to 2.7, 3.9, or 3.10 because they already use libreadline unconditionally; respecting READLINE_TYPE is a new change in >=3.11 since April which broke applications. ok jperkin PR pkg/58875: python: terminal colours broke in some applications @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.35 2024/12/05 07:51:12 adam Exp $ d63 2 a64 1 CONFIGURE_ARGS+= --with-build-python=${TOOLBASE:Q}/bin/python3.11 @ 1.35 log @python311 py311-html-docs: updated to 3.11.11 Python 3.11.11 Tools/Demos gh-123418: Update GitHub CI workflows to use OpenSSL 3.0.15 and multissltests to use 3.0.15, 3.1.7, and 3.2.3. Tests gh-125041: Re-enable skipped tests for zlib on the s390x architecture: only skip checks of the compressed bytes, which can be different between zlib’s software implementation and the hardware-accelerated implementation. Security gh-126623: Upgrade libexpat to 2.6.4 gh-122792: Changed IPv4-mapped ipaddress.IPv6Address to consistently use the mapped IPv4 address value for deciding properties. Properties which have their behavior fixed are is_multicast, is_reserved, is_link_local, is_global, and is_unspecified. Library gh-124651: Properly quote template strings in venv activation scripts. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.34 2024/11/14 22:20:31 wiz Exp $ d3 1 @ 1.34 log @*: recursive bump for icu 76 shlib major version bump @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.33 2024/11/01 12:53:15 wiz Exp $ a2 1 PKGREVISION= 3 @ 1.33 log @*: revbump for icu downgrade @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.32 2024/11/01 00:52:29 wiz Exp $ d3 1 a3 1 PKGREVISION= 2 @ 1.32 log @*: recursive bump for icu 76.1 shlib bump @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.31 2024/09/09 15:50:30 adam Exp $ d3 1 a3 1 PKGREVISION= 1 @ 1.31 log @python311 py311-html-docs: updated to 3.11.10 Python 3.11.10 final Windows gh-123418: Updated Windows build to use OpenSSL 3.0.15. gh-119690: Fixes data type confusion in audit event raised by _winapi.CreateNamedPipe. Security gh-123678: Upgrade libexpat to 2.6.3 gh-121957: Fixed missing audit events around interactive use of Python, now also properly firing for python -i, as well as for python -m asyncio. The event in question is cpython.run_stdin. gh-122133: Authenticate the socket connection for the socket.socketpair() fallback on platforms where AF_UNIX is not available like Windows. Patch by Gregory P. Smith and Seth Larson . Reported by Ellie gh-121285: Remove backtracking from tarfile header parsing for hdrcharset, PAX, and GNU sparse headers. gh-118486: os.mkdir() on Windows now accepts mode of 0o700 to restrict the new directory to the current user. This fixes CVE-2024-4030 affecting tempfile.mkdtemp() in scenarios where the base temporary directory is more permissive than the default. gh-116741: Update bundled libexpat to 2.6.2 Library gh-123270: Applied a more surgical fix for malformed payloads in zipfile.Path causing infinite loops (gh-122905) without breaking contents using legitimate characters. gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes by http.cookies. gh-122905: zipfile.Path objects now sanitize names from the zipfile. gh-121650: email headers with embedded newlines are now quoted on output. The generator will now refuse to serialize (write) headers that are unsafely folded or delimited; see verify_generated_headers. (Contributed by Bas Bloemsaat and Petr Viktorin in gh-121650.) gh-119506: Fix io.TextIOWrapper.write() method breaks internal buffer when the method is called again during flushing internal buffer. gh-118643: Fix an AttributeError in the email module when re-fold a long address list. Also fix more cases of incorrect encoding of the address separator in the address list. gh-113171: Fixed various false positives and false negatives in ipaddress.IPv4Address.is_private (see these docs for details) ipaddress.IPv4Address.is_global ipaddress.IPv6Address.is_private ipaddress.IPv6Address.is_global Also in the corresponding ipaddress.IPv4Network and ipaddress.IPv6Network attributes. gh-102988: email.utils.getaddresses() and email.utils.parseaddr() now return ('', '') 2-tuples in more situations where invalid email addresses are encountered instead of potentially inaccurate values. Add optional strict parameter to these two functions: use strict=False to get the old behavior, accept malformed inputs. getattr(email.utils, 'supports_strict_parsing', False) can be use to check if the strict paramater is available. Patch by Thomas Dwyer and Victor Stinner to improve the CVE-2023-27043 fix. gh-67693: Fix urllib.parse.urlunparse() and urllib.parse.urlunsplit() for URIs with path starting with multiple slashes and no authority. Based on patch by Ashwin Ramaswami. Core and Builtins gh-112275: A deadlock involving pystate.c’s HEAD_LOCK in posixmodule.c at fork is now fixed. Patch by ChuBoning based on previous Python 3.12 fix by Victor Stinner. gh-109120: Added handle of incorrect star expressions, e.g f(3, *). Patch by Grigoryev Semyon @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.30 2024/05/29 16:33:16 adam Exp $ d3 1 @ 1.30 log @revbump after icu and protobuf updates @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.29 2024/04/30 21:09:15 cheusov Exp $ a2 1 PKGREVISION= 1 @ 1.29 log @Fix linking issue of _readline.so (missing ncursesw library) by setting FAKE_NCURSES to YES only on NetBSD. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.28 2024/04/30 20:51:14 cheusov Exp $ d3 1 @ 1.28 log @Build _dbm.so module on Linux just like on other UNIX-es @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.27 2024/04/30 17:13:55 cheusov Exp $ d48 5 d56 1 d58 1 a58 5 PTHREAD_OPTS+= require .include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.prefs.mk" @ 1.27 log @Remove dependency on devel/gettext-lib, we don`t need it @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.25 2024/02/02 15:50:55 tsutsui Exp $ d114 1 a114 4 PLIST_VARS+= dbm nis .if ${OPSYS} != "Linux" PLIST.dbm= yes .endif d236 3 @ 1.26 log @Add option "readline" enabled by default. Either --with-readline=editline or --with-readline are added to CONFIGURE_ARGS depending on READLINE_TYPE. @ text @a241 1 .include "../../devel/gettext-lib/buildlink3.mk" @ 1.25 log @python311: kludge to appease configure error on vax where no IEEE-754. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.24 2024/01/13 04:24:28 riastradh Exp $ a40 1 CONFIGURE_ARGS+= --with-readline=readline # XXX editline? a247 1 .include "../../devel/readline/buildlink3.mk" @ 1.24 log @lang/python3*: Fix cross-build by patching out broken readline crud. Python's setup.py tries to decide whether readline is available by running readelf on the path it thinks it can find to libreadline.so. Since we always use a single static readline/curses choice in Pythin (readline, not editline, with (fake-)ncurses), just patch all that buggy detection goo away. No new maintenance burden because this logic has been ripped out of Python 3.12 anyway. Python 3.8 skipped for now because it doesn't cross-build at the moment anyway -- more work needed to make that happen (and it's not as easy as Python>=3.9 as I recall). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.23 2023/12/28 13:12:24 thor Exp $ d75 5 @ 1.23 log @lang/python311: fix NIS detection This ensures the configure script finds the NIS headers just like the Makefile did by adding include directories. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.22 2023/12/11 10:23:42 adam Exp $ d41 1 @ 1.22 log @python311 py311-html-docs: updated to 3.11.7 Python 3.11.7 final Core and Builtins gh-112625: Fixes a bug where a bytearray object could be cleared while iterating over an argument in the bytearray.join() method that could result in reading memory after it was freed. gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors. Patch by pablo Galindo gh-112387: Fix error positions for decoded strings with backwards tokenize errors. Patch by Pablo Galindo gh-112266: Change docstrings of __dict__ and __weakref__. gh-109181: Speed up Traceback object creation by lazily compute the line number. Patch by Pablo Galindo gh-102388: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds gh-111366: Fix an issue in the codeop that was causing SyntaxError exceptions raised in the presence of invalid syntax to not contain precise error messages. Patch by Pablo Galindo gh-111380: Fix a bug that was causing SyntaxWarning to appear twice when parsing if invalid syntax is encountered later. Patch by Pablo galindo gh-88116: Traceback location ranges involving wide unicode characters (like emoji and asian characters) now are properly highlighted. Patch by Batuhan Taskaya and Pablo Galindo. gh-94438: Fix a regression that prevented jumping across is None and is not None when debugging. Patch by Savannah Ostrowski. gh-110696: Fix incorrect error message for invalid argument unpacking. Patch by Pablo Galindo gh-110237: Fix missing error checks for calls to PyList_Append in _PyEval_MatchClass. gh-109216: Fix possible memory leak in BUILD_MAP. Library gh-112618: Fix a caching bug relating to typing.Annotated. Annotated[str, True] is no longer identical to Annotated[str, 1]. gh-112509: Fix edge cases that could cause a key to be present in both the __required_keys__ and __optional_keys__ attributes of a typing.TypedDict. Patch by Jelle Zijlstra. gh-94722: Fix bug where comparison between instances of DocTest fails if one of them has None as its lineno. gh-112105: Make readline.set_completer_delims() work with libedit gh-111942: Fix SystemError in the TextIOWrapper constructor with non-encodable “errors” argument in non-debug mode. gh-109538: Issue warning message instead of having RuntimeError be displayed when event loop has already been closed at StreamWriter.__del__(). gh-111942: Fix crashes in io.TextIOWrapper.reconfigure() when pass invalid arguments, e.g. non-string encoding. gh-111804: Remove posix.fallocate() under WASI as the underlying posix_fallocate() is not available in WASI preview2. gh-111841: Fix truncating arguments on an embedded null character in os.putenv() and os.unsetenv() on Windows. gh-111541: Fix doctest for SyntaxError not-builtin subclasses. gh-110894: Call loop exception handler for exceptions in client_connected_cb of asyncio.start_server() so that applications can handle it. Patch by Kumar Aditya. gh-111531: Fix reference leaks in bind_class() and bind_all() methods of tkinter widgets. gh-111356: Added io.text_encoding(), io.DEFAULT_BUFFER_SIZE, and io.IncrementalNewlineDecoder to io.__all__. gh-68166: Remove mention of not supported “vsapi” element type in tkinter.ttk.Style.element_create(). Add tests for element_create() and other ttk.Style methods. Add examples for element_create() in the documentation. gh-111251: Fix _blake2 not checking for errors when initializing. gh-111174: Fix crash in io.BytesIO.getbuffer() called repeatedly for empty BytesIO. gh-111187: Postpone removal version for locale.getdefaultlocale() to Python 3.15. gh-111159: Fix doctest output comparison for exceptions with notes. gh-110910: Fix invalid state handling in asyncio.TaskGroup and asyncio.Timeout. They now raise proper RuntimeError if they are improperly used and are left in consistent state after this. gh-111092: Make turtledemo run without default root enabled. gh-110590: Fix a bug in _sre.compile() where TypeError would be overwritten by OverflowError when the code argument was a list of non-ints. gh-65052: Prevent pdb from crashing when trying to display undisplayable objects gh-110519: Deprecation warning about non-integer number in gettext now alwais refers to the line in the user code where gettext function or method is used. Previously it could refer to a line in gettext code. gh-110378: contextmanager() and asynccontextmanager() context managers now close an invalid underlying generator object that yields more then one value. gh-110365: Fix termios.tcsetattr() bug that was overwritting existing errors during parsing integers from term list. gh-110196: Add __reduce__ method to IPv6Address in order to keep scope_id gh-109747: Improve errors for unsupported look-behind patterns. Now re.error is raised instead of OverflowError or RuntimeError for too large width of look-behind pattern. gh-109786: Fix possible reference leaks and crash when re-enter the __next__() method of itertools.pairwise. gh-108791: Improved error handling in pdb command line interface, making it produce more concise error messages. gh-73561: Omit the interface scope from an IPv6 address when used as Host header by http.client. gh-86826: zipinfo now supports the full range of values in the TZ string determined by RFC 8536 and detects all invalid formats. Both Python and C implementations now raise exceptions of the same type on invalid data. bpo-41422: Fixed memory leaks of pickle.Pickler and pickle.Unpickler involving cyclic references via the internal memo mapping. bpo-40262: The ssl.SSLSocket.recv_into() method no longer requires the buffer argument to implement __len__ and supports buffers with arbitrary item size. bpo-35191: Fix unexpected integer truncation in socket.setblocking() which caused it to interpret multiples of 2**32 as False. Documentation gh-108826: dis module command-line interface is now mentioned in documentation. Tests gh-110367: Make regrtest --verbose3 option compatible with --huntrleaks -jN options. The ./python -m test -j1 -R 3:3 --verbose3 command now works as expected. Patch by Victor Stinner. gh-111309: distutils tests can now be run via unittest. gh-111165: Remove no longer used functions run_unittest() and run_doctest() and class BasicTestRunner from the test.support module. gh-110932: Fix regrtest if the SOURCE_DATE_EPOCH environment variable is defined: use the variable value as the random seed. Patch by Victor Stinner. gh-110995: test_gdb: Fix detection of gdb built without Python scripting support. Patch by Victor Stinner. gh-110918: Test case matching patterns specified by options --match, --ignore, --matchfile and --ignorefile are now tested in the order of specification, and the last match determines whether the test case be run or ignored. gh-110647: Fix test_stress_modifying_handlers() of test_signal. Patch by Victor Stinner. gh-103053: Fix test_tools.test_freeze on FreeBSD: run “make distclean” instead of “make clean” in the copied source directory to remove also the “python” program. Patch by Victor Stinner. gh-110167: Fix a deadlock in test_socket when server fails with a timeout but the client is still running in its thread. Don’t hold a lock to call cleanup functions in doCleanups(). One of the cleanup function waits until the client completes, whereas the client could deadlock if it called addCleanup() in such situation. Patch by Victor Stinner. gh-110388: Add tests for tty. gh-81002: Add tests for termios. gh-110267: Add tests for pickling and copying PyStructSequence objects. Patched by Xuehai Pan. gh-109974: Fix race conditions in test_threading lock tests. Wait until a condition is met rather than using time.sleep() with a hardcoded number of seconds. Patch by Victor Stinner. gh-109972: Split test_gdb.py file into a test_gdb package made of multiple tests, so tests can now be run in parallel. Patch by Victor Stinner. gh-104736: Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex: Fedora 38). Search patterns in gdb “bt” command output to detect when gdb fails to retrieve the traceback. For example, skip a test if Backtrace stopped: frame did not save the PC is found. Patch by Victor Stinner. gh-108927: Fixed order dependence in running tests in the same process when a test that has submodules (e.g. test_importlib) follows a test that imports its submodule (e.g. test_importlib.util) and precedes a test (e.g. test_unittest or test_compileall) that uses that submodule. Build gh-103053: “make check-clean-src” now also checks if the “python” program is found in the source directory: fail with an error if it does exist. Patch by Victor Stinner. gh-109191: Fix compile error when building with recent versions of libedit. Windows gh-110913: WindowsConsoleIO now correctly chunks large buffers without splitting up UTF-8 sequences. gh-110437: Allows overriding the source of VC redistributables so that releases can be guaranteed to never downgrade between updates. gh-109286: Update Windows installer to use SQLite 3.43.1. macOS gh-110950: Update macOS installer to include an upstream Tcl/Tk fix for the Secure coding is not enabled for restorable state! warning encountered in Tkinter on macOS 14 Sonoma. gh-111015: Ensure that IDLE.app and Python Launcher.app are installed with appropriate permissions on macOS builds. gh-109286: Update macOS installer to use SQLite 3.43.1. gh-71383: Update macOS installer to include an upstream Tcl/Tk fix for the ttk::ThemeChanged error encountered in Tkinter. gh-92603: Update macOS installer to include a fix accepted by upstream Tcl/Tk for a crash encountered after the first tkinter.Tk() instance is destroyed. gh-99834: Update macOS installer to Tcl/Tk 8.6.13. IDLE bpo-35668: Add docstrings to the IDLE debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); in Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Greatly expand test_debugger. C API gh-112438: Fix support of format units “es”, “et”, “es#”, and “et#” in nested tuples in PyArg_ParseTuple()-like functions. gh-109521: PyImport_GetImporter() now sets RuntimeError if it fails to get sys.path_hooks or sys.path_importer_cache or they are not list and dict correspondingly. Previously it could return NULL without setting error in obscure cases, crash or raise SystemError if these attributes have wrong type. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.21 2023/11/23 12:43:35 jperkin Exp $ d114 4 a117 1 . if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) d120 4 a123 1 . if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h)) @ 1.21 log @python*: Remove -luuid hack on SunOS. This ends up leaking into the shipped python-config, which wouldn't normally be a problem, but broken build systems such as waf end up linking against libraries that are not buildlinked, resulting in missing libuuid references. If this is still required for builtin libuuid support then that will need to be done in a different way that doesn't end up in the exported libraries. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.20 2023/11/10 16:55:32 nia Exp $ a5 1 PKGREVISION= 4 @ 1.20 log @Revert previous @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.19 2023/11/10 12:13:22 nia Exp $ a84 1 LIBS.SunOS+= -luuid @ 1.19 log @python: Honour user's choice of readline implementation. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.18 2023/11/08 13:19:51 wiz Exp $ d239 1 a246 1 .include "../../mk/readline.buildlink3.mk" @ 1.18 log @*: recursive bump for icu 74.1 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.17 2023/11/07 11:27:22 nia Exp $ a238 1 .include "../../devel/readline/buildlink3.mk" d246 1 @ 1.17 log @Python from version 3.11 onwards requires a C11 capable compiler. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.16 2023/10/25 21:33:15 wiz Exp $ d6 1 a6 1 PKGREVISION= 3 @ 1.16 log @python311: add 'wide' to USE_CURSES (Guessing and trying to fix macOS bulk build, please step in if you know the proper fix.) @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.15 2023/10/24 22:09:38 wiz Exp $ d38 1 @ 1.15 log @*: bump for openssl 3 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.14 2023/10/24 09:12:36 wiz Exp $ d49 1 a49 1 USE_CURSES= getsyx @ 1.14 log @python*: explicitly add --with-system-expat To make sure expat module is linked against expat library. Bump PKGREVISION. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.13 2023/10/23 08:50:35 wiz Exp $ d6 1 a6 1 PKGREVISION= 2 @ 1.13 log @python*: add SUPERSEDES @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.12 2023/10/23 06:36:00 wiz Exp $ d6 1 a6 1 PKGREVISION= 1 d41 1 @ 1.12 log @python*: include some standard modules in the base Python package As proposed on tech-pkg Bump PKGREVISION. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.11 2023/08/25 08:28:22 adam Exp $ d21 6 @ 1.11 log @python311 py311-html-docs: updated to 3.11.5 Python 3.11.5 Security gh-108310: Fixed an issue where instances of ssl.SSLSocket were vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and treating sent unencrypted data as if it were post-handshake TLS encrypted data. Security issue reported as CVE-2023-40217 by Aapo Oksman. Patch by Gregory P. Smith. Core and Builtins gh-104432: Fix potential unaligned memory access on C APIs involving returned sequences of char * pointers within the grp and socket modules. These were revealed using a -fsaniziter=alignment build on ARM macOS. Patch by Christopher Chavez. gh-77377: Ensure that multiprocessing synchronization objects created in a fork context are not sent to a different process created in a spawn context. This changes a segfault into an actionable RuntimeError in the parent process. gh-106092: Fix a segmentation fault caused by a use-after-free bug in frame_dealloc when the trashcan delays the deallocation of a PyFrameObject. gh-106719: No longer suppress arbitrary errors in the __annotations__ getter and setter in the type and module types. gh-106723: Propagate frozen_modules to multiprocessing spawned process interpreters. gh-105979: Fix crash in _imp.get_frozen_object() due to improper exception handling. gh-105840: Fix possible crashes when specializing function calls with too many __defaults__. gh-105588: Fix an issue that could result in crashes when compiling malformed ast nodes. gh-105375: Fix bugs in the builtins module where exceptions could end up being overwritten. gh-105375: Fix bug in the compiler where an exception could end up being overwritten. gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() where an exception could end up being overwritten. gh-105235: Prevent out-of-bounds memory access during mmap.find() calls. gh-101006: Improve error handling when read marshal data. Library gh-105736: Harmonized the pure Python version of OrderedDict with the C version. Now, both versions set up their internal state in __new__. Formerly, the pure Python version did the set up in __init__. gh-107963: Fix multiprocessing.set_forkserver_preload() to check the given list of modules names. Patch by Dong-hee Na. gh-106242: Fixes os.path.normpath() to handle embedded null characters without truncating the path. gh-107845: tarfile.data_filter() now takes the location of symlinks into account when determining their target, so it will no longer reject some valid tarballs with LinkOutsideDestinationError. gh-107715: Fix doctest.DocTestFinder.find() in presence of class names with special characters. Patch by Gertjan van Zwieten. gh-100814: Passing a callable object as an option value to a Tkinter image now raises the expected TclError instead of an AttributeError. gh-106684: Close asyncio.StreamWriter when it is not closed by application leading to memory leaks. Patch by Kumar Aditya. gh-107077: Seems that in some conditions, OpenSSL will return SSL_ERROR_SYSCALL instead of SSL_ERROR_SSL when a certification verification has failed, but the error parameters will still contain ERR_LIB_SSL and SSL_R_CERTIFICATE_VERIFY_FAILED. We are now detecting this situation and raising the appropiate ssl.SSLCertVerificationError. Patch by Pablo Galindo gh-107396: tarfiles; Fixed use before assignment of self.exception for gzip decompression gh-62519: Make gettext.pgettext() search plural definitions when translation is not found. gh-83006: Document behavior of shutil.disk_usage() for non-mounted filesystems on Unix. gh-106186: Do not report MultipartInvariantViolationDefect defect when the email.parser.Parser class is used to parse emails with headersonly=True. gh-106831: Fix potential missing NULL check of d2i_SSL_SESSION result in _ssl.c. gh-106774: Update the bundled copy of pip to version 23.2.1. gh-106752: Fixed several bug in zipfile.Path in name/suffix/suffixes/stem operations when no filename is present and the Path is not at the root of the zipfile. gh-106602: Add __copy__ and __deepcopy__ in enum gh-106530: Revert a change to colorsys.rgb_to_hls() that caused division by zero for certain almost-white inputs. Patch by Terry Jan Reedy. gh-106052: re module: fix the matching of possessive quantifiers in the case of a subpattern containing backtracking. gh-106510: Improve debug output for atomic groups in regular expressions. gh-105497: Fix flag mask inversion when unnamed flags exist. gh-90876: Prevent multiprocessing.spawn from failing to import in environments where sys.executable is None. This regressed in 3.11 with the addition of support for path-like objects in multiprocessing. gh-106350: Detect possible memory allocation failure in the libtommath function mp_init() used by the _tkinter module. gh-102541: Make pydoc.doc catch bad module ImportError when output stream is not None. gh-106263: Fix crash when calling repr with a manually constructed SignalDict object. Patch by Charlie Zhao. gh-105375: Fix a bug in _Unpickler_SetInputStream() where an exception could end up being overwritten in case of failure. gh-105375: Fix bugs in sys where exceptions could end up being overwritten because of deferred error handling. gh-105605: Harden pyexpat error handling during module initialisation to prevent exceptions from possibly being overwritten, and objects from being dereferenced twice. gh-105375: Fix bug in decimal where an exception could end up being overwritten. gh-105375: Fix bugs in _datetime where exceptions could be overwritten in case of module initialisation failure. gh-105375: Fix bugs in _ssl initialisation which could lead to leaked references and overwritten exceptions. gh-105375: Fix a bug in array.array where an exception could end up being overwritten. gh-105375: Fix bugs in _ctypes where exceptions could end up being overwritten. gh-105375: Fix a bug in the posix module where an exception could be overwritten. gh-105375: Fix bugs in _elementtree where exceptions could be overwritten. gh-105375: Fix bugs in zoneinfo where exceptions could be overwritten. gh-105375: Fix bugs in pickle where exceptions could be overwritten. gh-105497: Fix flag inversion when alias/mask members exist. gh-105375: Fix bugs in pickle where exceptions could be overwritten. gh-103171: Revert undocumented behaviour change with runtime-checkable protocols decorated with typing.final() in Python 3.11. The behaviour change had meant that objects would not be considered instances of these protocols at runtime unless they had a __final__ attribute. Patch by Alex Waygood. gh-105375: Fix a bug in sqlite3 where an exception could be overwritten in the collation callback. gh-105332: Revert pickling method from by-name back to by-value. gh-104554: Add RTSPS scheme support in urllib.parse gh-100061: Fix a bug that causes wrong matches for regular expressions with possessive qualifier. gh-102541: Hide traceback in help() prompt, when import failed. gh-99203: Restore following CPython <= 3.10.5 behavior of shutil.make_archive(): do not create an empty archive if root_dir is not a directory, and, in that case, raise FileNotFoundError or NotADirectoryError regardless of format choice. Beyond the brought-back behavior, the function may now also raise these exceptions in dry_run mode. gh-94777: Fix hanging multiprocessing ProcessPoolExecutor when a child process crashes while data is being written in the call queue. bpo-18319: Ensure gettext(msg) retrieve translations even if a plural form exists. In other words: gettext(msg) == ngettext(msg, '', 1). Documentation gh-107008: Document the curses module variables LINES and COLS. gh-106948: Add a number of standard external names to nitpick_ignore. gh-54738: Add documentation on how to localize the argparse module. Tests gh-105776: Fix test_cppext when the C compiler command -std=c11 option: remove -std= options from the compiler command. Patch by Victor Stinner. gh-107237: test_logging: Fix test_udp_reconnection() by increasing the timeout from 100 ms to 5 minutes (LONG_TIMEOUT). Patch by Victor Stinner. gh-101634: When running the Python test suite with -jN option, if a worker stdout cannot be decoded from the locale encoding report a failed testn so the exitcode is non-zero. Patch by Victor Stinner. Build gh-107814: When calling find_python.bat with -q it did not properly silence the output of nuget. That is now fixed. gh-106881: Check for linux/limits.h before including it in Modules/posixmodule.c. gh-104692: Include commoninstall as a prerequisite for bininstall This ensures that commoninstall is completed before bininstall is started when parallel builds are used (make -j install), and so the python3 symlink is only installed after all standard library modules are installed. gh-100340: Allows -Wno-int-conversion for wasm-sdk 17 and onwards, thus enables building WASI builds once against the latest sdk. Windows gh-106242: Fixes realpath() to behave consistently when passed a path containing an embedded null character on Windows. In strict mode, it now raises OSError instead of the unexpected ValueError, and in non-strict mode will make the path absolute. gh-106844: Fix integer overflow in _winapi.LCMapStringEx() which affects ntpath.normcase(). gh-99079: Update Windows build to use OpenSSL 3.0.9 gh-105436: Ensure that an empty environment block is terminated by two null characters, as is required by Windows. macOS gh-107565: Update macOS installer to use OpenSSL 3.0.10. gh-99079: Update macOS installer to use OpenSSL 3.0.9. Tools/Demos gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. gh-95065: Argument Clinic now supports overriding automatically generated signature by using directive @@text_signature. See How to override the generated signature. gh-106970: Fix bugs in the Argument Clinic destination clear command; the destination buffers would never be cleared, and the destination directive parser would simply continue to the fault handler after processing the command. Patch by Erlend E. Aasland. C API gh-107916: C API functions PyErr_SetFromErrnoWithFilename(), PyErr_SetExcFromWindowsErrWithFilename() and PyErr_SetFromWindowsErrWithFilename() save now the error code before calling PyUnicode_DecodeFSDefault(). gh-107915: Such C API functions as PyErr_SetString(), PyErr_Format(), PyErr_SetFromErrnoWithFilename() and many others no longer crash or ignore errors if it failed to format the error message or decode the filename. Instead, they keep a corresponding error. gh-107226: PyModule_AddObjectRef() is now only available in the limited API version 3.10 or later. gh-105375: Fix a bug in PyErr_WarnExplicit() where an exception could end up being overwritten if the API failed internally. gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data: *consumed was not set. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.10 2023/08/15 14:39:08 schmonz Exp $ d6 1 d15 6 d41 5 a221 3 # needed to make devel/py-readline pick up the correct readline implementation BUILDLINK_DEPMETHOD.readline= build d224 1 d234 1 d236 1 @ 1.10 log @python3*: when linking with pkgsrc gettext, pass -lintl. When linking with builtin gettext, NFCI. Fixes PREFER_PKGSRC=gettext-lib builds on at least NetBSD 9 and 10. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.9 2023/07/22 18:27:45 js Exp $ a5 1 PKGREVISION= 2 @ 1.9 log @Fix lang/python311 on Linux @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.8 2023/06/29 01:32:28 riastradh Exp $ d217 3 @ 1.8 log @python311: Adjust to new configure interface for cross-compilation. Restore patch to simplify sysconfigdata name in configure, now that passing through this logic is mandatory for cross-compilation (at least, mandatory without further patches to configure). @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.7 2023/06/27 10:35:30 riastradh Exp $ d6 1 a6 1 PKGREVISION= 1 d92 4 a95 1 PLIST_VARS+= nis @ 1.7 log @python: Override sys.platform with PY_PLATNAME when cross-compiling. For this purpose, factor the PY_PLATNAME definition out into a new lang/pythonNN/platname.mk file. It's not the same for 2.x and 3.x; perhaps we could factor it out further into a single 2.x vs 3.x conditional but this is a more mechanical change that makes it easier to audit for now. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.6 2023/06/27 10:29:58 riastradh Exp $ d42 1 a42 2 # XXX copied from ../../lang/python/pyversion.mk to avoid including it CONFIGURE_ARGS+= PYTHON_FOR_BUILD=${TOOLBASE:Q}/bin/python3.11 a53 3 MAKE_ENV+= \ _PYTHON_HOST_PLATFORM=${LOWER_OPSYS}-${MACHINE_GNU_ARCH} MAKE_ENV+= _PYTHON_PROJECT_BASE=${WRKSRC} @ 1.6 log @lang/python39, 310, 311: Handle TOOLBASE/LOCALBASE split. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2023/06/22 11:16:06 jperkin Exp $ a81 1 PY_PLATNAME= ${LOWER_OPSYS} a82 10 .elif ${OPSYS} == "IRIX" PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} .elif ${OPSYS} == "SunOS" PY_PLATNAME= sunos${OS_VERSION:C/\..*//} .elif ${OPSYS} == "HPUX" PY_PLATNAME= hp-ux11 .elif ${OPSYS} == "Linux" PY_PLATNAME= linux .else PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} d84 2 @ 1.5 log @python311: Do not define static_assert in C++ code. Bump PKGREVISION. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2023/01/14 17:25:53 wiz Exp $ d43 1 a43 2 # XXX should use NATIVE_PREFIX but we don't have that CONFIGURE_ARGS+= PYTHON_FOR_BUILD=${PREFIX}/bin/python3.11 @ 1.4 log @python311: clean up some pkglint @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2023/01/14 17:22:25 wiz Exp $ d6 1 d62 1 a62 1 .if !empty(MACHINE_PLATFORM:MDarwin-1[12].*) @ 1.3 log @python311: remove REPLACE* where it changes nothing @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.2 2022/11/02 11:36:23 jperkin Exp $ d39 1 a39 1 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) @ 1.2 log @python311: SunOS build and install fixes. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2022/10/31 09:50:40 adam Exp $ a134 1 REPLACE_FILES.python+= Lib/keyword.py a171 2 REPLACE_SH+= Misc/python-config.sh.in @ 1.1 log @python311 py311-html-docs: added version 3.11.0 Python 3.11 is between 10-60% faster than Python 3.10. On average, we measured a 1.25x speedup on the standard benchmark suite. See Faster CPython for details. New syntax features: PEP 654: Exception Groups and except* New built-in features: PEP 678: Exceptions can be enriched with notes New standard library modules: PEP 680: tomllib — Support for parsing TOML in the Standard Library Interpreter improvements: PEP 657: Fine-grained error locations in tracebacks New -P command line option and PYTHONSAFEPATH environment variable to disable automatically prepending potentially unsafe paths to sys.path New typing features: PEP 646: Variadic generics PEP 655: Marking individual TypedDict items as required or not-required PEP 673: Self type PEP 675: Arbitrary literal string type PEP 681: Data class transforms Important deprecations, removals and restrictions: PEP 594: Many legacy standard library modules have been deprecated and will be removed in Python 3.13 PEP 624: Py_UNICODE encoder APIs have been removed PEP 670: Macros converted to static inline functions @ text @d1 1 a1 1 # $NetBSD$ d103 2 @