Jump to >

Djblets 1.0.10 Release Notes

Release date: February 19, 2019

djblets.avatars

djblets.forms

  • Fixed a state sharing bug with ConditionsField.

    If the ConditionsField.choice_kwargs attribute on one instance of a field for a form was modified, that modification would apply to that field on any other instance of the form. This could impact other viewers to the page, depending on the consumer’s use of this attribute.

djblets.mail

  • Added better control over From header spoofing. (Bug #4578)

    EmailMessage now has the ability to completely disable spoofing of the From header, instead using the server’s predefined e-mail address for all outgoing e-mail messages. This is done through the new from_spoofing argument, which is the successor to the now-deprecated enable_smart_spoofing. This argument allows consumers to smart-spoof when safe (equivalent to enable_smart_spoofing=True), always spoof (enable_smart_spoofing=False) or to never spoof.

    Consumers should move to this and the new equivalent Django setting, settings.DJBLETS_EMAIL_FROM_SPOOFING.

    Based on work by Brian LeBlanc.

djblets.webapi

  • Improved the capabilities for API test suites.

    WebAPITestCaseMixin now has a better, more standardized, documented set of arguments for the various API testing methods, helping to create test suites for API resources.

    Each testing method has gained an expected_num_queries parameter for checking that the API handler made a specific number of SQL queries, helping keep APIs lean.

    All the testing methods now wrap api_call(), which can be used to test other HTTP methods. It can also be overridden to provide custom behavior.

    Note that this deprecates the query= argument to these methods. data= should be used in its place.

Contributors

  • Brian LeBlanc
  • Christian Hammond
  • David Trowbridge
  • Florie Cai