Skip to content

Commit

Permalink
switch to using psycopg rather than psycopg2
Browse files Browse the repository at this point in the history
for support for numpy v2.0
  • Loading branch information
bhazelton committed Sep 27, 2024
1 parent 7ba0ec1 commit b842550
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The required dependencies are:
- astropy >= 5.0.4
- cartopy >=0.20
- numpy >= 1.19
- psycopg2 >= 2.9
- psycopg>=3.2.2
- pyuvdata >= 2.2.9
- pyyaml >= 5.1
- redis-py >= 4.3.4 (Note that this is called "redis" on pypi and "redis-py" on conda)
Expand Down
2 changes: 1 addition & 1 deletion ci/min_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- cartopy>=0.20.0
- coverage
- numpy>=1.19.*
- psycopg2>=2.9
- psycopg>=3.2.2
- pytest>=6.2.0
- pytest-cov
- pyuvdata>=2.2.9
Expand Down
2 changes: 1 addition & 1 deletion ci/min_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- pandas==1.4.0
- pip
- psutil==5.9.0
- psycopg2==2.9
- psycopg==3.2.2
- pytest==6.2.0
- pytest-cov
- python-dateutil==2.8.2
Expand Down
2 changes: 1 addition & 1 deletion ci/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- astropy>=5.0.4
- cartopy>=0.20.0
- numpy>=1.19.*
- psycopg2>=2.9
- psycopg>=3.2.2
- pyuvdata>=2.2.9
- pyyaml>=5.1
- redis-py>=4.3.4
Expand Down
2 changes: 1 addition & 1 deletion ci/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- pandas>=1.4.0
- pip
- psutil>=5.9.0
- psycopg2>=2.9
- psycopg>=3.2.2
- pytest>=6.2.0
- pytest-cov
- python-dateutil>=2.8.2
Expand Down
2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- pandas>=1.4.0
- pip
- psutil>=5.9.0
- psycopg2>=2.9
- psycopg>=3.2.2
- pytest>=6.2.0
- pytest-cov
- python-dateutil>=2.8.2
Expand Down
2 changes: 2 additions & 0 deletions hera_mc/mc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class DB(object, metaclass=ABCMeta):
sqlalchemy_base = None

def __init__(self, sqlalchemy_base, db_url): # noqa
if "postgresql" in db_url and "postgresql+psycopg" not in db_url:
db_url = db_url.replace("postgresql", "postgresql+psycopg")
self.sqlalchemy_base = MCDeclarativeBase
self.engine = create_engine(db_url)
self.sessionmaker.configure(bind=self.engine)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"astropy>=5.0.4",
"cartopy>=0.20",
"numpy>=1.19",
"psycopg2>=2.9",
"psycopg>=3.2.2",
"pyuvdata>=2.2.9",
"pyyaml>=5.1",
"redis>=4.3.4", # Note that this gets redis-py, which is named "redis" on pypi
Expand Down

0 comments on commit b842550

Please sign in to comment.