Skip to content

Comments

chore: modernize SDK to Python 3.8+ baseline#421

Open
thomasc-adyen wants to merge 1 commit intomainfrom
feature/modernize-SDK-to-python-38+
Open

chore: modernize SDK to Python 3.8+ baseline#421
thomasc-adyen wants to merge 1 commit intomainfrom
feature/modernize-SDK-to-python-38+

Conversation

@thomasc-adyen
Copy link

This change aligns the library with modern Python standards by dropping support for legacy Python versions (2.7 and 3.6).

Technical Changes:

  • Updated setup.py to set python_requires='>=3.8' and added classifiers up to Python 3.14.
  • Introduced PEP 484 Type Hints in AdyenClient and AdyenResult to improve developer experience and IDE support.
  • Removed legacy future imports and (object) inheritance.
  • Modernized super() calls to use Python 3 syntax.
  • Updated setup.py with install_requires and extras_require for idiomatic dependency management (requests, pycurl).
  • Updated tox.ini and GitHub Actions to test across Python 3.8 through 3.14.

This change aligns the library with modern Python standards by dropping
support for legacy Python versions (2.7 and 3.6).

Technical Changes:
- Updated setup.py to set python_requires='>=3.8' and added classifiers
  up to Python 3.14.
- Introduced PEP 484 Type Hints in AdyenClient and AdyenResult to
  improve developer experience and IDE support.
- Removed legacy __future__ imports and (object) inheritance.
- Modernized super() calls to use Python 3 syntax.
- Updated setup.py with install_requires and extras_require for
  idiomatic dependency management (requests, pycurl).
- Updated tox.ini and GitHub Actions to test across Python 3.8 through 3.14.
@thomasc-adyen thomasc-adyen requested review from a team as code owners February 20, 2026 17:29
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @thomasc-adyen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the Adyen Python SDK by aligning it with current Python standards. It drops support for Python 2.7 and 3.6, establishing Python 3.8 as the new minimum baseline. The changes introduce type hints for improved developer experience, remove outdated language constructs, and update dependency management and testing configurations to reflect the new Python version support.

Highlights

  • Python Version Baseline: The SDK now officially supports Python 3.8 and newer, dropping compatibility with Python 2.7 and 3.6.
  • Type Hinting Introduction: PEP 484 type hints have been added to AdyenClient and AdyenResult classes, improving code clarity and enabling better static analysis.
  • Code Modernization: Legacy __future__ imports and explicit (object) inheritance have been removed, and super() calls updated to modern Python 3 syntax.
  • Dependency Management: setup.py has been updated to use install_requires and extras_require for more idiomatic dependency handling, including requests and pycurl.
  • Testing Environment Update: tox.ini and GitHub Actions configurations have been adjusted to reflect the new Python baseline, testing across Python 3.8 through 3.14.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Adyen/init.py
    • Removed __future__ imports.
  • Adyen/client.py
    • Added from __future__ import annotations for postponed evaluation of type annotations.
    • Imported typing.Any for flexible type hinting.
    • Removed explicit (object) inheritance from AdyenResult and AdyenClient classes.
    • Introduced type hints for AdyenResult's __init__ parameters and details attribute.
    • Added type hints for AdyenClient's __init__ parameters and psp_list attribute.
    • Added return type hint for AdyenResult.__str__.
  • Adyen/exceptions.py
    • Modernized super() call from super(ClassName, self) to super().
  • Adyen/httpclient.py
    • Removed __future__ imports.
    • Removed explicit (object) inheritance from HTTPClient class.
  • Adyen/services/base.py
    • Removed explicit (object) inheritance from AdyenBase class.
    • Modernized super() call from super(ClassName, self) to super().
  • Adyen/util.py
    • Removed __future__ imports.
  • setup.py
    • Updated python_requires to >=3.8.
    • Added install_requires and extras_require for requests, pycurl, and test dependencies.
    • Updated classifiers to list Python versions from 3.8 to 3.14, removing 2.7 and 3.6.
  • tox.ini
    • Updated envlist to test against Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14, removing older versions.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/python-ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

@thomasc-adyen thomasc-adyen self-assigned this Feb 20, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully modernizes the SDK to a Python 3.8+ baseline, aligning the library with current Python standards. Key improvements include the removal of legacy __future__ imports and (object) inheritance, modernization of super() calls, and the introduction of PEP 484 type hints in AdyenClient and AdyenResult. Dependency management in setup.py has been updated with python_requires and extras_require, and tox.ini and classifiers reflect the new supported Python versions (3.8-3.14). These changes enhance code clarity, maintainability, and developer experience.

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.

1 participant