Skip to content

Add Python 3.12.8.0-b2 with configuration and wheel download links #19

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

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Feb 13, 2025

PR Type

Enhancement, Configuration changes


Description

  • Added Python 3.12.8.0-b2 configuration and scripts.

  • Included wheel download link for pywin32.

  • Updated build and release properties for new version.

  • Added backward compatibility for Python command-line users.


Changes walkthrough 📝

Relevant files
Enhancement
python.bat
Added Python batch script for compatibility                           

bin/python3.12.8.0-b2/bin/python.bat

  • Added script for setting environment variables.
  • Ensured backward compatibility for Python command-line users.
  • Redirected to Python executable with arguments.
  • +6/-0     
    install.bat
    Added install script for `pywin32` wheel                                 

    bin/python3.12.8.0-b2/wheel/install.bat

  • Added script to install pywin32 wheel.
  • Configured environment variables for installation.
  • +4/-0     
    Configuration changes
    bearsampp.conf
    Added configuration for Python 3.12.8.0-b2                             

    bin/python3.12.8.0-b2/bearsampp.conf

  • Added configuration for Python version and executables.
  • Included placeholder for release version.
  • +6/-0     
    wheel.properties
    Added wheel download link for `pywin32`                                   

    bin/python3.12.8.0-b2/wheel/wheel.properties

    • Added download link for pywin32 wheel.
    +1/-0     
    build.properties
    Updated build properties for new release                                 

    build.properties

    • Updated bundle.release to 2025.2.13.
    +1/-1     
    releases.properties
    Added release entry for Python 3.12.8.0-b2                             

    releases.properties

    • Added release entry for Python 3.12.8.0-b2.
    +1/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Command Injection:
    The python.bat script passes command line arguments (%*) directly to python.exe without sanitization. While this is common practice for wrapper scripts, it could potentially be used to inject malicious commands if the script is called with untrusted input.

    ⚡ Recommended focus areas for review

    Path Validation

    The script uses user-provided arguments (%*) directly without validation, which could allow execution of arbitrary commands if malicious arguments are provided

    "%WINPYDIR%\python.exe" %*
    Version Lock

    The pywin32 wheel version is hardcoded to 308 which may need to be updated when newer versions become available

    wheel = https://github.com/Bearsampp/modules-untouched/releases/download/Python-2025.2.13/pywin32-308-cp312-cp312-win_amd64.whl

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Add environment validation checks

    Add error handling to verify that WINPYDIR exists before executing python.exe to
    prevent silent failures

    bin/python3.12.8.0-b2/bin/python.bat [1-6]

     @echo off
     set WINPYSCRIPTSDIR=%~dp0..\scripts
     call "%WINPYSCRIPTSDIR%\env_for_icons.bat"
     cd/D "%WINPYWORKDIR%"
     rem backward compatibility for python command-line users
    +if not exist "%WINPYDIR%\python.exe" (
    +    echo Error: Python executable not found in %WINPYDIR%
    +    exit /b 1
    +)
     "%WINPYDIR%\python.exe" %*
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    __

    Why: Adding validation for the Python executable path is important for preventing silent failures and providing clear error messages to users when the environment is not properly configured.

    Medium
    Validate wheel file before installation

    Add error handling to verify wheel file exists before attempting installation

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

     @echo off
     set WINPYSCRIPTSDIR=%~dp0..\scripts
     call "%WINPYSCRIPTSDIR%\env.bat"
    +if not exist "pywin32-308-cp312-cp312-win_amd64.whl" (
    +    echo Error: Wheel file not found
    +    exit /b 1
    +)
     "%WINPYDIR%\Scripts\pip.exe" install pywin32-308-cp312-cp312-win_amd64.whl
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    __

    Why: Checking for the wheel file's existence before attempting installation is crucial to prevent pip installation failures and provide clear error messages, improving the robustness of the installation process.

    Medium

    @jwaisner jwaisner merged commit 84725c7 into main Feb 14, 2025
    @jwaisner jwaisner deleted the 3.12.8.0-b2 branch February 14, 2025 04:19
    @N6REJ N6REJ restored the 3.12.8.0-b2 branch February 15, 2025 22:00
    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.

    2 participants