You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2024/02/26 14:54:15 UTC
(phoenix-queryserver) branch master updated: PHOENIX-7222 Fix tox tests and add Python 3.12 to supported versions and the test matrix
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-queryserver.git
The following commit(s) were added to refs/heads/master by this push:
new e0fd69e PHOENIX-7222 Fix tox tests and add Python 3.12 to supported versions and the test matrix
e0fd69e is described below
commit e0fd69e85e80ec2c5a01fc56e943abc94868ffe0
Author: Istvan Toth <st...@apache.org>
AuthorDate: Wed Feb 21 08:14:48 2024 +0100
PHOENIX-7222 Fix tox tests and add Python 3.12 to supported versions and the test matrix
---
python-phoenixdb/.gitignore | 1 +
python-phoenixdb/Dockerfile | 4 ++--
python-phoenixdb/README.rst | 11 +++++++----
python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py | 2 +-
python-phoenixdb/setup.py | 3 ++-
python-phoenixdb/tox.ini | 5 ++++-
6 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/python-phoenixdb/.gitignore b/python-phoenixdb/.gitignore
index d7a54af..369f6a2 100644
--- a/python-phoenixdb/.gitignore
+++ b/python-phoenixdb/.gitignore
@@ -11,3 +11,4 @@ dev-support/work
phoenixdb/.eggs
phoenixdb/build
phoenixdb/e
+phoenixdb/.python-version
diff --git a/python-phoenixdb/Dockerfile b/python-phoenixdb/Dockerfile
index 95f6b2d..daf8a4e 100644
--- a/python-phoenixdb/Dockerfile
+++ b/python-phoenixdb/Dockerfile
@@ -13,13 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from advian/tox-base:ubuntu as tox
+from advian/tox-base:ubuntu-jammy-2024-02-07 as tox
###########################
# Prebuild given versions #
###########################
ARG BUILD_PYTHON_VERSIONS="3.11 3.10 3.9 3.8" #Can we take this from the parent image ?
-ARG EXTRA_PYTHON_VERSIONS="3.5 3.6 3.7 2.7"
+ARG EXTRA_PYTHON_VERSIONS="3.12 3.5 3.6 3.7 2.7"
RUN export RESOLVED_VERSIONS=`pyenv_resolve $BUILD_PYTHON_VERSIONS` \
&& export EXTRA_RESOLVED_VERSIONS=`pyenv_resolve $EXTRA_PYTHON_VERSIONS` \
&& for pyver in $EXTRA_RESOLVED_VERSIONS; do pyenv install $pyver; done \
diff --git a/python-phoenixdb/README.rst b/python-phoenixdb/README.rst
index 3858ea0..0c609a8 100644
--- a/python-phoenixdb/README.rst
+++ b/python-phoenixdb/README.rst
@@ -68,19 +68,22 @@ necessary requirements::
You can start a Phoenix QueryServer instance on http://localhost:8765 for testing by running
the following command in the pohoenix-queryserver-parent directory::
- mvn clean verify -am -pl phoenix-queryserver-it -Dtest=foo \
+ mvn clean verify -Pshade-javax-servlet -am -pl phoenix-queryserver-it -Dtest=foo \
-Dit.test=QueryServerBasicsIT#startLocalPQS \
-Ddo.not.randomize.pqs.port=true -Dstart.unsecure.pqs=true
You can start a secure (https+kerberos) Phoenix QueryServer instance on https://localhost:8765
for testing by running the following command in the phoenix-queryserver-parent directory::
- mvn clean verify -am -pl phoenix-queryserver-it -Dtest=foo \
+ mvn clean verify -Pshade-javax-servlet -am -pl phoenix-queryserver-it -Dtest=foo \
-Dit.test=SecureQueryServerPhoenixDBIT#startLocalPQS \
-Ddo.not.randomize.pqs.port=true -Dstart.secure.pqs=true
-this will also create a shell script in phoenix-queryserver-it/target/krb_setup.sh, that you can use to set
-up the environment for the tests.
+this will also create a shell script in phoenix-queryserver-it/target/krb_setup.sh, that you can
+use to set up the environment for the tests.
+
+Note: Depending on the Phoenix version used for building, you may or may not need the
+`-Pshade-javax-servlet` option. Check BUILDING.md in the repository root.
If you want to use the library without installing the phoenixdb library, you can use
the `PYTHONPATH` environment variable to point to the library directly::
diff --git a/python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py b/python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py
index d21b827..3df83ef 100644
--- a/python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py
+++ b/python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py
@@ -22,7 +22,7 @@ from sqlalchemy import types
from sqlalchemy.engine.default import DefaultDialect, DefaultExecutionContext
from sqlalchemy.exc import CompileError
from sqlalchemy.sql.compiler import DDLCompiler
-from sqlalchemy.types import BIGINT, BOOLEAN, CHAR, DATE, DECIMAL, FLOAT, INTEGER, NUMERIC,\
+from sqlalchemy.types import BIGINT, BOOLEAN, CHAR, DATE, DECIMAL, FLOAT, INTEGER, NUMERIC, \
SMALLINT, TIME, TIMESTAMP, VARBINARY, VARCHAR
if sys.version_info.major == 3:
diff --git a/python-phoenixdb/setup.py b/python-phoenixdb/setup.py
index 3245433..c3acca5 100644
--- a/python-phoenixdb/setup.py
+++ b/python-phoenixdb/setup.py
@@ -88,7 +88,8 @@ setup(
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
- 'Programming Language :: Python :: 3.11'
+ 'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12'
],
install_requires=install_requires,
tests_require=[
diff --git a/python-phoenixdb/tox.ini b/python-phoenixdb/tox.ini
index 5739ed7..8b41293 100644
--- a/python-phoenixdb/tox.ini
+++ b/python-phoenixdb/tox.ini
@@ -14,6 +14,8 @@
# limitations under the License.
[tox]
+# See https://tox.wiki/en/latest/faq.html#testing-end-of-life-python-versions
+requires = virtualenv<20.22.0
envlist = py27-SQLAlchemy{13,14},
py35-SQLAlchemy{13},
py36-SQLAlchemy{13,14},
@@ -21,7 +23,8 @@ envlist = py27-SQLAlchemy{13,14},
py38-SQLAlchemy{13,14,20},
py39-SQLAlchemy{13,14,20},
py310-SQLAlchemy{13,14,20},
- py311-SQLAlchemy{13,14,20}
+ py311-SQLAlchemy{13,14,20},
+ py312-SQLAlchemy{13,14,20}
[testenv]
passenv = PHOENIXDB_TEST_DB_URL
commands =