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

rcrdnalor noreply at github.com
Wed Jun 10 17:38:39 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 24db137ee6435ae0f1ecc51c580ef1b3d5936402
      https://github.com/MythTV/mythtv/commit/24db137ee6435ae0f1ecc51c580ef1b3d5936402
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-10 (Wed, 10 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


  Commit: 968712b9280b7220d73a44da709cbed655f1ee0a
      https://github.com/MythTV/mythtv/commit/968712b9280b7220d73a44da709cbed655f1ee0a
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-10 (Wed, 10 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.


  Commit: e3f7f092fde8a81cfa8de2a808ce64cc3fa1d83c
      https://github.com/MythTV/mythtv/commit/e3f7f092fde8a81cfa8de2a808ce64cc3fa1d83c
  Author: Roland Ernst <rcrernst at gmail.com>
  Date:   2020-06-10 (Wed, 10 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.


Compare: https://github.com/MythTV/mythtv/compare/b8b2690a79d7...e3f7f092fde8


More information about the mythtv-commits mailing list