Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHOENIX-7222 Fix tox tests and add Python 3.12 to supported versions … #146

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python-phoenixdb/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dev-support/work
phoenixdb/.eggs
phoenixdb/build
phoenixdb/e
phoenixdb/.python-version
4 changes: 2 additions & 2 deletions python-phoenixdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 7 additions & 4 deletions python-phoenixdb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
2 changes: 1 addition & 1 deletion python-phoenixdb/phoenixdb/sqlalchemy_phoenix.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
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, \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is flagged as an error by newer pylint versions,

SMALLINT, TIME, TIMESTAMP, VARBINARY, VARCHAR

if sys.version_info.major == 3:
Expand Down
3 changes: 2 additions & 1 deletion python-phoenixdb/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def readme():
'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=[
Expand Down
5 changes: 4 additions & 1 deletion python-phoenixdb/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
# 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},
py37-SQLAlchemy{13,14,20},
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 =
Expand Down
Loading