Skip to content

Deprecation of distutils - slated for Python 3.12 #127

@Athanasius

Description

@Athanasius

I've been noticing this... probably since I first started using Python 3.10:

0$ python setup.py py2exe
C:\Users\Athan\Documents\Devel\infi-systray_py2exe\setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup
running py2exe

Do you have any plans for migrating py2exe itself away from using distutils ?

I have a vague memory of you deprecating use of build_exe.exe, but even if that's correct then it's still installed along with py2exe and will output a setup.py that uses distutils:

Athan@emilia MINGW64 ~/Documents/Devel/infi-systray_py2exe (main)
0$ build_exe.exe -W setup-build_exe.py sample_systray.py
Created setup-build_exe.py.
Athan@emilia MINGW64 ~/Documents/Devel/infi-systray_py2exe (main)
0$ head setup-build_exe.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Created by: python.exe -m py2exe -W setup-build_exe.py sample_systray.py

from distutils.core import setup
...

Obivously there's currently plenty of time. Python 3.12 will likely be available around October 2023, so still 19 months to go yet. But it would still be better to address this sooner rather than later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions