From 0dce800024513c75be19f2bdf4b6da94a34aac93 Mon Sep 17 00:00:00 2001 From: Brayan Henao Date: Tue, 27 Jun 2023 16:04:13 -0400 Subject: [PATCH] Deprecate Python 3.7.x (EOL) --- manifest.yml | 20 -------------------- src/python/supply/supply_test.go | 26 ++++---------------------- 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/manifest.yml b/manifest.yml index 459bfa2a..2b4f8bfd 100644 --- a/manifest.yml +++ b/manifest.yml @@ -12,10 +12,6 @@ dependency_deprecation_dates: name: python date: 2027-10-24 link: https://www.python.org/dev/peps/pep-0664/ -- version_line: 3.7.x - name: python - date: 2023-06-27 - link: https://www.python.org/dev/peps/pep-0537/ - version_line: 3.8.x name: python date: 2024-10-14 @@ -77,22 +73,6 @@ dependencies: - cflinuxfs4 source: https://files.pythonhosted.org/packages/69/51/dafe11039d53a44ca1ffa51d4a341d6de7de85ca914a818040e9755b0436/pipenv-2023.6.26.tar.gz source_sha256: b4cf3894c0a8621da79c4c54edc5fdb5285c8e92a8fd4c7a8d13a9771d39c7e7 -- name: python - version: 3.7.17 - uri: https://buildpacks.cloudfoundry.org/dependencies/python/python_3.7.17_linux_x64_cflinuxfs3_d287c0c5.tgz - sha256: d287c0c563c6d3b4a3fdbc3cae3175362987ab88e4f58e32e652664987415364 - cf_stacks: - - cflinuxfs3 - source: https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tgz - source_sha256: fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49 -- name: python - version: 3.7.17 - uri: https://buildpacks.cloudfoundry.org/dependencies/python/python_3.7.17_linux_x64_cflinuxfs4_deda826e.tgz - sha256: deda826e804834ad44ef2e8d431e2b995dae372d9aba47973fe0e4ed22ed3701 - cf_stacks: - - cflinuxfs4 - source: https://www.python.org/ftp/python/3.7.17/Python-3.7.17.tgz - source_sha256: fd50161bc2a04f4c22a0971ff0f3856d98b4bf294f89740a9f06b520aae63b49 - name: python version: 3.8.17 uri: https://buildpacks.cloudfoundry.org/dependencies/python/python_3.8.17_linux_x64_cflinuxfs3_9a6aa6b5.tgz diff --git a/src/python/supply/supply_test.go b/src/python/supply/supply_test.go index f3d69d04..a0efd4a7 100644 --- a/src/python/supply/supply_test.go +++ b/src/python/supply/supply_test.go @@ -93,9 +93,9 @@ var _ = Describe("Supply", func() { BeforeEach(func() { Expect(os.MkdirAll(depDir, 0755)).To(Succeed()) pythonInstallDir = filepath.Join(depDir, "python") - Expect(os.WriteFile(filepath.Join(depDir, "runtime.txt"), []byte("\n\n\npython-3.4.2\n\n\n"), 0644)).To(Succeed()) + Expect(os.WriteFile(filepath.Join(depDir, "runtime.txt"), []byte("\n\n\npython-3.9.2\n\n\n"), 0644)).To(Succeed()) - versions = []string{"3.4.2", "3.7.13"} + versions = []string{"3.9.2", "3.10.1"} originalPath = os.Getenv("PATH") }) @@ -106,31 +106,13 @@ var _ = Describe("Supply", func() { Context("runtime.txt sets Python version 3", func() { It("installs Python version 3", func() { mockManifest.EXPECT().AllDependencyVersions("python").Return(versions) - mockInstaller.EXPECT().InstallDependency(libbuildpack.Dependency{Name: "python", Version: "3.4.2"}, pythonInstallDir) + mockInstaller.EXPECT().InstallDependency(libbuildpack.Dependency{Name: "python", Version: "3.9.2"}, pythonInstallDir) mockStager.EXPECT().LinkDirectoryInDepDir(filepath.Join(pythonInstallDir, "bin"), "bin") mockStager.EXPECT().LinkDirectoryInDepDir(filepath.Join(pythonInstallDir, "lib"), "lib") Expect(supplier.InstallPython()).To(Succeed()) Expect(os.Getenv("PATH")).To(Equal(fmt.Sprintf("%s:%s", filepath.Join(depDir, "bin"), originalPath))) Expect(os.Getenv("PYTHONPATH")).To(Equal(depDir)) - Expect(os.Getenv("CFLAGS")).To(Equal(fmt.Sprintf("-I%s", filepath.Join(depDir, "python", "include", "python3.4")))) - }) - }) - - //Remove once Python 3.7 is out of support (June 2023) - Context("runtime.txt sets Python version 3.7", func() { - BeforeEach(func() { - Expect(os.RemoveAll(filepath.Join(depDir, "runtime.txt"))).To(Succeed()) - Expect(os.WriteFile(filepath.Join(depDir, "runtime.txt"), []byte("\n\n\npython-3.7.13\n\n\n"), 0644)).To(Succeed()) - }) - It("installs Python version 3.7", func() { - mockManifest.EXPECT().AllDependencyVersions("python").Return(versions) - mockInstaller.EXPECT().InstallDependency(libbuildpack.Dependency{Name: "python", Version: "3.7.13"}, pythonInstallDir) - mockStager.EXPECT().LinkDirectoryInDepDir(filepath.Join(pythonInstallDir, "bin"), "bin") - mockStager.EXPECT().LinkDirectoryInDepDir(filepath.Join(pythonInstallDir, "lib"), "lib") - Expect(supplier.InstallPython()).To(Succeed()) - Expect(os.Getenv("PATH")).To(Equal(fmt.Sprintf("%s:%s", filepath.Join(depDir, "bin"), originalPath))) - Expect(os.Getenv("PYTHONPATH")).To(Equal(depDir)) - Expect(os.Getenv("CFLAGS")).To(Equal(fmt.Sprintf("-I%s", filepath.Join(depDir, "python", "include", "python3.7m")))) + Expect(os.Getenv("CFLAGS")).To(Equal(fmt.Sprintf("-I%s", filepath.Join(depDir, "python", "include", "python3.9")))) }) })