Skip to content

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Aug 21, 2025

PR Type

Enhancement


Description

  • Add Python 3.13.5 version support with configuration files

  • Include batch scripts for Python execution and wheel installation

  • Update bundle release version to 2025.8.21

  • Add pywin32 wheel installation for Windows compatibility


Diagram Walkthrough

flowchart LR
  A["Python 3.13.5"] --> B["Configuration Files"]
  A --> C["Batch Scripts"]
  A --> D["Wheel Installation"]
  B --> E["bearsampp.conf"]
  C --> F["python.bat"]
  C --> G["install.bat"]
  D --> H["pywin32 wheel"]
Loading

File Walkthrough

Relevant files
Configuration changes
python.bat
Python execution wrapper script                                                   

bin/python3.13.5/bin/python.bat

  • Create Python execution wrapper batch script
  • Set up environment variables and working directory
  • Enable backward compatibility for command-line usage
+6/-0     
install.bat
Wheel installation script                                                               

bin/python3.13.5/wheel/install.bat

  • Create wheel installation batch script
  • Install pywin32 wheel package for Windows compatibility
+4/-0     
bearsampp.conf
Python version configuration                                                         

bin/python3.13.5/bearsampp.conf

  • Define Python 3.13.5 version configuration
  • Specify executable paths and bundle release placeholder
+6/-0     
wheel.properties
Wheel package properties                                                                 

bin/python3.13.5/wheel/wheel.properties

  • Define pywin32 wheel download URL
  • Reference external wheel package repository
+1/-0     
build.properties
Bundle release version update                                                       

build.properties

  • Update bundle release version from 2025.6.6 to 2025.8.21
+1/-1     
releases.properties
Release registry update                                                                   

releases.properties

  • Add Python 3.13.5 release entry with download URL
+1/-0     

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Aug 21, 2025

PR Reviewer Guide 🔍

(Review updated until commit 017324d)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Supply chain:
The wheel is fetched from an external GitHub release without checksum or signature verification. Consider adding hash verification and HTTPS URL integrity checks in the install process.

⚡ Recommended focus areas for review

Hardcoded Wheel

The wheel filename is hardcoded to a specific tag (pywin32-311-cp313-cp313-win_amd64.whl). Verify this matches the actual file provided by the URL and intended architecture/ABI, and consider parameterizing to avoid future mismatches.

@echo off
set WINPYSCRIPTSDIR=%~dp0..\scripts
call "%WINPYSCRIPTSDIR%\env.bat"
"%WINPYDIR%\Scripts\pip.exe" install pywin32-311-cp313-cp313-win_amd64.whl
Env Var Assumptions

The script assumes WINPYWORKDIR and WINPYDIR are set by env_for_icons.bat. Confirm these variables are reliably set and handle failure (e.g., missing env or spaces in paths) with error checks.

@echo off
set WINPYSCRIPTSDIR=%~dp0..\scripts
call "%WINPYSCRIPTSDIR%\env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
rem backward compatibility for python command-line users
"%WINPYDIR%\python.exe" %*
External URL Pin

The wheel URL is pinned to a specific release. Validate availability and checksum, and consider adding integrity verification to avoid supply issues.

wheel = https://github.com/Bearsampp/modules-untouched/releases/download/python-2025.8.21/pywin32-311-cp313-cp313-win_amd64.whl

@qodo-merge-pro
Copy link

qodo-merge-pro bot commented Aug 21, 2025

PR Code Suggestions ✨

Latest suggestions up to 017324d
Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use absolute wheel path and exit code

Use the full path to the wheel to avoid relying on the current directory, and
enable pip's no-index with find-links to ensure the local wheel is used. Also,
propagate the exit code to surface installation failures.

bin/python3.13.5/wheel/install.bat [1-4]

 @echo off
 set WINPYSCRIPTSDIR=%~dp0..\scripts
 call "%WINPYSCRIPTSDIR%\env.bat"
-"%WINPYDIR%\Scripts\pip.exe" install pywin32-311-cp313-cp313-win_amd64.whl
+set "WHEEL_DIR=%~dp0"
+"%WINPYDIR%\Scripts\pip.exe" install --no-index --find-links="%WHEEL_DIR%" "%WHEEL_DIR%pywin32-311-cp313-cp313-win_amd64.whl"
+exit /B %ERRORLEVEL%
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: This suggestion significantly improves the installation script's robustness by using an absolute path for the wheel, preventing network lookups with --no-index, and propagating the exit code for error handling.

Medium
Handle spaces and return exit code

Quote the work directory when changing directories to avoid failures if
WINPYWORKDIR contains spaces. Also, propagate ERRORLEVEL from python to the
caller so scripts and tooling can detect failures.

bin/python3.13.5/bin/python.bat [1-6]

 @echo off
 set WINPYSCRIPTSDIR=%~dp0..\scripts
 call "%WINPYSCRIPTSDIR%\env_for_icons.bat"
-cd/D "%WINPYWORKDIR%"
+cd /D "%WINPYWORKDIR%"
 rem backward compatibility for python command-line users
 "%WINPYDIR%\python.exe" %*
+exit /B %ERRORLEVEL%
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion to propagate the ERRORLEVEL is a valuable improvement for robustness, as it allows calling scripts to detect failures within the python execution.

Low
Security
Add checksum verification

Validate the ABI tag to match Python 3.13; if the URL changes, ensure the
filename remains consistent. Consider pinning checksum to detect corrupted or
tampered downloads.

bin/python3.13.5/wheel/wheel.properties [1]

 wheel = https://github.com/Bearsampp/modules-untouched/releases/download/python-2025.8.21/pywin32-311-cp313-cp313-win_amd64.whl
+wheel.sha256 = <ADD_SHA256_CHECKSUM_HERE>
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: Adding a checksum for the downloaded wheel is a crucial security enhancement to verify file integrity and prevent the use of corrupted or tampered files.

Medium
  • More

Previous suggestions

✅ Suggestions up to commit e1e2a7d
CategorySuggestion                                                                                                                                    Impact
High-level
Wheel/ABI version mismatch

The bundled pywin32 wheel name targets Python 3.13 (cp313) but embeds a 311
version tag (pywin32-311-cp313...), which likely indicates a mismatched or
incorrectly named artifact and may break installation/runtime ABI expectations.
Verify the correct pywin32 build for CPython 3.13 amd64 and fix both the wheel
filename/URL and install script accordingly.

Examples:

bin/python3.13.5/wheel/install.bat [4]
"%WINPYDIR%\Scripts\pip.exe" install pywin32-311-cp313-cp313-win_amd64.whl
bin/python3.13.5/wheel/wheel.properties [1]
wheel = https://github.com/Bearsampp/modules-untouched/releases/download/python-2025.8.21/pywin32-311-cp313-cp313-win_amd64.whl

Solution Walkthrough:

Before:

# bin/python3.13.5/wheel/install.bat
...
"%WINPYDIR%\Scripts\pip.exe" install pywin32-311-cp313-cp313-win_amd64.whl

# bin/python3.13.5/wheel/wheel.properties
wheel = https://.../pywin32-311-cp313-cp313-win_amd64.whl

After:

# bin/python3.13.5/wheel/install.bat
...
"%WINPYDIR%\Scripts\pip.exe" install pywin32-<correct_version>-cp313-cp313-win_amd64.whl

# bin/python3.13.5/wheel/wheel.properties
wheel = https://.../pywin32-<correct_version>-cp313-cp313-win_amd64.whl
Suggestion importance[1-10]: 9

__

Why: This suggestion correctly identifies a potential ABI incompatibility in the pywin32 wheel, which is a critical issue that could lead to runtime failures for the newly added Python 3.13 support.

High
Possible issue
Remove duplicate version entry
Suggestion Impact:The commit removed the duplicate 3.13.3 line, leaving a single mapping for that version.

code diff:

 3.13.3 = https://github.com/Bearsampp/module-python/releases/download/2025.6.6/bearsampp-python-3.13.3-2025.6.6.7z
 3.13.5 = https://github.com/Bearsampp/module-python/releases/download/2025.8.21/bearsampp-python-3.13.5-2025.8.21.7z
-3.13.3 = https://github.com/Bearsampp/module-python/releases/download/2025.6.6/bearsampp-python-3.13.3-2025.6.6.7z

Remove the duplicated 3.13.3 entry to avoid key collisions and parsing
ambiguity. Keep a single, correct mapping per version.

releases.properties [8-10]

 3.13.3 = https://github.com/Bearsampp/module-python/releases/download/2025.6.6/bearsampp-python-3.13.3-2025.6.6.7z
 3.13.5 = https://github.com/Bearsampp/module-python/releases/download/2025.8.21/bearsampp-python-3.13.5-2025.8.21.7z
-3.13.3 = https://github.com/Bearsampp/module-python/releases/download/2025.6.6/bearsampp-python-3.13.3-2025.6.6.7z

[Suggestion processed]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a duplicated key 3.13.3 in the properties file, which is a definite error that should be fixed for correctness and to avoid parsing issues.

Medium
General
Robust local wheel installation

Quote the wheel path and use %~dp0 to resolve the script-relative location to
avoid failures when the working directory differs or paths contain spaces. Also
add --no-index --find-links to ensure local wheel is used if offline.

bin/python3.13.5/wheel/install.bat [4]

-"%WINPYDIR%\Scripts\pip.exe" install pywin32-311-cp313-cp313-win_amd64.whl
+"%WINPYDIR%\Scripts\pip.exe" install --no-index --find-links "%~dp0" "pywin32-311-cp313-cp313-win_amd64.whl"
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that the pip install command is not robust and could fail if the script is run from a different directory; adding --find-links "%~dp0" makes the installation path-independent.

Medium
Validate directory change outcome

Check the cd /D result to fail fast when the work directory is missing;
otherwise subsequent commands may run in an unexpected directory. Exit with a
non-zero code on failure.

bin/python3.13.5/bin/python.bat [4]

-cd/D "%WINPYWORKDIR%"
+cd /D "%WINPYWORKDIR%"
+if errorlevel 1 (
+  echo Failed to change to WINPYWORKDIR: "%WINPYWORKDIR%"
+  exit /b 1
+)
Suggestion importance[1-10]: 6

__

Why: This is a good defensive programming suggestion that adds error handling to the cd command, preventing the script from continuing in an incorrect directory if the change fails.

Low

@jwaisner jwaisner merged commit 4860f35 into main Aug 24, 2025
@jwaisner jwaisner deleted the 3.13.5 branch August 24, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants