Skip to content

Moving from Python 2 to Python 3 and bump to v2.5 #277

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4154f76
refactor!: port the driver to Python 3
gabor-boros Jun 21, 2022
54b6ad5
feat: reql command format
gabor-boros Jun 21, 2022
099fa8c
Add flake8 config (#278)
Inveracity Jun 22, 2022
2c5951a
feat: add command base (#279)
gabor-boros Jun 27, 2022
abbefd7
fix: parse binary response
gabor-boros Jul 4, 2022
ab7c4db
build: fix protofile download
gabor-boros Jun 29, 2025
8971050
chore: bump python versions
gabor-boros Jun 29, 2025
9e82497
style: format code using latest formatter
gabor-boros Jun 29, 2025
2ab3d97
chore: update copyright notice
gabor-boros Jun 29, 2025
8fe2ed4
test: fix failing precision tests
gabor-boros Jun 29, 2025
db5681f
test: ensure linter errors fixed
gabor-boros Jul 17, 2025
b75df6c
refactor: reformat code
gabor-boros Jul 17, 2025
3afed9e
build: remove Python 3.14 CI variant
gabor-boros Jul 17, 2025
2efbf41
core: reformat yaml files
gabor-boros Jul 17, 2025
a779501
chore: remove bandit
gabor-boros Jul 17, 2025
d9899ee
refactor: migrate management commands
gabor-boros Jul 22, 2025
29edf97
chore: update pre-commit config
gabor-boros Aug 15, 2025
c6a28be
chore: add ql2_pb2 to tracked files
gabor-boros Aug 15, 2025
419e9a8
refactor: fix typing issues and cleanup code
gabor-boros Aug 16, 2025
2b9766e
fix: correct index-rebuild command name
gabor-boros Aug 16, 2025
7e2dd6e
feat: add async drivers
gabor-boros Aug 16, 2025
e29f2f0
chore: fix docs generation and regen docs
gabor-boros Aug 17, 2025
f1ab498
chore: cleanup code
gabor-boros Aug 17, 2025
6937705
fix: add expr to init
gabor-boros Aug 17, 2025
6158564
refactor: fallback to pyi file generation
gabor-boros Aug 19, 2025
d3d36d9
refactor: fix errors raised by polyglot tests
gabor-boros Aug 19, 2025
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
2 changes: 0 additions & 2 deletions .bandit

This file was deleted.

28 changes: 17 additions & 11 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
[run]
include = rethinkdb/*
source = rethinkdb
branch = True
omit = *tests*
*__init__*
rethinkdb/ql2_pb2.py
rethinkdb/cli/main.py
rethinkdb/cli/_export.py
rethinkdb/cli/_index_rebuild.py
rethinkdb/cli/_restore.py
rethinkdb/cli/_dump.py
rethinkdb/cli/_import.py
rethinkdb/cli/_repl.py
rethinkdb/cli/utils.py

[report]
exclude_lines =
pragma: no cover

def __unicode__
def __repr__

omit =
rethinkdb/version.py

show_missing = True
sort = cover
fail_under = 60
exclude_lines = pragma: no cover
if __name__ == .__main__.:
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
ignore=E203,E501,W503
max-line-length=88
application_import_names=rethinkdb
exclude = .git,__pycache__,tests,scripts,rethinkdb/cli,rethinkdb/ql2_pb2.py
per-file-ignores =
rethinkdb/cli/__init__.py: F401
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
Expand Down
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
**Reason for the change**

If applicable, link the related issue/bug report or write down in few sentences the motivation.

**Description**

A clear and concise description of what did you changed and why.

**Code examples**

If applicable, add code examples to help explain your changes.

**Checklist**

- [ ] Unit tests created/updated
- [ ] Documentation extended/updated
- [ ] I have read and agreed to the [RethinkDB Contributor License Agreement](http://rethinkdb.com/community/cla/)

**References**

Anything else related to the change e.g. documentations, RFCs, etc.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: daily
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Build

on: [push, release]

jobs:
build:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
pip install poetry pre-commit
poetry install -E all

- name: Install RethinkDB and compile proto file
run: |
./scripts/install-db.sh
make protobuf

- name: Run linters
run: |
pre-commit run --all-files
poetry run make lint

- name: Run tests
run: |
# Start DB and run tests
rethinkdb&
poetry run make test
killall rethinkdb

- name: Deploy to PyPi
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.POETRY_HTTP_BASIC_PYPI_USERNAME }}
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
if: ${{ github.event_name == 'release' && matrix.python-version == '3.13' }}
run: poetry publish --build
73 changes: 73 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: CodeQL

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: 28 8 * * 0

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [python]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
48 changes: 33 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -23,7 +24,6 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -47,30 +47,48 @@ coverage.xml
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot
# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# Environments
*.pid
# dotenv
.env

# virtualenv
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
virtualenv/
ENV/

# RethinkDB
rethinkdb/ql2_pb2.py
rethinkdb/*.proto
rethinkdb_data/
rebirthdb_data/
# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Editors
.vscode/
.idea/

# Misc
.DS_Store
TODO

# rethinkdb
examples/
rethinkdb_data/
ql2.proto

# test reporter
cc-test-reporter
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

default_stages: [commit, push]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^rethinkdb/ql2_pb2\.py$
- id: end-of-file-fixer
exclude: ^rethinkdb/ql2_pb2\.py$
- id: check-toml
- id: check-json
- id: pretty-format-json
- id: check-merge-conflict
- id: check-added-large-files

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt.git
rev: 0.2.3
hooks:
- id: yamlfmt
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
=======
Credits
=======

Contributors
------------

Check the whole list of contributors here_.

.. _here: https://github.com/rethinkdb/rethinkdb-python/graphs/contributors
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy