-
Notifications
You must be signed in to change notification settings - Fork 377
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
Build patch #4867
Merged
Merged
Build patch #4867
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg-config is requested in the installation docs for homebrew: https://pypi.org/project/mysqlclient/
v4 has deprecated use of Node.js 16 and github actions complains about it
problem: - there are no wheels mysqlclient for mac, instead pip builds the wheel - this has generally worked fine, but recently, for mysql >= 8.3.0, the MySQL team killed some APIs that have been deprecated for a while now, causing the mysqlclient build to fail solution: - we can pin the brew install of mysql to < 8.3.0, or we can bump the pip install of mysqlclient to >= 2.2.3 which as of 2/4/24 has a patch: PyMySQL/mysqlclient#688 - later seems more "responsible"
bethac07
approved these changes
Feb 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fair to me, assuming tests pass!
MySQLdb.escape_string was removed in v2.1.0, here: PyMySQL/mysqlclient#511 mysqlclient still allows escape_string to be used via the connection object really we should be using parameterized queries: https://pynative.com/python-mysql-execute-parameterized-query-using-prepared-statement/ that would require more substantial changes however
This reverts commit 89ef8a5. the connection object returned my mysqlclient (`MySQLdb.connect`) does expose `escape_string` however we do not always access the `create_database_tables` function with a mysql database connection object, sometimes we use sqlite, which does not have `escape_string`
MySQLdb.escape_string was removed in v2.1.0, here: PyMySQL/mysqlclient#511 we can still access `escape_string` via the underlying `_mysql` object that mysqlclient wraps really we should be using parameterized queries: https://pynative.com/python-mysql-execute-parameterized-query-using-prepared-statement/ that would require more substantial changes however
They did not, but do now other than the #4859 issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Latest build fails because
mysqlclient
fails to build (on MacOS).problem:
mysqlclient
for mac, insteadpip
builds the wheelmysql >= 8.3.0
, the MySQL team killedsome APIs that have been deprecated for a while now, causing the
mysqlclient
build to failsolution:
brew install
ofmysql
to< 8.3.0
, or we can bump thepip install
ofmysqlclient
to>= 2.2.3
which as of 2/4/24 has a patch