Skip to content

Commit f6a8eb4

Browse files
committed
fix: resolve conflict of f-string
2 parents be89cc5 + 72b53a8 commit f6a8eb4

39 files changed

+1336
-1153
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
pip install ruff black
2020
2121
- name: Run lint script
22-
run: bash scripts/lint.sh
22+
run: bash scripts/lint.sh

.github/workflows/pytest.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: PyTest
22
on: [push, pull_request]
3-
3+
env:
4+
PYTEST_SKIP_OPTION: "not test_no_trailing_rotate_event and not test_end_log_pos and not test_query_event_latin1"
45
jobs:
56
test:
67
strategy:
@@ -29,22 +30,34 @@ jobs:
2930
docker compose create
3031
docker compose start
3132
echo "wait mysql server"
32-
33+
3334
while :
3435
do
35-
if mysql -h 127.0.0.1 --user=root --execute "SELECT version();" 2>&1 >/dev/null && mysql -h 127.0.0.1 --port=3307 --user=root --execute "SELECT version();" 2>&1 >/dev/null; then
36+
if mysql -h 127.0.0.1 --user=root --execute "SELECT version();" 2>&1 >/dev/null && mysql -h 127.0.0.1 --port=3307 --user=root --execute "SELECT version();" 2>&1 >/dev/null; then
3637
break
3738
fi
3839
sleep 1
3940
done
40-
41+
4142
echo "run pytest"
4243
4344
- name: Install dependencies
4445
run: |
4546
pip install .
4647
pip install pytest
4748
48-
- name: Run test suite
49-
run: |
50-
pytest -k "not test_no_trailing_rotate_event and not test_end_log_pos"
49+
- name: Run tests for mysql-5
50+
working-directory: pymysqlreplication/tests
51+
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-5
52+
53+
- name: Run tests for mysql-5-ctl
54+
working-directory: pymysqlreplication/tests
55+
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-5-ctl
56+
57+
- name: Run tests for mysql-8
58+
working-directory: pymysqlreplication/tests
59+
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-8
60+
61+
- name: Run tests for mariadb-10
62+
working-directory: pymysqlreplication/tests
63+
run: pytest -k "$PYTEST_SKIP_OPTION" -m mariadb --db=mariadb-10

.mariadb/my.cnf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ loose_file_key_management_filename = /opt/key_file/no_encryption_key.key
2020
# file_key_management_encryption_algorithm=aes_ctr
2121

2222
# Set encrypt_binlog
23-
encrypt_binlog=ON
23+
encrypt_binlog=ON

.mariadb/no_encryption_key.key

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1;dda0ccb18a28b0b4c2448b5f0217a134
1+
1;dda0ccb18a28b0b4c2448b5f0217a134

.mysql/dev.mysql.com.gpg.key

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,3 @@ Pw1yjWJT1IhUBBgRAgAMBQJOdz3tBQkT+wG4ABIHZUdQRwABAQkQjHGNO1By4fUU
435435
mwCbBYr2+bBEn/L2BOcnw9Z/QFWuhRMAoKVgCFm5fadQ3Afi+UQlAcOphrnJ
436436
=tUml
437437
-----END PGP PUBLIC KEY BLOCK-----
438-

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ repos:
1616
- repo: https://github.com/psf/black
1717
rev: 23.7.0
1818
hooks:
19-
- id: black
19+
- id: black

.readthedocs.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
# You can also specify other tool versions:
13+
# nodejs: "20"
14+
# rust: "1.70"
15+
# golang: "1.20"
16+
17+
# Build documentation in the "docs/" directory with Sphinx
18+
sphinx:
19+
configuration: docs/conf.py
20+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
21+
# builder: "dirhtml"
22+
# Fail on all warnings to avoid broken references
23+
# fail_on_warning: true
24+
25+
# Optionally build your docs in additional formats such as PDF and ePub
26+
# formats:
27+
# - pdf
28+
# - epub
29+
30+
# Optional but recommended, declare the Python requirements required
31+
# to build your documentation
32+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
33+
# python:
34+
# install:
35+
# - requirements: docs/requirements.txt

CHANGELOG

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
* PyMYSQL 0.7
8585
* Add more contributors
8686

87-
0.10 30/11/2016
87+
0.10 30/11/2016
8888
* row-events: TIME is now encoded as python.timedelta
8989
* Allow users to define ctl_connection_settings and the option to fail when table information is unavailable (#176)
9090
* Decode gtid from network packet
@@ -128,7 +128,7 @@
128128

129129
0.19 29/04/2019
130130
* Fix Insert NULL in a boolean column returns no rows #288
131-
* Added empty string support for enum
131+
* Added empty string support for enum
132132
* Fix column order
133133
* Fix float problem about time fieldtype
134134

@@ -168,7 +168,7 @@
168168
* Add support for MariaDB GTID
169169

170170
0.29 08/04/2022
171-
* Skip db name parsing if mts_accessed_dbs == 254
171+
* Skip db name parsing if mts_accessed_dbs == 254
172172

173173
0.30 28/04/2022
174174
* Fix decoding large json arrays
@@ -210,4 +210,24 @@
210210
* Enhance Data Integrity with Binlog Event Checksum Verification
211211
* Fix Bug table map event read null_bitmask packet
212212
* Fix Timestamp conversion to return UTC instead of local timezone
213-
* Optimize Handler_read_rnd by removing ORDER BY clause
213+
* Optimize Handler_read_rnd by removing ORDER BY clause
214+
215+
0.45.0 02/10/2023
216+
* Fix Json object, Array parse Error
217+
218+
1.0.0 02/10/2023
219+
* remove column schema
220+
* Mysql 8.0.14 version support Table map Event optional metaData extraction
221+
* Sync Column from optional metaData
222+
* Fix parsing of incorrect bytes in 'extradata' for 'rows event'
223+
* Fix remove duplicate Affected columns output
224+
* Enhance Code Quality with Ruff, Black, and Pre-commit
225+
* Enhance Testing with MySQL8 & Update GitHub Actions
226+
* Add Logging when fake rotate event occured
227+
* update logo
228+
229+
1.0.1 05/10/2023
230+
* add util module
231+
232+
1.0.2 05/10/2023
233+
* Delete charset_list.csv and add directly in CHARSET.py

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ However, please note that skipping hooks might lead to CI failures if we use the
4848

4949
---
5050

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!
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!

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ Project status
4343
================
4444

4545
The project is test with:
46-
* MySQL 5.5, 5.6 and 5.7
46+
* MySQL 5.5, 5.6 and 5.7 (v0.1 ~ v0.45)
47+
* MySQL 8.0.14 (v1.0 ~)
4748
* Python 3.3, 3.4, 3.5 and 3.6 (3.2 is not supported)
4849
* PyPy (really faster than the standard Python interpreter)
4950

51+
MySQL version 8.0.14 and later Set global variable binlog_row_metadata='FULL' and binlog_row_image='FULL'
52+
5053
The project is used in production for critical stuff in some
5154
medium internet corporations. But all use case as not
5255
been perfectly test in the real world.
@@ -92,6 +95,7 @@ Projects using this library
9295
* BitSwanPump: A real-time stream processor (https://github.com/LibertyAces/BitSwanPump)
9396
* clickhouse-mysql-data-reader: https://github.com/Altinity/clickhouse-mysql-data-reader
9497
* py-mysql-elasticsearch-sync: https://github.com/jaehyeonpy/py-mysql-elasticsearch-sync
98+
* synch: Sync data from other DB to ClickHouse (https://github.com/long2ice/synch)
9599

96100
MySQL server settings
97101
=========================
@@ -292,7 +296,7 @@ Similar projects
292296
* MySQL Hadoop Applier: C++ version http://dev.mysql.com/tech-resources/articles/mysql-hadoop-applier.html
293297
* Java: https://github.com/shyiko/mysql-binlog-connector-java
294298
* GO: https://github.com/siddontang/go-mysql
295-
* PHP: Based on this this project https://github.com/krowinski/php-mysql-replication and https://github.com/fengxiangyun/mysql-replication
299+
* PHP: Based on this this project https://github.com/krowinski/php-mysql-replication and https://github.com/fengxiangyun/mysql-replication
296300
* .NET: https://github.com/SciSharp/dotnet-mysql-replication
297301
* .NET Core: https://github.com/rusuly/MySqlCdc
298302

@@ -309,6 +313,11 @@ Major contributor:
309313
* bjoernhaeuser for his bugs fixing, improvements and community support https://github.com/bjoernhaeuser
310314
* Arthur Gautier gtid, slave report... https://github.com/baloo
311315

316+
Maintainer:
317+
* Julien Duponchelle Original author https://github.com/noplay
318+
* Sean-k1 https://github.com/sean-k1
319+
* dongwook-chan https://github.com/dongwook-chan
320+
312321
Other contributors:
313322
* Dvir Volk for bug fix https://github.com/dvirsky
314323
* Lior Sion code cleanup and improvements https://github.com/liorsion
@@ -337,14 +346,14 @@ Other contributors:
337346
* Keegan Parker: secondary database for reference schema https://github.com/kdparker
338347
* Troy J. Farrell Clear table_map if RotateEvent has timestamp of 0 https://github.com/troyjfarrell
339348
* Zhanwei Wang Fail to get table informations https://github.com/wangzw
340-
* Alexander Ignatov Fix the JSON literal
349+
* Alexander Ignatov Fix the JSON literal
341350
* Garen Chan Support PyMysql with a version greater than 0.9.3 https://github.com/garenchan
342-
* Mike Ascah: Add logic to handle inlined ints in large json documents ttps://github.com/mascah
351+
* Mike Ascah: Add logic to handle inlined ints in large json documents ttps://github.com/mascah
343352
* Hiroaki Kawai: PyMySQL 1.0 support (https://github.com/hkwi)
344353
* Dongwook Chan: Support for ZEROFILL, Correct timedelta value for negative MySQL TIME datatype, Fix parsing of row events for MySQL8 partitioned table, Parse status variables in query event, Parse status variables in query event , Fix parse errors with MariaDB (https://github.com/dongwook-chan)
345354
* Paul Vickers: Add support for specifying an end log_pos (https://github.com/paulvic)
346355
* Samira El Aabidi: Add support for MariaDB GTID (https://github.com/Samira-El)
347-
* Oliver Seemann: Handle large json, github actions,
356+
* Oliver Seemann: Handle large json, github actions,
348357
Zero-pad fixed-length binary fields (https://github.com/oseemann)
349358
* Mahadir Ahmad: Handle null json payload (https://github.com/mahadirz)
350359
* Axel Viala: Removal of Python 2.7 (https://github.com/darnuria)
@@ -367,5 +376,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
367376
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
368377
See the License for the specific language governing permissions and
369378
limitations under the License.
370-
371-

0 commit comments

Comments
 (0)