summaryrefslogtreecommitdiff
path: root/tests/utils_tests
AgeCommit message (Collapse)Author
2023-02-01[4.1.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main.
2022-05-11Refs #33173 -- Removed use of deprecated cgi module.Carlton Gibson
https://peps.python.org/pep-0594/#cgi
2022-05-09Refs #33173 -- Fixed test_dateparse tests on Python 3.11+.Mariusz Felisiak
date/datetime/time.fromisoformat() support any valid ISO 8601 format in Python 3.11+, see https://github.com/python/cpython/issues/80010.
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-03-17Prevented initialization of unused database connections.Florian Apolloner
2022-03-08Rewrote strip_tags test file to lorem ipsum.Adam Johnson
2022-03-08Refs #33173 -- Used locale.getlocale() instead of getdefaultlocale().Mariusz Felisiak
locale.getdefaultlocale() was deprecated in Python 3.11, see https://bugs.python.org/issue46659.
2022-02-21Fixed #20296 -- Prevented mark_safe() from evaluating lazy objects.Theo Alexiou
2022-02-17Refs #28358 -- Fixed infinite recursion in LazyObject.__getattribute__().Matthias Kestenholz
Regression in 97d7990abde3fe4b525ae83958fd0b52d6a1d13f. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Theo Alexiou <theofilosalexiou@gmail.com>
2022-02-16Fixed #28358 -- Prevented LazyObject from mimicking nonexistent attributes.Theo Alexiou
Thanks Sergey Fedoseev for the initial patch.
2022-02-10Fixed #26287 -- Added support for addition operations to SimpleLazyObject.Theo Alexiou
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-29Fixed #33465 -- Added empty __slots__ to SafeString and SafeData.Keryn Knight
Despite inheriting from the str type, every SafeString instance gains an empty __dict__ due to the normal, expected behaviour of type subclassing in Python. Adding __slots__ to SafeData is necessary, because otherwise inheriting from that (as SafeString does) will give it a __dict__ and negate the benefit added by modifying SafeString.
2022-01-07Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.Ad Timmering
2022-01-04Refs #33216 -- Made @deconstructible do not change path for subclasses.Allen Jonathan David
2022-01-04Refs #21275 -- Added more tests for @deconstructible decorator.Allen Jonathan David
2021-12-20Fixed #33368 -- Fixed parse_duration() crash on invalid separators for ↵mendespedro
decimal fractions.
2021-12-16Fixed #30127 -- Deprecated name argument of cached_property().mgaligniana
2021-12-14Fixed unescape_string_literal() crash on empty strings.Florian Apolloner
2021-12-14Added test for ValueErrors in unescape_string_literal().Florian Apolloner
2021-12-02Updated various links to HTTPS and new locations.Mariusz Felisiak
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-11-22Fixed #33302 -- Made element_id optional argument for json_script template ↵Baptiste Mispelon
filter. Added versionchanged note in documentation
2021-09-29Fixed #33027 -- Made autoreloader pass -X options.Chenyang Yan
2021-09-16Refs #32074 -- Fixed find_module()/find_loader() warnings on Python 3.10+.Mariusz Felisiak
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-09-14Fixed #32873 -- Deprecated settings.USE_L10N.Claude Paroz
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-08-30Fixed #32992 -- Restored offset extraction for fixed offset timezones.Carlton Gibson
Regression in 10d126198434810529e0220b0c6896ed64ca0e88.
2021-08-19Fixed #32994 -- Fixed autoreloader tests when using 'python -m'.Jonny Park
2021-07-30Refs #32956 -- Updated words ending in -wards.David Smith
AP styleguide: Virtually none of the words ending with -wards end with an s.
2021-07-29Fixed 32956 -- Lowercased spelling of "web" and "web framework" where ↵David Smith
appropriate.
2021-07-23Fixed #32913 -- Made watchman reloader tests less flaky.Nick Pope
2021-07-13Completed test coverage for django.utils.dateformat.Nick Pope
2021-07-13Used subTest() in utils_tests.test_dateformat.Nick Pope
2021-07-07Fixed #32904 -- Made parse_time() more strict.abhiabhi94
Thanks Keryn Knight for the report.
2021-07-07Fixed #32866 -- Fixed trimming trailing punctuation from escaped string in ↵Shipeng Feng
urlize().
2021-07-06Added more tests for parse_time().Keryn Knight
2021-06-24Fixed #32727 -- Allowed spaces before time zone offset in parse_datetime().Ben Wilber
2021-06-07Fixed #32821 -- Updated os.scandir() uses to use a context manager.Chris Jerdonek
2021-05-26Fixed #32669 -- Fixed detection when started non-django modules which aren't ↵Moriyoshi Koizumi
packages with "python -m" in autoreloader.
2021-05-26Fixed #32783 -- Fixed crash of autoreloader when __main__ module doesn't ↵Mariusz Felisiak
have __spec__ attribute. Regression in ec6d2531c59466924b645f314ac33f54470d7ac3. Thanks JonathanNickelson for the report.
2021-05-13Fixed #32717 -- Fixed filtering of querysets combined with the | operator.Simon Charette
Address a long standing bug in a Where.add optimization to discard equal nodes that was surfaced by implementing equality for Lookup instances in bbf141bcdc31f1324048af9233583a523ac54c94. Thanks Shaheed Haque for the report.
2021-05-12Fixed #32738 -- Deprecated django.utils.datetime_safe module.Nick Pope
2021-05-12Refs #32738, Refs #29600, Refs #29595 -- Removed unused ↵Nick Pope
django.utils.datetime_safe.time(). Unused since c72dde41e603093ab0bb12fa24fa69cfda0d35f9.
2021-05-12Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
2021-05-12Fixed #32735 -- Made DateFormat.Y() return a zero-padded year.Nick Pope
2021-05-07Fixed #32712 -- Deprecated django.utils.baseconv module.Hasan Ramezani
2021-05-04Refs #32074 -- Removed usage of deprecated Thread.setDaemon().Karthikeyan Singaravelan
Thread.setDaemon() was deprecated in Python 3.10 and will be removed in Python 3.12.
2021-05-04Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads.Florian Apolloner
2021-04-10Fixed #31937 -- Eased translation of time strings in some languages.Claude Paroz