From 37c9641867a6f659666ecd89c6de88076eeef71c Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:22:31 -0500 Subject: [PATCH 1/7] Update .gitpod.yml Updated the tasks when setting up the Gitpod environment. All command line output during setup should now be logged into a file (setup.log), and echos are done before each segment of setup. This way, we should be able to narrow down the exact command that causes the weird pandas version to be downloaded. --- .gitpod.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 5bf028750f30f..b3c9ace1106ee 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,14 +10,20 @@ image: tasks: - name: Prepare development environment init: | + echo "running: mkdir -p .vscode" 2>&1 | tee -a setup.log mkdir -p .vscode + echo "running: cp gitpod/settings.json .vscode/settings.json" 2>&1 | tee -a setup.log cp gitpod/settings.json .vscode/settings.json - git fetch --tags - python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true - pre-commit install --install-hooks + echo "running: git fetch --tags" 2>&1 | tee -a setup.log + git fetch --tags 2>&1 | tee -a setup.log + echo "running: python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true" 2>&1 | tee -a setup.log + python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true 2>&1 | tee -a setup.log + echo "running: pre-commit install --install-hooks" 2>&1 | tee -a setup.log + pre-commit install --install-hooks 2>&1 | tee -a setup.log command: | - python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true - echo "✨ Pre-build complete! You can close this terminal ✨ " + echo "running: python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true" 2>&1 | tee -a setup.log + python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true 2>&1 | tee -a setup.log + echo "✨ Pre-build complete! You can close this terminal ✨ " 2>&1 | tee -a setup.log # -------------------------------------------------------- # exposing ports for liveserve From 354adfdfead959f2ae03241a0aef4a07db9351cb Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:27:11 -0500 Subject: [PATCH 2/7] Update __init__.py Changed lines 176 - 190, just gonna see what happens when we try to build the project w/ Gitpod --- pandas/__init__.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pandas/__init__.py b/pandas/__init__.py index 6c97baa890777..edf6c48d6c2c3 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -173,21 +173,21 @@ from pandas.util._tester import test # use the closest tagged version if possible -_built_with_meson = False -try: - from pandas._version_meson import ( # pyright: ignore [reportMissingImports] - __version__, - __git_version__, - ) +# _built_with_meson = False +# try: +# from pandas._version_meson import ( # pyright: ignore [reportMissingImports] +# __version__, +# __git_version__, +# ) - _built_with_meson = True -except ImportError: - from pandas._version import get_versions +# _built_with_meson = True +# except ImportError: +from pandas._version import get_versions - v = get_versions() - __version__ = v.get("closest-tag", v["version"]) - __git_version__ = v.get("full-revisionid") - del get_versions, v +v = get_versions() +__version__ = v.get("closest-tag", v["version"]) +__git_version__ = v.get("full-revisionid") +del get_versions, v # module level doc-string From 8002999354e194dc9e01dc22476ea75692c331a3 Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Sat, 16 Nov 2024 16:43:10 -0500 Subject: [PATCH 3/7] Re-fixing __init__.py It sorta worked, but not exactly. --- pandas/__init__.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/pandas/__init__.py b/pandas/__init__.py index edf6c48d6c2c3..ddf3cd26bef35 100644 --- a/pandas/__init__.py +++ b/pandas/__init__.py @@ -173,21 +173,21 @@ from pandas.util._tester import test # use the closest tagged version if possible -# _built_with_meson = False -# try: -# from pandas._version_meson import ( # pyright: ignore [reportMissingImports] -# __version__, -# __git_version__, -# ) - -# _built_with_meson = True -# except ImportError: -from pandas._version import get_versions +_built_with_meson = False +try: + from pandas._version_meson import ( # pyright: ignore [reportMissingImports] + __version__, + __git_version__, + ) -v = get_versions() -__version__ = v.get("closest-tag", v["version"]) -__git_version__ = v.get("full-revisionid") -del get_versions, v + _built_with_meson = True +except ImportError: + from pandas._version import get_versions + + v = get_versions() + __version__ = v.get("closest-tag", v["version"]) + __git_version__ = v.get("full-revisionid") + del get_versions, v # module level doc-string From 259c38f3fedd9d4ce9ad0ea62b49e9f83126f21e Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Sat, 16 Nov 2024 21:10:06 -0500 Subject: [PATCH 4/7] Update .gitpod.yml Let's see if this fixes it --- .gitpod.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index b3c9ace1106ee..a0639848ff482 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -23,6 +23,8 @@ tasks: command: | echo "running: python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true" 2>&1 | tee -a setup.log python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true 2>&1 | tee -a setup.log + echo "removing: _version_meson.py" + rm -f build/cp310/_version_meson.py echo "✨ Pre-build complete! You can close this terminal ✨ " 2>&1 | tee -a setup.log # -------------------------------------------------------- From c7963542a1e2d6f62712e38708ac832d2e4a83f2 Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:30:02 -0500 Subject: [PATCH 5/7] Gitpod build patch Removed faulty file from gitpod cp310 folder causing a build error when using the gitpod environment. --- .gitpod.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index a0639848ff482..1025e92450a9b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,22 +10,15 @@ image: tasks: - name: Prepare development environment init: | - echo "running: mkdir -p .vscode" 2>&1 | tee -a setup.log mkdir -p .vscode - echo "running: cp gitpod/settings.json .vscode/settings.json" 2>&1 | tee -a setup.log cp gitpod/settings.json .vscode/settings.json - echo "running: git fetch --tags" 2>&1 | tee -a setup.log - git fetch --tags 2>&1 | tee -a setup.log - echo "running: python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true" 2>&1 | tee -a setup.log - python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true 2>&1 | tee -a setup.log - echo "running: pre-commit install --install-hooks" 2>&1 | tee -a setup.log - pre-commit install --install-hooks 2>&1 | tee -a setup.log + git fetch --tags + python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true + pre-commit install --install-hooks command: | - echo "running: python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true" 2>&1 | tee -a setup.log - python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true 2>&1 | tee -a setup.log - echo "removing: _version_meson.py" + python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true rm -f build/cp310/_version_meson.py - echo "✨ Pre-build complete! You can close this terminal ✨ " 2>&1 | tee -a setup.log + echo "✨ Pre-build complete! You can close this terminal ✨ " # -------------------------------------------------------- # exposing ports for liveserve From 89e65dc6ac56af8ca743f3581154b21fec8a2e45 Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Fri, 29 Nov 2024 21:03:19 -0500 Subject: [PATCH 6/7] Issue #59459 Patch - removing faulty _version_meson.py file --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 1025e92450a9b..94b56df6daa4e 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -17,7 +17,7 @@ tasks: pre-commit install --install-hooks command: | python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true - rm -f build/cp310/_version_meson.py + rm -f build/cp310/_version_meson.py # this file breaks setup if not removed (causes untagged pandas version to be used) echo "✨ Pre-build complete! You can close this terminal ✨ " # -------------------------------------------------------- From 601ffc5c83a6433ab377699dfcd835ef22ef35d6 Mon Sep 17 00:00:00 2001 From: brendan <145164155+brendanm2025@users.noreply.github.com> Date: Fri, 29 Nov 2024 21:11:58 -0500 Subject: [PATCH 7/7] Update v3.0.0.rst For bug fix --- doc/source/whatsnew/v3.0.0.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst index de69166b8c196..7bdca12632c16 100644 --- a/doc/source/whatsnew/v3.0.0.rst +++ b/doc/source/whatsnew/v3.0.0.rst @@ -787,6 +787,7 @@ Other - Bug in :meth:`read_csv` where chained fsspec TAR file and ``compression="infer"`` fails with ``tarfile.ReadError`` (:issue:`60028`) - Bug in Dataframe Interchange Protocol implementation was returning incorrect results for data buffers' associated dtype, for string and datetime columns (:issue:`54781`) - Bug in ``Series.list`` methods not preserving the original :class:`Index`. (:issue:`58425`) +- Bug in ``_version_meson.py`` when building pandas in Gitpod environment, using an (unusable) untagged version of pandas that breaks the build .. ***DO NOT USE THIS SECTION***