Skip to content

Freeze Python 2.7 and modernize codebase #945

@mkleehammer

Description

@mkleehammer

I'd like to look into splitting the codebase into Python 2 and Python 3 and modernizing the 3 version. There used to be a huge number of Python 2 downloads every day, but Python 3 is now ~95% of the pypi download traffic.

https://pypistats.org/packages/pyodbc

Does anyone know the best way to do this? My first inclination is to make a new v5 that is only the modern version and maintain the 4.x branch for security fixes. Any other suggestions?

Some things I'm thinking about for a v5:

  • Update C API and consider using the stable ABI. If I understand correctly, it would allow new versions of Python to use the same binaries.
  • Would it be helpful to have a Python layer that loads the C implementation as _pyodbc? Does this give the project more flexibility to introduce items in whichever layer is easiest?
  • More thoroghly integrate the parameter binding of per-value and fast_executemany so there is only 1 function for encoding each.
  • Provide a connection factory to replace the hidden CnxnInfo. It would be eaiser to configure pre-connect items on the factory and then ask for the connect. (We might need an optional password on the connect for those that don't want it stored globally.)
  • Switch to pytest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions