From 1411bec51e988e282a0ecf2233a76a8653b2c210 Mon Sep 17 00:00:00 2001 From: Maksim Date: Thu, 9 Aug 2018 03:31:26 +0300 Subject: [PATCH 1/6] python 3 release --- pattern/web/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pattern/web/__init__.py b/pattern/web/__init__.py index 963c79e3..c97540f5 100644 --- a/pattern/web/__init__.py +++ b/pattern/web/__init__.py @@ -246,7 +246,7 @@ def asynchronous(function, *args, **kwargs): # User agent and referrer. # Used to identify the application accessing the web. -USER_AGENT = "Pattern/2.6 +http://www.clips.ua.ac.be/pattern" +USER_AGENT = "Pattern/3.6 +http://www.clips.ua.ac.be/pattern" REFERRER = "http://www.clips.ua.ac.be/pattern" # Mozilla user agent. From cd679d4d378e65dc75b41c268ede4a20923e9aee Mon Sep 17 00:00:00 2001 From: Maksim Date: Thu, 9 Aug 2018 10:27:54 +0300 Subject: [PATCH 2/6] python 3 release --- pattern/web/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pattern/web/__init__.py b/pattern/web/__init__.py index c97540f5..963c79e3 100644 --- a/pattern/web/__init__.py +++ b/pattern/web/__init__.py @@ -246,7 +246,7 @@ def asynchronous(function, *args, **kwargs): # User agent and referrer. # Used to identify the application accessing the web. -USER_AGENT = "Pattern/3.6 +http://www.clips.ua.ac.be/pattern" +USER_AGENT = "Pattern/2.6 +http://www.clips.ua.ac.be/pattern" REFERRER = "http://www.clips.ua.ac.be/pattern" # Mozilla user agent. From 0e7dfae8f23165d96e04f3a0cf92b1ed4c1455f4 Mon Sep 17 00:00:00 2001 From: Will Price Date: Thu, 22 Mar 2018 12:51:30 +0000 Subject: [PATCH 3/6] Make mysqlclient an optional dependency --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6b7a0d88..bad7c4dd 100644 --- a/setup.py +++ b/setup.py @@ -137,7 +137,6 @@ install_requires = [ "future", "backports.csv", - "mysqlclient", "beautifulsoup4", "lxml", "feedparser", @@ -149,5 +148,8 @@ "cherrypy" if sys.version >= "3" else "cherrypy==17.4.1", "requests" ], + extra_requires = { + 'mysql': ["mysqlclient"], + }, zip_safe = False ) From f4716f5769919443c9cb0b9ff4774dbb7e558f42 Mon Sep 17 00:00:00 2001 From: Will Price Date: Sat, 17 Nov 2018 22:52:30 +0000 Subject: [PATCH 4/6] Add instructions on how to install pattern with mysql support --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 98a117d5..0efec9a2 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ If you have pip, you can automatically download and install from the [PyPI repos pip install pattern ``` +If you wish to use MySQL support, install specifying the optional extra +requirement: +``` +pip install pattern[mysql] +``` + If none of the above works, you can make Python aware of the module in three ways: - Put the pattern folder in the same folder as your script. - Put the pattern folder in the standard location for modules so it is available to all scripts: From b584a5ee72bbb8e35772de5a0223101251467933 Mon Sep 17 00:00:00 2001 From: Will Price Date: Sat, 17 Nov 2018 23:07:53 +0000 Subject: [PATCH 5/6] Fix extra_requires -> extras_require typo --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bad7c4dd..c6520c78 100644 --- a/setup.py +++ b/setup.py @@ -148,7 +148,7 @@ "cherrypy" if sys.version >= "3" else "cherrypy==17.4.1", "requests" ], - extra_requires = { + extras_require = { 'mysql': ["mysqlclient"], }, zip_safe = False From 9b74459f537b36e17ce430b290f58c39e4c264fe Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 1 Aug 2024 08:04:52 -0500 Subject: [PATCH 6/6] post-rebase fixup --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 206afe24..e95df4e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ before_install: # Define TZ as some tests rely on timezone - export TZ=Europe/Brussels - pip install --quiet pytest==4.4 pytest-cov pytest-xdist chardet + - pip install ".[mysql]" install: - python setup.py install --quiet