# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
],
# What does your project relate to?
-# Copyright (C) 2020, 2021 The Meme Factory, Inc. http://www.karlpinc.com/
+# Copyright (C) 2020, 2021, 2024 The Meme Factory, Inc.
+# http://www.karlpinc.com/
# This file is part of PGWUI_Bulk_Upload.
#
'The transaction has failed and must roll back before '
'the database can again be queried about relations and '
'their columns',
- f'The error from psycopg2 is: ({exp})')
+ f'The error from psycopg3 is: ({exp})')
class BadMapFileError(SetupError):
-# Copyright (C) 2015, 2018, 2020, 2021 The Meme Factory, Inc.
+# Copyright (C) 2015, 2018, 2020, 2021, 2024 The Meme Factory, Inc.
# http://www.karlpinc.com/
# This file is part of PGWUI_Bulk_Upload.
import os
import os.path
import pathlib
-import psycopg2
+import psycopg
import tempfile
import zipfile
ue UploadEngine instance
uh UploadHandler instance
insert_map Dict mapping file to insert statement used to insert
- into db. (psycopg2 formatted for substituion)
+ into db. (psycopg3 formatted for substituion)
'''
super().__init__(ue, uh)
self.insert_map = insert_map
error.color(map_description(filepath, relation),
filepath, relation)
raise exp
- except psycopg2.DatabaseError as exp:
+ except psycopg.DatabaseError as exp:
relation = data.relation
raise core_ex.DBDataLineError(udl, exp).color(
map_description(filepath, relation),
# new transaction.
try:
self.cur.execute('ROLLBACK;')
- except psycopg2.DatabaseError as exp:
+ except psycopg.DatabaseError as exp:
err = ex.CannotRollbackError(exp).color(
map_description(fileinfo.filepath,
fileinfo.relation),
[tox]
-envlist = py{34,35,36,37}
+envlist = py{36,37,38,39,310,311}
[testenv]
basepython =
- py34: python3.4
- py35: python3.5
py36: python3.6
py37: python3.7
+ py38: python3.8
+ py39: python3.9
+ py310: python3.10
+ py311: python3.11
deps =
check-manifest
cmarkgfm