Skip to content
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

Deprecate Python 3.7.x (EOL) #789

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 4 additions & 22 deletions src/python/supply/supply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})

Expand All @@ -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"))))
})
})

Expand Down