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

[TESTING ONLY] Merged hashtest and version check #1792

Closed
wants to merge 4 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
13 changes: 13 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ jobs:
- name: Run installed unit tests
run: |
bash .github/workflows/install_and_test.sh ${{ matrix.extension }}

install_package_from_commit:
name: Install package from commit hash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: install from pip
run: |
pip install --quiet git+${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git@${GITHUB_SHA}
12 changes: 11 additions & 1 deletion redis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import sys

if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata

from redis.client import Redis, StrictRedis
from redis.cluster import RedisCluster
from redis.connection import (
Expand Down Expand Up @@ -38,7 +45,10 @@ def int_or_str(value):
return value


__version__ = "4.1.0rc2"
try:
__version__ = metadata.version("redis")
except metadata.PackageNotFoundError:
__version__ = "99.99.99"


VERSION = tuple(map(int_or_str, __version__.split(".")))
Expand Down
8 changes: 2 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/usr/bin/env python
from setuptools import find_packages, setup

import redis

setup(
name="redis",
description="Python client for Redis database and key-value store",
long_description=open("README.md").read().strip(),
long_description_content_type="text/markdown",
keywords=["Redis", "key-value store", "database"],
license="MIT",
version=redis.__version__,
version="4.1.0rc2",
packages=find_packages(
include=[
"redis",
Expand All @@ -26,12 +24,10 @@
author="Redis Inc.",
author_email="oss@redis.com",
python_requires=">=3.6",
setup_requires=[
"packaging>=21.3",
],
install_requires=[
"deprecated>=1.2.3",
"packaging>=21.3",
'importlib-metadata >= 1.0; python_version < "3.8"',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down