Fiscalyear

Latest version: v0.4.0

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.0

This release contains backwards-incompatible changes, new features, and bug fixes. FiscalYear now requires Python 3.6+. If you need Python 2 support, use the 0.3.2 release.

Backwards-incompatible Changes

* `quarter`, `prev_quarter`, and `next_quarter`, which were deprecated in FiscalYear 0.3.0, have now been removed, please use `fiscal_quarter`, `prev_fiscal_quarter`, and `next_fiscal_quarter` instead
* Many classes and functions that used to accept either an int or an int-like string now only accept an int (28)
* Python 2 support has been dropped (26)

New Features

* FiscalYear now includes type hints for 100% of the library, use mypy to check your code (28)

Bug Fixes

* Warnings code does not affect other libraries (22)
* All classes are now hashable (24)

Contributors

This release is thanks to the following contributors:

* further-reading removed code that changed the default warnings behavior (22)
* pala1212 added hash support for all classes (24)

0.3.2

This release is backwards compatible with v0.3.0 and v0.3.1, but adds one important bug fix.

Bug Fixes

* Fix handling of `fiscal_month` when `START_DAY` is not 1 (18, 19)

Contributors

This release is almost entirely thanks to the following contributor:

* jbb04 reported the bug with `fiscal_month`

0.3.1

This release is backwards compatible with v0.3.0, but adds one important bug fix.

Bug Fixes

* Fix handling of `fiscal_day` for leap years (15, 16)

Contributors

This release is entirely thanks to the following contributor:

* nicmendoza reported and fixed the bug with `fiscal_day`

0.3.0

This release is backwards compatible with v0.2.0, but adds several new features and deprecations.

New Features

* New `FiscalMonth` and `FiscalDay` classes (11, 12, 13, 14)
* Uploaded wheels to PyPI
* Switched from Travis CI to GitHub Actions
* Added flake8 and black style checking
* Various improvements to documentation

Deprecations

* `quarter`, `prev_quarter`, and `next_quarter` are now deprecated, please use `fiscal_quarter`, `prev_fiscal_quarter`, and `next_fiscal_quarter` instead.

The goal of this deprecation is to bring consistency to the class attributes. `datetime` already has builtin `year`, `month`, and `day` attributes, so we have to use `fiscal_year`, `fiscal_month`, and `fiscal_day` for the fiscal versions in `FiscalDateTime`. Might as well use `fiscal_quarter` too.

There is still quite a bit of inconsistency in the return types of these attributes. They may change in the future.

Contributors

This release is almost entirely thanks to the following new contributor:

* nicmendoza added `FiscalMonth`, `FiscalDay`, and documentation for these classes

0.2.0

This release is backwards compatible with v0.1.0, but adds several new features and fixes some minor bugs.

New Features

* New `FiscalYear.current()` and `FiscalQuarter.current()` class constructors (4)
* Test dependency on `pytest-mock` has been added (4)
* New `setup_fiscal_calendar` function to change start date of fiscal calendar (5)
* Python 3.7 and 3.8 are now tested, although they always worked

The benefit of `setup_fiscal_calendar` is that it validates your input. Direct modification of `fiscalyear` global variables is now discouraged and support may be dropped in a future release.

Bug Fixes

* License file is now uploaded to PyPI tarball, needed for conda-forge (7)
* Corner case where fiscal calendar starting at the end of the month could crash is fixed (8)

Contributors

This release is almost entirely thanks to the following new contributors:

* pmav99 opened multiple issues and submitted multiple new feature PRs
* CurtLH added `fiscalyear` to [conda-forge](https://anaconda.org/conda-forge/fiscalyear)
* jmhansen reported a bug that could cause `fiscalyear` to crash for some fiscal calendars

0.1.0

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.