Commit Graph

434 Commits

Author SHA1 Message Date
medmunds
3a6e0ebb30 Clean up session sharing
* Test cases
* Fix premature session.close when caller
  is managing email backend connection
* Ensure session closed correct in exceptions
* Changelog

(Also fixes bug where JSON serialization errors
didn't respect fail_silently.)
2015-11-30 16:50:58 -08:00
medmunds
4089a35500 Drop legacy tests and deprecations 2015-11-29 14:45:08 -08:00
medmunds
942a6df8c3 Drop unintended json date encoding 2015-11-29 14:42:12 -08:00
medmunds
699216ba00 Drop legacy DjrillBackendHTTPError exception 2015-11-29 12:55:16 -08:00
medmunds
209f9573ff Drop legacy DjrillMessage class 2015-11-29 12:37:00 -08:00
medmunds
681af234bd Travis: avoid legacy infrastructure; enable caching 2015-09-25 18:29:15 -07:00
medmunds
f7bd9f3a25 Add Djrill version to User-Agent header
(Makes version show up in Mandrill API logs)
2015-09-25 18:23:45 -07:00
medmunds
e06f2cf718 Travis: make build matrix more readable (by humans) 2015-09-25 17:50:44 -07:00
medmunds
3b4d1c1359 Travis: list installed package versions in build log 2015-09-25 17:19:51 -07:00
medmunds
42848e0eed Integration tests handle 'queued' response
Rapid-fire pelting from our Travis tests sometimes
causes the Mandrill API to queue a "send" call, rather
than deal with it immediately. If that occurs, we
generally have to just ignore that test (in that test run).
2015-09-25 14:48:32 -07:00
Mike Edmunds
1ce7f98375 Add Django 1.9 alpha to test matrix 2015-09-25 12:02:42 -07:00
Mike Edmunds
23523389be Merge pull request #99 from Wrhector/v2.0-dev3
Allow Mandrill specific options to be set globally in the settings file.

Closes #97
2015-07-14 11:33:03 -07:00
William Hector
7179734a08 Allow global_merge_vars to be merged in with the per message dict, with keys in the latter taking precedent.
Update the docs accordingly.
2015-07-14 05:57:12 +01:00
Mike Edmunds
c8b760e8fa Merge pull request #98 from Wrhector/v2.0-dev
Use requests.session to pool requests when mass sending mail
2015-07-13 16:21:39 -07:00
William Hector
883b23362c Allow Mandrill specific options to be set globally in the settings file.
This is useful to set options such as tracking_domain etc per instance when using subaccounts with Mandrill.
2015-07-12 01:19:59 +01:00
William Hector
bac85511b5 Use requests.session to pool requests when mass sending mail
Tests modified to patch the ression post and close session upon error.
RE: http://stackoverflow.com/q/30982717/647002
2015-07-11 22:12:14 +01:00
medmunds
da260de1a0 Drop support for Django 1.3, Python 2.6 and 3.2.
* Shrink the Travis test matrix
* Remove a lot of backported test code
* Update requirements in setup.py
* Update docs

Closes #79
2015-05-14 11:39:57 -07:00
medmunds
99ac099081 Remove DjrillAdminSite
Closes #78
2015-05-14 11:00:52 -07:00
medmunds
a658e12595 2.0 development branch 2015-05-14 10:10:42 -07:00
medmunds
1d086f85f4 Close out 1.4 dev
Master is now 1.5.0-dev (to avoid accidents),
but the 1.4 branch is expected to be the end
of the 1.x line.

2.0 development will begin on a separate branch soon.
2015-05-13 20:18:11 -07:00
medmunds
a6d4911d9b Travis: upgrade pip and setuptools at start of build
Hoping to clean up some warnings while installing dependencies.
2015-05-13 19:49:25 -07:00
medmunds
ef0051dd36 Docs: point to Django stable docs
Avoid pointing Djrill users toward Django dev docs.

[ci skip]
2015-05-13 18:56:15 -07:00
medmunds
c83aee0bf2 Update the docs copyright year
(Didn't realize we had a docs copyright year.)
2015-05-13 18:47:18 -07:00
medmunds
46dea8d595 Fix missing Sphinx labels
(So we don't send would-be Djrill contributors
to Django's "Contributors Guide".)
2015-05-13 18:46:07 -07:00
medmunds
7c46bc7d96 Add troubleshooting docs 2015-05-13 18:03:28 -07:00
medmunds
651292fd24 Note Django DEFAULT_FROM_EMAIL in docs.
Ref https://github.com/brack3t/Djrill/issues/69#issuecomment-74062569
2015-05-13 17:58:55 -07:00
medmunds
6d94e94736 Live API tests
Addresses #41.
(Still need to add a Mandrill test key to the Travis config.)
2015-05-13 16:27:38 -07:00
medmunds
00ddd2f4f6 Improve MandrillAPIError.__str__
* Include formatted response from Mandrill API (if any)
* Clean up recipient address(es)
2015-05-13 15:43:54 -07:00
medmunds
6798b72b8b Fewer backticks and bullets in upcoming-changes docs
(was hard to read with RTD's formatting)
2015-05-12 19:00:55 -07:00
medmunds
8db86a8274 Fix RuntimeError on sys.modules in reset_warning_registry
Django 1.8's reset_warning_registry (which we backport)
was generating `RuntimeError: dictionary changed size
during iteration` in Travis tests under Python 3.x.

Likely a thread-safety issue on sys.modules.values().
See https://code.djangoproject.com/ticket/21049
for fix applied elsewhere in Django.
2015-05-12 18:42:12 -07:00
medmunds
fd75c4b24d Deprecate DjrillBackendHTTPError 2015-05-12 18:27:29 -07:00
medmunds
8d274e7b16 Deprecate DjrillMessage 2015-05-12 16:14:58 -07:00
medmunds
80895316f1 Deprecate DjrillAdminSite 2015-05-12 15:56:30 -07:00
medmunds
cc56b96efa Improve and document JSON serialization for Mandrill API
* Add some context to exceptions on unserializable
  values (addresses #89).
* Document need to format merge data
  (into something JSON-serializable).
* Add RemovedInDjrill2 DeprecationWarning.
* Deprecate blanket date/datetime serialization.
2015-05-12 13:29:52 -07:00
medmunds
52de627af1 Clean up test warnings for Django 1.8
* Django 1.8 requires TEMPLATES setting (for admin tests)
* Ignore cycle tag deprecation warnings

One remaining PendingDeprecationWarning: "the imp module is
deprecated in favour of importlib" is coming from six, and has a fix
waiting to land: https://bitbucket.org/gutworth/six/issue/112
2015-05-11 18:09:56 -07:00
medmunds
adfc9f4a47 Django 1.8 release 2015-05-11 17:07:02 -07:00
medmunds
d91e2c2f91 Adopt semver
Djrill's been practicing semver since 1.0; make it official now.
2015-05-11 17:00:32 -07:00
medmunds
6891b0de91 Fix tests on Python 2.6 2015-02-25 21:13:16 -08:00
medmunds
d23a1bf4a1 Bump tests to Django 1.8b1 2015-02-25 16:31:35 -08:00
medmunds
bbc2e06091 Support Django 1.8 reply_to param. 2015-02-25 16:30:02 -08:00
medmunds
8ab36d2cd0 Django 1.8 alpha 1 support
* Test on Python 2.7, 3.4, pypy.
* Call super.setUpClass in DjrillAdminTests.
  https://docs.djangoproject.com/en/dev/releases/1.8/#overriding-setupclass-teardownclass-in-test-cases

Also clear up some new PendingDeprecationWarnings, where
the changes can easily remain compatible back to Django 1.3:

* Remove deprecated django.conf.urls.patterns.
  (And match Django recommendations in our docs.)
  https://docs.djangoproject.com/en/dev/releases/1.8/#django-conf-urls-patterns
* Remove deprecated SimpleTestCase.urls.
  (We've already back-ported @override_settings
  for testing older Django versions.)
  https://docs.djangoproject.com/en/dev/releases/1.8/#django-test-simpletestcase-urls
2015-01-16 16:17:31 -08:00
medmunds
00a0a1fde6 Open v1.4 dev.
[ci skip]
2015-01-16 14:06:57 -08:00
medmunds
d714d35920 Release notes for 1.3.
[ci skip]
2015-01-16 13:56:46 -08:00
medmunds
76e29c0845 Support merge_language option.
Closes #84.
2015-01-16 13:48:39 -08:00
medmunds
1c4ee989f7 Fix "the JSON object must be str, not 'bytes'" on python3.
Closes #82.

* Test mock API responses (with actual content) in admin tests.
  (This exposes failure case, at least under Python 3.4/Django 1.6.)
* Parse json from Response.text, rather than raw Response.content
  bytes, in admin views.
2015-01-16 13:36:00 -08:00
medmunds
0b4a210031 Test against SimpleAdminConfig on Django>=1.7.
In test cases, use the same admin setup we recommend to users.
2015-01-16 13:29:43 -08:00
medmunds
11961b57e5 Use real Response object in DjrillBackendMockAPITestCase tests.
(Improves testing accuracy around API response encoding.)

* Add `six` as test dependency (six.BytesIO, six.b)
* Change MockResponse content to bytes (because HTTP responses
  are bytes, not strings)
2015-01-16 13:18:17 -08:00
Mike Edmunds
4754ef7650 Merge pull request #85 from freider/master
Security fix: Changes the default API endpoint to the https version
2015-01-16 10:41:47 -08:00
Elias Freider
95f143d8ca Changes the default API endpoint to the https version 2015-01-16 16:59:48 +01:00
medmunds
a0ce916092 Fix a couple of Sphinx docs warnings 2014-09-29 17:25:45 -07:00