myusuf3 / delorean

Delorean: Time Travel Made Easy
http://delorean.rtfd.org/
MIT License
1.84k stars 128 forks source link

Pip package is not updated #100

Closed dhararon closed 6 years ago

dhararon commented 6 years ago

Hi @myusuf3,

I was trying to used "replace" function but the last pip package 0.6.0 does not exists that code.

This line is missing: https://github.com/myusuf3/delorean/blob/master/delorean/dates.py#L553 But in the pip package is screen shot 2017-10-19 at 12 11 53 pm

whw commented 6 years ago

I believe I am also running into this issue:

This test:

    def test_replace(self):
        d = Delorean(datetime=datetime.datetime(2015, 1, 1, 12, 15), timezone='UTC')
        d.replace(hour=8)

        assert Delorean(datetime=datetime.datetime(2015, 1, 1, 8, 15), timezone='UTC') == d

fails with this problem:

self = Delorean(datetime=datetime.datetime(2015, 1, 1, 12, 15), timezone='UTC')
name = 'replace'

    def __getattr__(self, name):
        """
            Implement __getattr__ to call `shift_date` function when function
            called does not exist
            """
        func_parts = name.split('_')
        # is the func we are trying to call the right length?
        if len(func_parts) != 2:
>           raise AttributeError
E           AttributeError

Context

Python 3.6.1 :: Continuum Analytics, Inc Delorean 0.6.0 (installed via pip)

myusuf3 commented 6 years ago

https://pypi.python.org/pypi/Delorean/1.0.0

I cut a new release with all the fixes! ✨