Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-17433

Revise use of pytz in Python >= 3.9

    XMLWordPrintableJSON

Details

    • Code Clarity
    • Low Hanging Fruit
    • All
    • None
    • Hide

      Test locally using python version >= 3.9, updated and ran 'test_timestamp_output' test from 'test_cqlsh_output.py'

      Show
      Test locally using python version >= 3.9, updated and ran 'test_timestamp_output' test from 'test_cqlsh_output.py'

    Description

      PEP 615 – Support for the IANA Time Zone Database in the Standard Library class ZoneInfo

      PEP 615 (Python 3.9) has obsoleted the 3rd party Olsen tz library 'pytz' with support for the IANA Time Zone Database.  The code which imports this in cqlshmain.py and tests in test_cqlsh_output.py should be updated accordingly.

      This can be done with something like:

      if sys.version_info >= (3,9):

          try:

              import zoneinfo

      else:

          try:

              import pytz

              ...

      Attachments

        Issue Links

          Activity

            People

              lmtrombone Leonard Ma
              bschoeni Brad Schoening
              Leonard Ma
              Brad Schoening, Brandon Williams, Stefan Miklosovic
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m