[mythtv-commits] [MythTV/mythtv] d8ecd8: Python: fix timestamp calculation

rcrdnalor noreply at github.com
Mon Jun 15 18:44:41 UTC 2020


  Branch: refs/heads/fixes/31
  Home:   https://github.com/MythTV/mythtv
  Commit: d8ecd8fe7c85165fe3c818a6d07e7ca9472e7735
      https://github.com/MythTV/mythtv/commit/d8ecd8fe7c85165fe3c818a6d07e7ca9472e7735
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mythtv/bindings/python/MythTV/utility/dt.py

  Log Message:
  -----------
  Python: fix timestamp calculation

Python 3.8 changed the handling of the 'datetime' class:
According release notes ("What's New In Python 3.8"):
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 caused an error in the calculation of a 'timestamp'.

Tested with python2.7, python3.6 and python3.8.
No other occurences of similar arithmetic operations identified.

Fixes #13622

(cherry picked from commit 24db137ee6435ae0f1ecc51c580ef1b3d5936402)


  Commit: 4c990647889687b5a5ee5951d289a5f0777dda90
      https://github.com/MythTV/mythtv/commit/4c990647889687b5a5ee5951d289a5f0777dda90
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mythtv/bindings/python/MythTV/_conn_mysqldb.py

  Log Message:
  -----------
  Set MySQL Mode explicitely when starting a session

Newer SQL server enable the 'strict' MySQL Modes
"STRICT_TRANS_TABLES" and/or "STRICT_ALL_TABLES",
which cause an error on committing to tables with fields,
having no default value defined.

An example: table "jobqueue", field "args", type "blob".

This change sets explicitely the "SQL Mode" per python session
like 'libmythbase' does it.

Tested with python2.7, python3.6 and python3.8.

(cherry picked from commit 968712b9280b7220d73a44da709cbed655f1ee0a)


  Commit: 134ebd7b2938dfede4a916932e52146cf66c4a9c
      https://github.com/MythTV/mythtv/commit/134ebd7b2938dfede4a916932e52146cf66c4a9c
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mythtv/bindings/python/MythTV/altdict.py
    M mythtv/bindings/python/MythTV/utility/dequebuffer.py

  Log Message:
  -----------
  Python: Resolve deprecation warnings

Python3.8 shows a couple of deprecation warnings when running
with the "-Wall" switch:

The method locale.format() will be removed in a future version of Python.
Use 'locale.format_string()' instead.

DeprecationWarning: isAlive() is deprecated, use is_alive() instead.

Tested with python2.7, python3.6 and python3.8.

(cherry picked from commit e3f7f092fde8a81cfa8de2a808ce64cc3fa1d83c)


Compare: https://github.com/MythTV/mythtv/compare/0d8e6f1b14e6...134ebd7b2938


More information about the mythtv-commits mailing list