Git Product home page Git Product logo

tz-canary's Issues

Get rid of pytz

As of Python 3.9, timezone info is included in Python, so we should be able to get rid of this dependency.

Projects using Python 3.9 or later should be using the support now included as part of the standard library, and third party packages work with it such as tzdata. pytz offers no advantages beyond backwards compatibility with code written for earlier versions of Python.

Deprecation Warnings for `pd.date_range` using 'T'

Description:

While running the test suite, multiple warnings are triggered due to the use of 'T' as a frequency alias in pd.date_range(). According to the warnings, 'T' is deprecated and will be removed in a future version of pandas. The recommended alternative is to use 'min'.

Affected Code:

The warnings originate from the following lines in tests/fixtures/dt_index_fixtures.py:

  1. Line 7:

    return pd.date_range(..., freq='<x>T')

    Warning:

    FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
    
  2. Line 14:

    return pd.date_range(..., freq='<x>T')

    Warning:

    FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
    
  3. Line 21:

    return pd.date_range(..., freq='<x>T')

    Warning:

    FutureWarning: 'T' is deprecated and will be removed in a future version, please use 'min' instead.
    

Steps to Reproduce:

  1. Run the test suite using the command: python -m pytest.
  2. Observe the warnings related to the use of pd.date_range.

Proposed Solution:

Replace all instances of freq='<x>T' with freq='<x>min' in tests/fixtures/dt_index_fixtures.py to address the deprecation warnings and future-proof the code.

Environment:

  • OS: macOS
  • Python version: 3.11.7
  • pytest version: 7.4.0
  • pandas version: 2.2.2

Additional Information:

All tests currently pass (16 passed), but the warnings suggest this issue will cause future failures when the deprecated functionality is removed from pandas.

Add matrix testing + support for Python 3.9, 3.10

Currently only supporting Python 3.11 because that's all I've tested on, but supporting 3.9+ should be easy enough.

To do:

  • Set up testing matrix (tox or GitHub CI)
  • Fix any potential issues with Python 3.9 and 3.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.