Skip to content

Updated Examples and Changelog in Readme.md #557

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

Merged
merged 6 commits into from
Oct 17, 2023

Conversation

KunalDhand
Copy link
Contributor

Updated Changelog
from https://github.com/noplay/python-mysql-replication/blob/master/CHANGELOG
to https://github.com/noplay/python-mysql-replication/blob/main/CHANGELOG

Updated Examples block
from

from pymysqlreplication import BinLogStreamReader
mysql_settings = {'host': '127.0.0.1', 'port': 3306, 'user': 'root', 'passwd': ''}

stream = BinLogStreamReader(connection_settings = mysql_settings, server_id=100)

for binlogevent in stream:
    binlogevent.dump()

stream.close()

to

 from pymysqlreplication import BinLogStreamReader

MYSQL_SETTINGS = {"host": "127.0.0.1", "port": 3306, "user": "root", "passwd": ""}


def main():
    stream = BinLogStreamReader(
    connection_settings=MYSQL_SETTINGS, server_id=3, blocking=True
    )

    for binlogevent in stream:
        binlogevent.dump()

    stream.close()


if __name__ == "__main__":
    main()

Also updated the output according to the new code

@@ -288,7 +315,7 @@ https://python-mysql-replication.readthedocs.org/en/latest/developement.html

Changelog
==========
https://github.com/noplay/python-mysql-replication/blob/master/CHANGELOG
https://github.com/noplay/python-mysql-replication/blob/main/CHANGELOG
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool!

README.md Outdated
Comment on lines 123 to 138
MYSQL_SETTINGS = {"host": "127.0.0.1", "port": 3306, "user": "root", "passwd": ""}

stream = BinLogStreamReader(connection_settings = mysql_settings, server_id=100)

for binlogevent in stream:
binlogevent.dump()
def main():
stream = BinLogStreamReader(
connection_settings=MYSQL_SETTINGS, server_id=3, blocking=True
)

stream.close()
for binlogevent in stream:
binlogevent.dump()

stream.close()


if __name__ == "__main__":
main()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean for you to change this area.

I was asking to change the link on line 115.
I'm sorry I didn't convey my intentions clearly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry It was my mistake. I resolved the issue now. Changed the "Example Directory"
from https://github.com/noplay/python-mysql-replication/tree/master/examples
to https://github.com/noplay/python-mysql-replication/tree/main/examples

additionally I roll backed the changes done to Example and Output code in example block.

Changed Example Directory link, also reversed the changes doen to Example code and output.
Copy link
Collaborator

@sean-k1 sean-k1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! Thanks your hard Work!

@sean-k1 sean-k1 merged commit b542936 into julien-duponchelle:main Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants