Skip to content

Commit f2f991e

Browse files
committed
fix: resolve conflict with main branch
2 parents edb5242 + a301596 commit f2f991e

36 files changed

+3558
-1469
lines changed

Diff for: .github/workflows/lint.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v3
10+
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.x' # This will install the latest version of Python 3
15+
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install ruff black
20+
21+
- name: Run lint script
22+
run: bash scripts/lint.sh

Diff for: .pre-commit-config.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.0.286
12+
hooks:
13+
- id: ruff
14+
args: [ --fix, --exit-non-zero-on-fix ]
15+
16+
- repo: https://github.com/psf/black
17+
rev: 23.7.0
18+
hooks:
19+
- id: black

Diff for: CHANGELOG

+16-1
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,19 @@
195195
* Fix release error
196196

197197
0.43.0 23/07/2023
198-
* Bump PyMySQL to 1.1.0 to solve : LookupError: unknown encoding: utf8mb3
198+
* Bump PyMySQL to 1.1.0 to solve : LookupError: unknown encoding: utf8mb3
199+
200+
0.44.0 12/09/2023
201+
* Add MariadbAnnotateRowsEvent
202+
* Add RandEvent
203+
* Add MariadbStartEncryptionEvent
204+
* Add RowsQueryLogEvent
205+
* Add MariadbBinLogCheckPointEvent
206+
* Add PreviousGtidsEvent
207+
* Add UserVarEvent
208+
* Fix Bug increase history list length and snapshot : Mysql 8.0 version connection was being created along with the opening of a transaction. This led to a problem with looking at the snapshot before creating the table
209+
* Fix Avoid UnicodeDecodeError for non-utf8 QueryEvents
210+
* Enhance Data Integrity with Binlog Event Checksum Verification
211+
* Fix Bug table map event read null_bitmask packet
212+
* Fix Timestamp conversion to return UTC instead of local timezone
213+
* Optimize Handler_read_rnd by removing ORDER BY clause

Diff for: CONTRIBUTING.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to python-mysql-replication
2+
3+
Firstly, thank you for considering to contribute to `python-mysql-replication`. We appreciate your effort, and to ensure that your contributions align with the project's coding standards, we employ the use of `pre-commit` hooks. This guide will walk you through setting them up.
4+
5+
## Setting up pre-commit
6+
7+
1. **Install pre-commit**
8+
9+
Before you can use `pre-commit`, you need to install it. You can do so using `pip`:
10+
11+
```bash
12+
pip install pre-commit
13+
```
14+
15+
2. **Install the pre-commit hooks**
16+
17+
Navigate to the root directory of your cloned `python-mysql-replication` repository and run:
18+
19+
```bash
20+
pre-commit install
21+
```
22+
23+
This will install the `pre-commit` hooks to your local repository.
24+
25+
3. **Make sure to stage your changes**
26+
27+
`pre-commit` will only check the files that are staged in git. So make sure to `git add` any new changes you made before running `pre-commit`.
28+
29+
4. **Run pre-commit manually (Optional)**
30+
31+
Before committing, you can manually run:
32+
33+
```bash
34+
pre-commit run --all-files
35+
```
36+
37+
This will run the hooks on all the files. If there's any issue, the hooks will let you know.
38+
39+
## If you encounter issues
40+
41+
If you run into any problems with the hooks, you can always skip them using:
42+
43+
```bash
44+
git commit -m "Your commit message" --no-verify
45+
```
46+
47+
However, please note that skipping hooks might lead to CI failures if we use these checks in our CI pipeline. It's always recommended to adhere to the checks to ensure a smooth contribution process.
48+
49+
---
50+
51+
That's it! With these steps, you should be well on your way to contributing to `python-mysql-replication`. We look forward to your contributions!

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Projects using this library
8989
* Aventri MySQL Monitor (https://github.com/aventri/mysql-monitor)
9090
* BitSwanPump: A real-time stream processor (https://github.com/LibertyAces/BitSwanPump)
9191
* clickhouse-mysql-data-reader: https://github.com/Altinity/clickhouse-mysql-data-reader
92+
* py-mysql-elasticsearch-sync: https://github.com/jaehyeonpy/py-mysql-elasticsearch-sync
9293

9394
MySQL server settings
9495
=========================

0 commit comments

Comments
 (0)