Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools wheel autopep8
python -m pip install -U build setuptools wheel autopep8
python -m pip install -U -r requirements.txt
- name: Generate Sync Stub Files
run: python make_sync_stubs.py
- name: Build
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
container: aiudirog/aiohappybase-test-env:latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8', '3.9']
python: ['3.9', '3.10', '3.11', '3.12']
client: ['socket', 'http']
fail-fast: false
steps:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
all: doc clean

doc:
python setup.py build_sphinx
sphinx-build doc/ doc/build/html/
@echo
@echo Generated documentation: "file://"$$(readlink -f doc/build/html/index.html)
@echo
Expand All @@ -17,4 +17,4 @@ clean:
find . -name '*.py[co]' -delete

dist: test
python setup.py sdist
python -m build
11 changes: 2 additions & 9 deletions aiohappybase/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@

from .connection import Connection

try:
from asyncio import current_task
except ImportError: # < 3.7
current_task = aio.Task.current_task

try:
from contextlib import asynccontextmanager
except ImportError: # < 3.7
from async_generator import asynccontextmanager
from asyncio import current_task
from contextlib import asynccontextmanager

logger = logging.getLogger(__name__)

Expand Down
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build-system]
requires = ["setuptools", "versioneer"]
build-backend = "setuptools.build_meta"

[project]
name = "aiohappybase"
description = "Asyncio fork of HappyBase"
readme = "README.rst"
license = {text = "MIT"}
authors = [{name = "Roger Aiudi", email = "aiudirog@gmail.com"}]
keywords = ["hbase", "thrift", "async", "asyncio", "happybase"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.9"
dependencies = ["thriftpy2>=0.4.11"]
dynamic = ["version"]

[project.optional-dependencies]
http = ["thriftpy2-httpx-client"]

[project.urls]
Homepage = "https://github.com/python-happybase/aiohappybase"

[tool.setuptools]
py-modules = ["happybase"]
include-package-data = true

[tool.setuptools.packages.find]
exclude = ["tests"]

[tool.pytest.ini_options]
junit_family = "xunit1"

[tool.coverage.run]
source = ["."]
include = ["aiohappybase/*", "tests/*"]
omit = ["aiohappybase/_version.py"]

[tool.coverage.html]
directory = "coverage/"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"pass",
]
include = ["aiohappybase/*", "tests/*"]
omit = ["aiohappybase/_version.py"]
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
thriftpy2>=0.4.11
async_generator; python_version < '3.7'
71 changes: 0 additions & 71 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,79 +1,8 @@
[metadata]
name = aiohappybase
description = Asyncio fork of HappyBase
long_description = file: README.rst
author = Roger Aiudi
author_email = aiudirog@gmail.com
url = https://github.com/python-happybase/aiohappybase
license = MIT
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Database
Topic :: Software Development :: Libraries :: Python Modules
keywords =
hbase
thrift
async
asyncio
happybase

[options]
include_package_data = True
packages = find:
py_modules =
happybase

[options.packages.find]
exclude =
tests

[options.extras_require]
http = thriftpy2-httpx-client

[coverage:run]
source = .
include = aiohappybase/*,tests/*
omit = aiohappybase/_version.py

[coverage:html]
directory = coverage/

[coverage:report]
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
if __name__ == .__main__.:
pass
include = aiohappybase/*,tests/*
omit = aiohappybase/_version.py

[build_sphinx]
source-dir = doc/
build-dir = doc/build/

[flake8]
max-line-length = 80
filename = *happybase*/**.py
exclude = build,dist,venv,.tox,*.egg*,coverage,doc

[tox:tox]
envlist = py36, py37, py38, py39

[testenv]
deps = -rtest-requirements.txt
commands =
python -m pytest
AIOHAPPYBASE_COMPAT=0.90 python -m pytest

[tool:pytest]
junit_family = xunit1

[versioneer]
VCS = git
style = pep440
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
install_requires=[*filter(None, map(str.strip, open('requirements.txt')))],
)