Repository navigation
Drop Python 3.11 support - #333
Merged
Merged
Conversation
ruff check --select=F401 --fix
ruff check --select=UP,F401 --fix
auscompgeek
force-pushed
the
upgrade-py312
branch
from
September 27, 2026 07:18
ef79bb6 to
07b3184
Compare
virtuald
approved these changes
Sep 30, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The cscore package metadata still permits Python 3.11 and older despite the repository-wide support change.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Raises the repository baseline to Python 3.12, modernizes typing syntax, and adds override annotations that expose incorrect example overrides.
Changes:
- Updates package metadata and CI to require Python 3.12+.
- Replaces legacy typing constructs and removes obsolete compatibility dependencies.
- Adds
@overrideto examples and cleans unused imports.
| File | Description |
|---|---|
subprojects/robotpy-xrp/xrp/cli.py |
Modernizes metadata and typing APIs. |
subprojects/robotpy-xrp/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpiutil/wpiutil/wpistruct/desc.py |
Uses Python 3.12 typing APIs. |
subprojects/robotpy-wpiutil/wpiutil/wpistruct/dataclass.py |
Modernizes type annotations. |
subprojects/robotpy-wpiutil/wpiutil/__init__.py |
Uses the type-alias statement. |
subprojects/robotpy-wpiutil/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpinet/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpimath/tests/test_system.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_swerve_module_position.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_swerve_module_acceleration.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_swerve_drive_odometry3d.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/kinematics/test_swerve_drive_odometry.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/kinematics/test_mecanum_drive_wheel_velocities.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_mecanum_drive_odometry3d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_mecanum_drive_odometry.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_mecanum_drive_kinematics.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_differential_drive_wheel_velocities.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_differential_drive_odometry3d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/kinematics/test_differential_drive_kinematics.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/kinematics/test_chassis_velocities.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_twist2d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_transform3d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_transform2d.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/geometry/test_rectangle2d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_quaternion.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_pose3d.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/geometry/test_pose2d.py |
Removes redundant parentheses. |
subprojects/robotpy-wpimath/tests/geometry/test_ellipse2d.py |
Removes an unused import. |
subprojects/robotpy-wpimath/tests/geometry/test_coordinate_system.py |
Removes unused imports. |
subprojects/robotpy-wpimath/tests/cpp/pyproject.toml |
Requires Python 3.12. |
subprojects/robotpy-wpimath/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpilog/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpilib/wpilib/testing/pytest_plugin.py |
Modernizes type annotations. |
subprojects/robotpy-wpilib/wpilib/testing/pytest_isolated_tests_plugin.py |
Modernizes typing and exception alias. |
subprojects/robotpy-wpilib/wpilib/testing/controller.py |
Modernizes optional typing. |
subprojects/robotpy-wpilib/wpilib/opmodes.py |
Modernizes optional annotations. |
subprojects/robotpy-wpilib/wpilib/deployinfo.py |
Modernizes return typing. |
subprojects/robotpy-wpilib/wpilib/cameraserver.py |
Modernizes optional typing. |
subprojects/robotpy-wpilib/wpilib/_impl/start.py |
Removes legacy compatibility code. |
subprojects/robotpy-wpilib/wpilib/_impl/opmode.py |
Removes an unused import. |
subprojects/robotpy-wpilib/wpilib/_impl/cli_test.py |
Modernizes type annotations. |
subprojects/robotpy-wpilib/wpilib/_impl/cli_sim.py |
Modernizes class typing. |
subprojects/robotpy-wpilib/tests/smartdashboard/test_mechanism2d.py |
Removes unused imports. |
subprojects/robotpy-wpilib/tests/simulation/test_alert_sim.py |
Modernizes list annotations. |
subprojects/robotpy-wpilib/tests/pytest_plugin_test_helpers.py |
Removes an unused import. |
subprojects/robotpy-wpilib/tests/hardware/led/test_led_pattern.py |
Removes an unused import. |
subprojects/robotpy-wpilib/tests/drive/test_mecanum_drive.py |
Removes an unused import. |
subprojects/robotpy-wpilib/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-wpilib-drivers/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-tunables/tunables/__init__.py |
Uses PEP 695 generics. |
subprojects/robotpy-tunables/tests/test_tunable.py |
Removes an unused import. |
subprojects/robotpy-tunables/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-telemetry/telemetry/mock_backend.py |
Uses the type-alias statement. |
subprojects/robotpy-telemetry/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-romi/romi/cli.py |
Removes legacy compatibility code. |
subprojects/robotpy-romi/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-xrp/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpiutil/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpinet/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpimath/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpilib/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpilib-drivers/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-wpihal/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-romi/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-ntcore/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-halsim-gui/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-fields/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-datalog/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-native-apriltag/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-halsim-ws/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-halsim-gui/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-halsim-ds-socket/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-hal/tests/test_hal_simulation.py |
Modernizes tuple typing. |
subprojects/robotpy-hal/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-hal/hal/simulation/mockhooks.py |
Modernizes optional typing. |
subprojects/robotpy-fields/pyproject.in.toml |
Requires Python 3.12. |
subprojects/robotpy-cscore/pyproject.in.toml |
Adjusts native wpinet dependencies. |
subprojects/robotpy-cscore/cscore/imagewriter.py |
Adds a trailing comma. |
subprojects/robotpy-cscore/cscore/_logging.py |
Modernizes optional typing. |
subprojects/robotpy-commands-v2/tools/hids/templates/main/python/first_ds_commandhid.py.jinja |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/tests/util.py |
Modernizes typing and imports. |
subprojects/robotpy-commands-v2/tests/test_waituntilcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_waitcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_startendcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_sequentialcommandgroup.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_selectcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_scheduler.py |
Removes unused imports. |
subprojects/robotpy-commands-v2/tests/test_schedulecommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_runcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_robotdisabledcommand.py |
Imports simulation dependency directly. |
subprojects/robotpy-commands-v2/tests/test_repeatcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_proxycommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_printcommand.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_notifier_command.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_instant_command.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_functional_command.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_default_command.py |
Imports simulation dependency directly. |
subprojects/robotpy-commands-v2/tests/test_conditional_command.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_command_schedule.py |
Removes an unused import. |
subprojects/robotpy-commands-v2/tests/test_command_decorators.py |
Imports simulation dependency directly. |
subprojects/robotpy-commands-v2/tests/compositiontestbase.py |
Removes unused typing imports. |
subprojects/robotpy-commands-v2/pyproject.in.toml |
Requires 3.12 and drops typing_extensions. |
subprojects/robotpy-commands-v2/commands2/wrappercommand.py |
Modernizes set typing. |
subprojects/robotpy-commands-v2/commands2/waituntilcommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/util.py |
Modernizes collection annotations. |
subprojects/robotpy-commands-v2/commands2/typing.py |
Uses type-alias statements. |
subprojects/robotpy-commands-v2/commands2/sysid/sysidroutine.py |
Modernizes callable typing. |
subprojects/robotpy-commands-v2/commands2/subsystem.py |
Modernizes Self and optional typing. |
subprojects/robotpy-commands-v2/commands2/startendcommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/sequentialcommandgroup.py |
Modernizes list typing. |
subprojects/robotpy-commands-v2/commands2/selectcommand.py |
Modernizes mapping typing. |
subprojects/robotpy-commands-v2/commands2/runcommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/parallelracegroup.py |
Modernizes set typing. |
subprojects/robotpy-commands-v2/commands2/paralleldeadlinegroup.py |
Modernizes mapping typing. |
subprojects/robotpy-commands-v2/commands2/parallelcommandgroup.py |
Modernizes mapping typing. |
subprojects/robotpy-commands-v2/commands2/notifiercommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/instantcommand.py |
Modernizes callable typing. |
subprojects/robotpy-commands-v2/commands2/functionalcommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/deferredcommand.py |
Uses collections.abc Callable. |
subprojects/robotpy-commands-v2/commands2/conditionalcommand.py |
Modernizes optional typing. |
subprojects/robotpy-commands-v2/commands2/commandscheduler.py |
Modernizes scheduler annotations. |
subprojects/robotpy-commands-v2/commands2/command.py |
Modernizes command annotations. |
subprojects/robotpy-commands-v2/commands2/cmd.py |
Modernizes callable and mapping typing. |
subprojects/robotpy-commands-v2/commands2/button/trigger.py |
Uses standard-library Self. |
subprojects/robotpy-commands-v2/commands2/button/commandxboxcontroller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandswitchprocontroller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandswitchn64controller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandswitch2gccontroller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandlogitechf310controller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandjoystick.py |
Modernizes optional typing. |
subprojects/robotpy-commands-v2/commands2/button/commandgenerichid.py |
Modernizes HID annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandgamepad.py |
Modernizes gamepad annotations. |
subprojects/robotpy-commands-v2/commands2/button/commandgamecubecontroller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commanddualshock4controller.py |
Modernizes generated annotations. |
subprojects/robotpy-commands-v2/commands2/button/commanddualsensecontroller.py |
Modernizes generated annotations. |
subprojects/robotpy-apriltag/pyproject.in.toml |
Requires Python 3.12. |
subprojects/pyntcore/pyproject.in.toml |
Requires 3.12 and adjusts dependencies. |
subprojects/pyntcore/ntcore/util.py |
Modernizes utility annotations. |
subprojects/pyntcore/ntcore/types.py |
Modernizes union typing. |
subprojects/pyntcore/devtools/gen-pubsub.py |
Removes an unused import. |
snippets/robot/Solenoid/robot.py |
Marks an override. |
snippets/robot/SelectCommand/robot.py |
Modernizes typing and marks overrides. |
snippets/robot/MotorControl/robot.py |
Marks robot-method overrides. |
snippets/robot/I2CCommunication/robot.py |
Marks an override. |
snippets/robot/GameData2026/robot.py |
Marks an override. |
snippets/robot/FlywheelBangBangController/robot.py |
Marks overrides and organizes imports. |
snippets/robot/EventLoop/robot.py |
Marks an override. |
snippets/robot/DutyCycleInput/robot.py |
Marks an override. |
snippets/robot/DigitalCommunication/robot.py |
Marks an override. |
snippets/robot/CANPDP/robot.py |
Marks an override. |
snippets/robot/AddressableLED/robot.py |
Marks an override. |
examples/robot/XrpReference/subsystems/drivetrain.py |
Marks the periodic override. |
examples/robot/XrpReference/subsystems/arm.py |
Marks the periodic override. |
examples/robot/XrpReference/robotcontainer.py |
Modernizes optional typing. |
examples/robot/XrpReference/robot.py |
Modernizes typing and marks overrides. |
examples/robot/XrpReference/commands/turntime.py |
Marks command overrides. |
examples/robot/XrpReference/commands/turndegrees.py |
Marks command overrides. |
examples/robot/XrpReference/commands/drivetime.py |
Marks command overrides. |
examples/robot/XrpReference/commands/drivedistance.py |
Marks command overrides. |
examples/robot/XrpReference/commands/arcadedrive.py |
Marks an override. |
examples/robot/UnitTest/robot.py |
Marks an override. |
examples/robot/TankDriveXboxController/robot.py |
Marks an override. |
examples/robot/TankDrive/robot.py |
Marks an override. |
examples/robot/SysId/subsystems/shooter.py |
Uses collections.abc Callable. |
examples/robot/SysId/subsystems/drive.py |
Uses collections.abc Callable. |
examples/robot/SysId/robot.py |
Marks robot-method overrides. |
examples/robot/SwerveDrivePoseEstimator/robot.py |
Marks periodic overrides. |
examples/robot/SwerveBot/robot.py |
Marks periodic overrides. |
examples/robot/StateSpaceFlywheelSysId/robot.py |
Marks teleop overrides. |
examples/robot/StateSpaceFlywheel/robot.py |
Marks teleop overrides. |
examples/robot/StateSpaceElevator/robot.py |
Marks teleop overrides. |
examples/robot/StateSpaceArm/robot.py |
Marks teleop overrides. |
examples/robot/SimpleDifferentialDriveSimulation/robot.py |
Marks lifecycle overrides. |
examples/robot/RomiReference/subsystems/drivetrain.py |
Marks telemetry override. |
examples/robot/RomiReference/robotcontainer.py |
Modernizes optional typing. |
examples/robot/RomiReference/robot.py |
Modernizes typing and marks overrides. |
examples/robot/RomiReference/commands/turntime.py |
Marks command overrides. |
examples/robot/RomiReference/commands/turndegrees.py |
Marks command overrides. |
examples/robot/RomiReference/commands/drivetime.py |
Marks command overrides. |
examples/robot/RomiReference/commands/drivedistance.py |
Marks command overrides. |
examples/robot/RomiReference/commands/arcadedrive.py |
Marks an override. |
examples/robot/RapidReactCommandBot/subsystems/drive.py |
Uses collections.abc Callable. |
examples/robot/RapidReactCommandBot/robot.py |
Marks robot-method overrides. |
examples/robot/RapidReactCommandBot/rapidreactcommandbot.py |
Removes an unused import. |
examples/robot/Mechanism2d/robot.py |
Marks lifecycle overrides. |
examples/robot/MecanumDrivePoseEstimator/robot.py |
Marks periodic overrides. |
examples/robot/MecanumDrive/robot.py |
Marks an override. |
examples/robot/MecanumBot/robot.py |
Marks periodic overrides. |
examples/robot/HatchbotTraditional/subsystems/hatchsubsystem.py |
Marks telemetry override. |
examples/robot/HatchbotTraditional/subsystems/drivesubsystem.py |
Marks telemetry override. |
examples/robot/HatchbotTraditional/robot.py |
Modernizes typing and marks overrides. |
examples/robot/HatchbotTraditional/commands/halvedrivevelocity.py |
Marks command overrides. |
examples/robot/HatchbotTraditional/commands/grabhatch.py |
Marks command overrides. |
examples/robot/HatchbotTraditional/commands/drivedistance.py |
Marks command overrides. |
examples/robot/HatchbotTraditional/commands/defaultdrive.py |
Marks an override. |
examples/robot/HatchbotInlined/subsystems/hatchsubsystem.py |
Marks telemetry override. |
examples/robot/HatchbotInlined/subsystems/drivesubsystem.py |
Marks telemetry override. |
examples/robot/HatchbotInlined/robotcontainer.py |
Removes an unused import. |
examples/robot/HatchbotInlined/robot.py |
Modernizes typing and marks overrides. |
examples/robot/Gyro/robot.py |
Marks an override. |
examples/robot/GettingStarted/robot.py |
Marks lifecycle overrides. |
examples/robot/ExpansionHubSample/opmodes/default_tele_mode.py |
Marks the periodic override. |
examples/robot/ExpansionHubSample/opmodes/default_auto_mode.py |
Marks opmode overrides. |
examples/robot/Encoder/robot.py |
Marks an override. |
examples/robot/ElevatorTrapezoidProfile/robot.py |
Marks an override. |
examples/robot/ElevatorTrapezoidProfile/examplesmartmotorcontroller.py |
Corrects and marks interface overrides. |
examples/robot/ElevatorSimulation/robot.py |
Marks lifecycle overrides. |
examples/robot/ElevatorProfiledPID/robot.py |
Marks an override. |
examples/robot/ElevatorExponentialSimulation/robot.py |
Marks lifecycle overrides. |
examples/robot/ElevatorExponentialProfile/robot.py |
Marks an override. |
examples/robot/DutyCycleEncoder/robot.py |
Marks an override. |
examples/robot/DSGamepadChooser/robot.py |
Corrects and marks opmode overrides. |
examples/robot/DriveDistanceOffboard/robot.py |
Modernizes typing and marks overrides. |
examples/robot/DriveDistanceOffboard/examplesmartmotorcontroller.py |
Removes an unused import. |
examples/robot/DriveDistanceOffboard/constants.py |
Removes an unused import. |
examples/robot/DifferentialDrivePoseEstimator/robot.py |
Marks lifecycle overrides. |
examples/robot/DifferentialDriveBot/robot.py |
Marks periodic overrides. |
examples/robot/ArmSimulation/robot.py |
Marks lifecycle overrides. |
examples/robot/ArcadeDriveXboxController/robot.py |
Marks an override. |
examples/robot/ArcadeDrive/robot.py |
Marks an override. |
examples/check_header.py |
Simplifies file opening. |
devtools/util.py |
Modernizes class typing. |
devtools/subproject.py |
Modernizes collection annotations. |
devtools/pyproject.py |
Modernizes collection annotations. |
devtools/examples.py |
Modernizes list annotations. |
devtools/ctx.py |
Modernizes list annotations. |
devtools/config.py |
Modernizes configuration annotations. |
devtools/ci.py |
Modernizes optional annotations. |
devtools/ci_check_wpistructs.py |
Modernizes collection annotations. |
.github/workflows/dist.yml |
Removes Python 3.11 builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ] | ||
| license = "BSD-3-Clause" | ||
| dependencies = [ | ||
| "robotpy-native-wpinet==0.0.0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This also adds
@typing.overrideto methods in the examples, which has caught a bug in the DSGamepadChooser example.