diff --git a/.ci_support/migrations/python310.yaml b/.ci_support/migrations/python310.yaml deleted file mode 100644 index c31e9914..00000000 --- a/.ci_support/migrations/python310.yaml +++ /dev/null @@ -1,34 +0,0 @@ -migrator_ts: 1634137107 -__migrator: - migration_number: 1 - operation: key_add - primary_key: python - ordering: - python: - - 3.6.* *_cpython - - 3.7.* *_cpython - - 3.8.* *_cpython - - 3.9.* *_cpython - - 3.10.* *_cpython # new entry - - 3.6.* *_73_pypy - - 3.7.* *_73_pypy - paused: false - longterm: True - pr_limit: 40 - max_solver_attempts: 10 # this will make the bot retry "not solvable" stuff 10 times - exclude: - # this shouldn't attempt to modify the python feedstocks - - python - - pypy3.6 - - pypy-meta - - cross-python - - python_abi - exclude_pinned_pkgs: false - -python: - - 3.10.* *_cpython -# additional entries to add for zip_keys -numpy: - - 1.21 -python_impl: - - cpython diff --git a/recipe/gh11734.patch b/recipe/gh11734.patch deleted file mode 100644 index 47a253f0..00000000 --- a/recipe/gh11734.patch +++ /dev/null @@ -1,23 +0,0 @@ -From b086fee19cfbafb3275737d1eb2cda9632030de9 Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Thu, 18 Aug 2022 09:56:17 -0500 -Subject: [PATCH] Fix pypy win - ---- - conda/gateways/disk/link.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/conda/gateways/disk/link.py b/conda/gateways/disk/link.py -index 116010f764..b66ae3eb25 100644 ---- a/conda/gateways/disk/link.py -+++ b/conda/gateways/disk/link.py -@@ -79,8 +79,7 @@ def win_soft_link(src, dst): - from os import getcwd - from os.path import isfile - import sys -- from ...auxlib._vendor import six -- builtins = six.moves.builtins -+ import builtins - - def islink(path): - """Determine if the given path is a symlink""" diff --git a/recipe/gh9946_utf_16_replacement.patch b/recipe/gh9946_utf_16_replacement.patch index 673c7aa2..40dca862 100644 --- a/recipe/gh9946_utf_16_replacement.patch +++ b/recipe/gh9946_utf_16_replacement.patch @@ -1,43 +1,68 @@ -diff --color -Naur conda-4.10.3.orig/conda/core/portability.py conda-4.10.3/conda/core/portability.py ---- conda-4.10.3.orig/conda/core/portability.py 2021-06-29 23:30:51.000000000 -0300 -+++ conda-4.10.3/conda/core/portability.py 2021-09-09 16:15:55.872345749 -0300 -@@ -3,6 +3,10 @@ +diff --color -Naur conda-22.9.0.orig/conda/core/portability.py conda-22.9.0/conda/core/portability.py +--- conda-22.9.0.orig/conda/core/portability.py 2022-06-29 23:30:51.000000000 -0300 ++++ conda-22.9.0/conda/core/portability.py 2022-09-09 16:15:55.872345749 -0300 +@@ -3,6 +3,9 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals +# force encodings to be available when updating python. +# xref.: https://github.com/conda-forge/conda-feedstock/pull/135 +from encodings import utf_8, utf_16, utf_16_le, utf_16_be, utf_32, utf_32_le, utf_32_be -+ from logging import getLogger from os.path import realpath import re -@@ -68,21 +72,40 @@ +@@ -77,34 +80,52 @@ def update_prefix( def replace_prefix(mode, data, placeholder, new_prefix): - if mode == FileMode.text: +- if not on_win: +- # if new_prefix contains spaces, it might break the shebang! +- # handle this by escaping the spaces early, which will trigger a +- # /usr/bin/env replacement later on +- newline_pos = data.find(b"\n") +- if newline_pos > -1: +- shebang_line, rest_of_data = data[:newline_pos], data[newline_pos:] +- shebang_placeholder = f"#!{placeholder}".encode('utf-8') +- if shebang_placeholder in shebang_line: +- escaped_shebang = f"#!{new_prefix}".replace(" ", "\\ ").encode('utf-8') +- shebang_line = shebang_line.replace(shebang_placeholder, escaped_shebang) +- data = shebang_line + rest_of_data +- # the rest of the file can be replaced normally - data = data.replace(placeholder.encode('utf-8'), new_prefix.encode('utf-8')) - elif mode == FileMode.binary: - data = binary_replace(data, placeholder.encode('utf-8'), new_prefix.encode('utf-8')) - else: - raise CondaIOError("Invalid mode: %r" % mode) + popular_encodings = [ -+ 'utf-8', ++ "utf-8", + # Make sure to specify -le and -be so that the UTF endian prefix + # doesn't show up in the string -+ 'utf-16-le', 'utf-16-be', -+ 'utf-32-le', 'utf-32-be' ++ "utf-16-le", ++ "utf-16-be", ++ "utf-32-le", ++ "utf-32-be", + ] + for encoding in popular_encodings: + if mode == FileMode.text: -+ data = data.replace(placeholder.encode(encoding), -+ new_prefix.encode(encoding)) ++ if not on_win: ++ # if new_prefix contains spaces, it might break the shebang! ++ # handle this by escaping the spaces early, which will trigger a ++ # /usr/bin/env replacement later on ++ newline_pos = data.find(b"\n") ++ if newline_pos > -1: ++ shebang_line, rest_of_data = data[:newline_pos], data[newline_pos:] ++ shebang_placeholder = f"#!{placeholder}".encode(encoding) ++ if shebang_placeholder in shebang_line: ++ escaped_shebang = f"#!{new_prefix}".replace(" ", "\\ ").encode(encoding) ++ shebang_line = shebang_line.replace(shebang_placeholder, escaped_shebang) ++ data = shebang_line + rest_of_data ++ # the rest of the file can be replaced normally ++ data = data.replace(placeholder.encode(encoding), new_prefix.encode(encoding)) + elif mode == FileMode.binary: -+ data = binary_replace(data, -+ placeholder.encode(encoding), -+ new_prefix.encode(encoding), -+ encoding=encoding) ++ data = binary_replace( ++ data, placeholder.encode(encoding), new_prefix.encode(encoding), encoding=encoding ++ ) + else: + raise CondaIOError("Invalid mode: %r" % mode) return data @@ -50,7 +75,6 @@ diff --color -Naur conda-4.10.3.orig/conda/core/portability.py conda-4.10.3/cond replaced with `b` and the remaining string is padded with null characters. All input arguments are expected to be bytes objects. + -+ + Parameters + ---------- + encoding: str @@ -60,7 +84,7 @@ diff --color -Naur conda-4.10.3.orig/conda/core/portability.py conda-4.10.3/cond if on_win: # on Windows for binary files, we currently only replace a pyzzer-type entry point # we skip all other prefix replacement -@@ -99,7 +122,10 @@ +@@ -121,7 +142,10 @@ def binary_replace(data, a, b): return match.group().replace(a, b) + b'\0' * padding original_data_len = len(data) @@ -72,9 +96,9 @@ diff --color -Naur conda-4.10.3.orig/conda/core/portability.py conda-4.10.3/cond data = pat.sub(replace, data) assert len(data) == original_data_len -diff --color -Naur conda-4.10.3.orig/tests/test_install.py conda-4.10.3/tests/test_install.py ---- conda-4.10.3.orig/tests/test_install.py 2021-06-29 23:30:51.000000000 -0300 -+++ conda-4.10.3/tests/test_install.py 2021-09-09 16:16:53.941678976 -0300 +diff --color -Naur conda-22.9.0.orig/tests/test_install.py conda-22.9.0/tests/test_install.py +--- conda-22.9.0.orig/tests/test_install.py 2022-06-29 23:30:51.000000000 -0300 ++++ conda-22.9.0/tests/test_install.py 2022-09-09 16:16:53.941678976 -0300 @@ -34,9 +34,14 @@ @pytest.mark.xfail(on_win, reason="binary replacement on windows skipped", strict=True) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 89c7a327..acd27661 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set on_win = SUBDIR in ('win-64', 'win-32') %} -{% set version = "4.14.0" %} +{% set version = "22.9.0" %} # Running pytest requires the inclusion of test files which baloons # the size of the package; values can be "yes" or "no" {% set run_pytest = "no" %} @@ -11,10 +11,9 @@ package: source: fn: conda-{{ version }}.tar.gz url: https://github.com/conda/conda/archive/{{ version }}.tar.gz - sha256: 9b9fa3e20a2bcdd30496fc886bdd28b102e3a87eb3cdb4659b0a7e4e9edd52a8 + sha256: 35c924fab82e1be7a3359494ff02eab2b2d9b04004cc689e41f84edc1fb853c0 patches: - gh9946_utf_16_replacement.patch - - gh11734.patch build: number: 0