Skip to content

modernize codebase - #38

Merged
amol- merged 5 commits into
masterfrom
update-codebase
Apr 21, 2026
Merged

modernize codebase#38
amol- merged 5 commits into
masterfrom
update-codebase

Conversation

@amol-

@amol- amol- commented Mar 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@amol-
amol- marked this pull request as ready for review April 20, 2026 22:41
@amol-
amol- requested a review from Copilot April 21, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Gearbox codebase for Python 3.10+, removing legacy Python 2-era compatibility code, updating packaging scaffolding to pyproject.toml, and improving setup-app discovery via distribution file metadata.

Changes:

  • Drop Python 2/legacy compatibility patterns (e.g., __future__ imports, old super(...), old import fallbacks), and refactor some loops/context managers.
  • Update makepackage scaffolding to generate pyproject.toml instead of setup.py, with corresponding test updates.
  • Update setup-app to locate websetup modules via distribution files, with new tests for this behavior.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_commands.py Extends tests for makepackage output and setup-app websetup discovery via dist files.
gearbox/utils/log.py Removes legacy configparser import fallback and simplifies setup_logging signature.
gearbox/utils/copydir.py Replaces manual file open/close with context managers; adjusts interactive overwrite diff inputs.
gearbox/template.py Modernizes class definition (class X:).
gearbox/main.py Removes Python 2 print_function import; modernizes inspect usage and warning capture.
gearbox/commands/setup_app.py Switches module discovery to dist files; uses importlib.import_module.
gearbox/commands/serve.py Removes legacy Windows/old-library fallbacks; modernizes loops and imports.
gearbox/commands/scaffold.py Reorders helper method placement; modernizes super().
gearbox/commands/patch.py Reorders helper method placement; modernizes super().
gearbox/commands/help.py Modernizes super().
gearbox/commands/basic_package/template/setup.py_tmpl Removes legacy setup.py template from scaffolding.
gearbox/commands/basic_package/template/pyproject.toml_tmpl Adds PEP 517/621-style packaging template for new projects.
gearbox/commands/basic_package/template/README.rst_tmpl Updates install instructions (pip, editable installs).
gearbox/commands/basic_package/command.py Modernizes super() usage.
gearbox/commandmanager.py Simplifies entry-point loading using importlib.metadata.entry_points().select.
gearbox/command.py Modernizes base Command class definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gearbox/commands/setup_app.py
Comment thread gearbox/utils/copydir.py
Comment thread gearbox/commands/basic_package/template/pyproject.toml_tmpl Outdated
Comment thread gearbox/commands/setup_app.py
amol- and others added 3 commits April 21, 2026 20:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@amol-
amol- merged commit 7abb860 into master Apr 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants