• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mithro / python-datetime-tz / 112
89%
master: 89%

Build:
Build:
LAST BUILD BRANCH: py38
DEFAULT BRANCH: master
Ran 20 Mar 2020 02:39PM UTC
Jobs 4
Files 5
Run time 20s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
112

Pull #28

travis-ci-com

web-flow
Changes introduced in https://bugs.python.org/issue32417 for python 3.8 changed the datetime arithmetic functions to return instances of the same class as the instance, instead of new datetime.datetime instances.

See the "What's new notes":
Arithmetic operations between subclasses of datetime.date or datetime.datetime and datetime.timedelta objects now return an instance of the subclass, rather than the base class. This also affects the return type of operations whose implementation (directly or indirectly) uses datetime.timedelta arithmetic, such as astimezone(). (Contributed by Paul Ganssle in bpo-32417.)

Unfortunately, the side-effect of this change was to end up calling datetime_tz.__new__ with the set of arguments that result in tzinfo.localize being called on the result instead of tzinfo.normalize. This changed the resulting answer, in particular where DST transitions were involved. The testAroundDst were failing with python 3.8 before this change.

The fix makes it behave in the same way as it did before - where a datetime.datetime object is return from the arithmetic result and then passed to the datetime_tz constructor.

The other functions that do something similar work in the same way (e.g. astimezone).
Pull Request #28: Fix DST arithmetic issues introduced as a side effect of python 3.8 change https://bugs.python.org/issue32417

1 of 1 new or added line in 1 file covered. (100.0%)

553 of 620 relevant lines covered (89.19%)

3.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 112.1 20 Mar 2020 02:39PM UTC 0
88.57
Travis Job 112.1
2 112.2 20 Mar 2020 02:39PM UTC 0
88.39
Travis Job 112.2
3 112.3 20 Mar 2020 02:39PM UTC 0
88.39
Travis Job 112.3
4 112.4 20 Mar 2020 02:39PM UTC 0
88.34
Travis Job 112.4
Source Files on build 112
  • Tree
  • List 0
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Build #112
  • Pull Request #28
  • PR Base - master (#110)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc