mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 09:47:30 +03:00 
			
		
		
		
	chore: add support for Python 3.12
This commit is contained in:
		
							parent
							
								
									abf2723c0a
								
							
						
					
					
						commit
						37d1de1c8f
					
				| 
						 | 
				
			
			@ -11,6 +11,8 @@ environment:
 | 
			
		|||
  matrix:
 | 
			
		||||
    # For Python versions available on Appveyor, see
 | 
			
		||||
    # https://www.appveyor.com/docs/windows-images-software/#python
 | 
			
		||||
    - {PY_VER: "312", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
 | 
			
		||||
    - {PY_VER: "312", PY_ARCH: "64", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
 | 
			
		||||
    - {PY_VER: "311", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
 | 
			
		||||
    - {PY_VER: "311", PY_ARCH: "64", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
 | 
			
		||||
    - {PY_VER: "310", PY_ARCH: "32", APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								.github/workflows/packages.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/packages.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -64,7 +64,7 @@ jobs:
 | 
			
		|||
      matrix:
 | 
			
		||||
        platform: [manylinux, musllinux]
 | 
			
		||||
        arch: [x86_64, i686, aarch64, ppc64le]
 | 
			
		||||
        pyver: [cp37, cp38, cp39, cp310, cp311]
 | 
			
		||||
        pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
 | 
			
		||||
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
| 
						 | 
				
			
			@ -136,7 +136,7 @@ jobs:
 | 
			
		|||
      matrix:
 | 
			
		||||
        # These archs require an Apple M1 runner: [arm64, universal2]
 | 
			
		||||
        arch: [x86_64]
 | 
			
		||||
        pyver: [cp37, cp38, cp39, cp310, cp311]
 | 
			
		||||
        pyver: [cp37, cp38, cp39, cp310, cp311, cp312]
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout repos
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -18,13 +18,15 @@ jobs:
 | 
			
		|||
          - {python: "3.9", postgres: "13"}
 | 
			
		||||
          - {python: "3.10", postgres: "14"}
 | 
			
		||||
          - {python: "3.11", postgres: "15"}
 | 
			
		||||
          - {python: "3.12", postgres: "16"}
 | 
			
		||||
 | 
			
		||||
          # Opposite extremes of the supported Py/PG range, other architecture
 | 
			
		||||
          - {python: "3.7", postgres: "15", architecture: "x86"}
 | 
			
		||||
          - {python: "3.8", postgres: "14", architecture: "x86"}
 | 
			
		||||
          - {python: "3.9", postgres: "12", architecture: "x86"}
 | 
			
		||||
          - {python: "3.10", postgres: "11", architecture: "x86"}
 | 
			
		||||
          - {python: "3.11", postgres: "10", architecture: "x86"}
 | 
			
		||||
          - {python: "3.7", postgres: "16", architecture: "x86"}
 | 
			
		||||
          - {python: "3.8", postgres: "15", architecture: "x86"}
 | 
			
		||||
          - {python: "3.9", postgres: "14", architecture: "x86"}
 | 
			
		||||
          - {python: "3.10", postgres: "13", architecture: "x86"}
 | 
			
		||||
          - {python: "3.11", postgres: "11", architecture: "x86"}
 | 
			
		||||
          - {python: "3.12", postgres: "10", architecture: "x86"}
 | 
			
		||||
 | 
			
		||||
    env:
 | 
			
		||||
      PSYCOPG2_TESTDB: postgres
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								NEWS
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								NEWS
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -4,6 +4,7 @@ Current release
 | 
			
		|||
What's new in psycopg 2.9.9
 | 
			
		||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | 
			
		||||
 | 
			
		||||
- Add support for Python 3.12.
 | 
			
		||||
- Drop support for Python 3.6.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -131,8 +131,8 @@ The current `!psycopg2` implementation supports:
 | 
			
		|||
..
 | 
			
		||||
    NOTE: keep consistent with setup.py and the /features/ page.
 | 
			
		||||
 | 
			
		||||
- Python versions from 3.7 to 3.11
 | 
			
		||||
- PostgreSQL server versions from 7.4 to 15
 | 
			
		||||
- Python versions from 3.7 to 3.12
 | 
			
		||||
- PostgreSQL server versions from 7.4 to 16
 | 
			
		||||
- PostgreSQL client library version from 9.1
 | 
			
		||||
 | 
			
		||||
.. note::
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -660,7 +660,7 @@ class Options:
 | 
			
		|||
        For large values of 2, occasionally.
 | 
			
		||||
        """
 | 
			
		||||
        rv = os.environ['PY_VER']
 | 
			
		||||
        assert rv in ('37', '38', '39', '310', '311'), rv
 | 
			
		||||
        assert rv in ('37', '38', '39', '310', '311', "312"), rv
 | 
			
		||||
        return rv
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
| 
						 | 
				
			
			@ -747,6 +747,7 @@ class Options:
 | 
			
		|||
            '39': '16.0',
 | 
			
		||||
            '310': '16.0',
 | 
			
		||||
            '311': '16.0',
 | 
			
		||||
            '312': '16.0',
 | 
			
		||||
        }
 | 
			
		||||
        return vsvers[self.py_ver]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
set -euo pipefail
 | 
			
		||||
# set -x
 | 
			
		||||
 | 
			
		||||
python_versions="3.8.10 3.9.13 3.10.5 3.11.0"
 | 
			
		||||
python_versions="3.8.10 3.9.13 3.10.5 3.11.0 3.12.0"
 | 
			
		||||
pg_version=16
 | 
			
		||||
 | 
			
		||||
function log {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -57,6 +57,7 @@ Programming Language :: Python :: 3.8
 | 
			
		|||
Programming Language :: Python :: 3.9
 | 
			
		||||
Programming Language :: Python :: 3.10
 | 
			
		||||
Programming Language :: Python :: 3.11
 | 
			
		||||
Programming Language :: Python :: 3.12
 | 
			
		||||
Programming Language :: Python :: 3 :: Only
 | 
			
		||||
Programming Language :: Python :: Implementation :: CPython
 | 
			
		||||
Programming Language :: C
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user