diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..834104b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,85 @@ + + + + + + + + + +## Expected Behavior + + + +## Current Behavior + + + +## Possible Solution + + + +## Executable script to reproduce (for bugs) + + + +code: +```python +import pymysql.cursors + +# Connect to the database +connection = pymysql.connect(host='localhost', + user='user', + password='passwd', + db='db', + charset='utf8mb4', + cursorclass=pymysql.cursors.DictCursor) + +try: + with connection.cursor() as cursor: + # Create a new record + sql = "INSERT INTO `users` (`email`, `password`) VALUES (%s, %s)" + cursor.execute(sql, ('webmaster@python.org', 'very-secret')) + + # connection is not autocommit by default. So you must commit to save + # your changes. + connection.commit() + + with connection.cursor() as cursor: + # Read a single record + sql = "SELECT `id`, `password` FROM `users` WHERE `email`=%s" + cursor.execute(sql, ('webmaster@python.org',)) + result = cursor.fetchone() + print(result) +finally: + connection.close() +``` + +schema: +```sql +CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(255) COLLATE utf8_bin NOT NULL, + `password` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin +AUTO_INCREMENT=1 ; +``` + +## Tracebacks (for bugs) + +``` +paste here +``` + +## Context + + + +## Your Environment + + +* Operating System and version: +* Python version and build (cygwin, python.org, homebrew, pyenv, Linux distribution's package, PyPy etc...) +* PyMySQL Version used: +* my.cnf if possible. If you don't have it, related system variables like [connection encoding](https://dev.mysql.com/doc/refman/5.6/en/charset-connection.html).