matplotlib-rs 0.0.8__cp315-cp315-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docs/releases/0.0.1.md +268 -0
- docs/releases/0.0.2.md +69 -0
- docs/releases/0.0.3.md +80 -0
- docs/releases/0.0.4.md +73 -0
- docs/releases/0.0.5.md +24 -0
- docs/releases/0.0.6.md +24 -0
- docs/releases/0.0.7.md +24 -0
- docs/releases/0.0.8.md +16 -0
- licenses/LICENSE_CONTOURPY +29 -0
- licenses/LICENSE_CYCLER +27 -0
- licenses/LICENSE_DATEUTIL +54 -0
- licenses/LICENSE_KIWISOLVER +71 -0
- licenses/LICENSE_LIBWEBP +56 -0
- licenses/LICENSE_MATPLOTLIB +1253 -0
- licenses/LICENSE_PYPARSING +20 -0
- licenses/LICENSE_QHULL +39 -0
- licenses/LICENSE_SIX +18 -0
- matplotlib_rs/__init__.py +1683 -0
- matplotlib_rs/__main__.py +27 -0
- matplotlib_rs/_afm.py +500 -0
- matplotlib_rs/_animation_data.py +263 -0
- matplotlib_rs/_api/__init__.py +495 -0
- matplotlib_rs/_api/deprecation.py +534 -0
- matplotlib_rs/_axis_py.py +2991 -0
- matplotlib_rs/_blocking_input.py +31 -0
- matplotlib_rs/_cm.py +1500 -0
- matplotlib_rs/_cm_bivar.py +1289 -0
- matplotlib_rs/_cm_listed.py +2848 -0
- matplotlib_rs/_cm_multivar.py +167 -0
- matplotlib_rs/_color_data.py +1142 -0
- matplotlib_rs/_colormap.py +132 -0
- matplotlib_rs/_constrained_layout.py +825 -0
- matplotlib_rs/_contour.py +108 -0
- matplotlib_rs/_doc_cache.py +12214 -0
- matplotlib_rs/_docstring.py +142 -0
- matplotlib_rs/_enums.py +178 -0
- matplotlib_rs/_figure_rs.py +294 -0
- matplotlib_rs/_fontconfig_pattern.py +129 -0
- matplotlib_rs/_foreign.py +220 -0
- matplotlib_rs/_hook.py +94 -0
- matplotlib_rs/_image.py +160 -0
- matplotlib_rs/_imageio.py +229 -0
- matplotlib_rs/_internal_utils.py +65 -0
- matplotlib_rs/_kiwi.py +484 -0
- matplotlib_rs/_layoutgrid.py +549 -0
- matplotlib_rs/_live.py +192 -0
- matplotlib_rs/_mathtext.py +3103 -0
- matplotlib_rs/_mathtext_data.py +1811 -0
- matplotlib_rs/_mplrs.cp315-win_amd64.pyd +0 -0
- matplotlib_rs/_path.py +25 -0
- matplotlib_rs/_png.py +162 -0
- matplotlib_rs/_pylab_helpers.py +137 -0
- matplotlib_rs/_qhull.py +66 -0
- matplotlib_rs/_rcpush.py +84 -0
- matplotlib_rs/_spines_rs.py +108 -0
- matplotlib_rs/_style_helpers.py +52 -0
- matplotlib_rs/_text_helpers.py +51 -0
- matplotlib_rs/_tight_bbox.py +85 -0
- matplotlib_rs/_tight_layout.py +302 -0
- matplotlib_rs/_tri.py +140 -0
- matplotlib_rs/_type1font.py +1228 -0
- matplotlib_rs/_vendor/__init__.py +8 -0
- matplotlib_rs/_vendor/cycler.py +574 -0
- matplotlib_rs/_vendor/dateutil/__init__.py +27 -0
- matplotlib_rs/_vendor/dateutil/_common.py +44 -0
- matplotlib_rs/_vendor/dateutil/_tzdata_impl.py +148 -0
- matplotlib_rs/_vendor/dateutil/_version.py +5 -0
- matplotlib_rs/_vendor/dateutil/easter.py +90 -0
- matplotlib_rs/_vendor/dateutil/parser/__init__.py +62 -0
- matplotlib_rs/_vendor/dateutil/parser/_parser.py +1614 -0
- matplotlib_rs/_vendor/dateutil/parser/isoparser.py +417 -0
- matplotlib_rs/_vendor/dateutil/relativedelta.py +597 -0
- matplotlib_rs/_vendor/dateutil/rrule.py +1765 -0
- matplotlib_rs/_vendor/dateutil/tz/__init__.py +61 -0
- matplotlib_rs/_vendor/dateutil/tz/_common.py +420 -0
- matplotlib_rs/_vendor/dateutil/tz/_factories.py +81 -0
- matplotlib_rs/_vendor/dateutil/tz/_tzfile.py +1429 -0
- matplotlib_rs/_vendor/dateutil/tz/_tzpath.py +105 -0
- matplotlib_rs/_vendor/dateutil/tz/tz.py +1473 -0
- matplotlib_rs/_vendor/dateutil/tz/win.py +371 -0
- matplotlib_rs/_vendor/dateutil/tzwin.py +3 -0
- matplotlib_rs/_vendor/dateutil/utils.py +72 -0
- matplotlib_rs/_vendor/dateutil/zoneinfo/__init__.py +234 -0
- matplotlib_rs/_vendor/pyparsing/__init__.py +414 -0
- matplotlib_rs/_vendor/pyparsing/actions.py +265 -0
- matplotlib_rs/_vendor/pyparsing/common.py +571 -0
- matplotlib_rs/_vendor/pyparsing/core.py +6973 -0
- matplotlib_rs/_vendor/pyparsing/exceptions.py +354 -0
- matplotlib_rs/_vendor/pyparsing/helpers.py +1770 -0
- matplotlib_rs/_vendor/pyparsing/results.py +929 -0
- matplotlib_rs/_vendor/pyparsing/testing.py +399 -0
- matplotlib_rs/_vendor/pyparsing/unicode.py +357 -0
- matplotlib_rs/_vendor/pyparsing/util.py +515 -0
- matplotlib_rs/_vendor/pyparsing/warnings.py +11 -0
- matplotlib_rs/_vendor/six.py +1004 -0
- matplotlib_rs/animation.py +1843 -0
- matplotlib_rs/artist.py +2302 -0
- matplotlib_rs/axes/__init__.py +19 -0
- matplotlib_rs/axes/_axes.py +9402 -0
- matplotlib_rs/axes/_bar.py +185 -0
- matplotlib_rs/axes/_base.py +5236 -0
- matplotlib_rs/axes/_base_rs.py +727 -0
- matplotlib_rs/axes/_boxplot.py +391 -0
- matplotlib_rs/axes/_hist.py +99 -0
- matplotlib_rs/axes/_secondary_axes.py +357 -0
- matplotlib_rs/axis.py +1963 -0
- matplotlib_rs/backend_bases.py +3760 -0
- matplotlib_rs/backend_managers.py +388 -0
- matplotlib_rs/backend_tools.py +1002 -0
- matplotlib_rs/backends/__init__.py +6 -0
- matplotlib_rs/backends/_backend_pdf_ps.py +451 -0
- matplotlib_rs/backends/backend_agg.py +552 -0
- matplotlib_rs/backends/backend_mixed.py +123 -0
- matplotlib_rs/backends/backend_pdf.py +2711 -0
- matplotlib_rs/backends/backend_pgf.py +1031 -0
- matplotlib_rs/backends/backend_ps.py +1491 -0
- matplotlib_rs/backends/backend_svg.py +1395 -0
- matplotlib_rs/backends/backend_template.py +214 -0
- matplotlib_rs/backends/registry.py +423 -0
- matplotlib_rs/bezier.py +691 -0
- matplotlib_rs/category.py +236 -0
- matplotlib_rs/cbook.py +2762 -0
- matplotlib_rs/cm.py +251 -0
- matplotlib_rs/collections.py +2711 -0
- matplotlib_rs/colorbar.py +1586 -0
- matplotlib_rs/colorizer.py +909 -0
- matplotlib_rs/colors.py +4278 -0
- matplotlib_rs/container.py +256 -0
- matplotlib_rs/contour.py +1756 -0
- matplotlib_rs/dates.py +1847 -0
- matplotlib_rs/dviread.py +1386 -0
- matplotlib_rs/figure.py +3815 -0
- matplotlib_rs/font_manager.py +1855 -0
- matplotlib_rs/ft2font.py +515 -0
- matplotlib_rs/gridspec.py +808 -0
- matplotlib_rs/hatch.py +244 -0
- matplotlib_rs/image.py +1863 -0
- matplotlib_rs/inset.py +291 -0
- matplotlib_rs/layout_engine.py +310 -0
- matplotlib_rs/legend.py +1480 -0
- matplotlib_rs/legend_handler.py +812 -0
- matplotlib_rs/lines.py +1886 -0
- matplotlib_rs/markers.py +908 -0
- matplotlib_rs/mathtext.py +141 -0
- matplotlib_rs/mlab.py +959 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-BoldOblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans-Oblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSans.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansDisplay.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-BoldOblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono-Oblique.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSansMono.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Bold.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-BoldItalic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif-Italic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerif.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/DejaVuSerifDisplay.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/LICENSE_DEJAVU +99 -0
- matplotlib_rs/mpl-data/fonts/ttf/LICENSE_STIX +124 -0
- matplotlib_rs/mpl-data/fonts/ttf/LastResortHE-Regular.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneral.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralBolIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXGeneralItalic.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUni.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniBolIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXNonUniIta.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFiveSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizFourSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizOneSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizThreeSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymBol.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/STIXSizTwoSymReg.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmb10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmex10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmmi10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmr10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmss10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmsy10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmti10.ttf +0 -0
- matplotlib_rs/mpl-data/fonts/ttf/cmtt10.ttf +0 -0
- matplotlib_rs/mpl-data/images/back-symbolic.svg +46 -0
- matplotlib_rs/mpl-data/images/back.pdf +0 -0
- matplotlib_rs/mpl-data/images/back.png +0 -0
- matplotlib_rs/mpl-data/images/back.svg +46 -0
- matplotlib_rs/mpl-data/images/back_large.png +0 -0
- matplotlib_rs/mpl-data/images/filesave-symbolic.svg +68 -0
- matplotlib_rs/mpl-data/images/filesave.pdf +72 -0
- matplotlib_rs/mpl-data/images/filesave.png +0 -0
- matplotlib_rs/mpl-data/images/filesave.svg +68 -0
- matplotlib_rs/mpl-data/images/filesave_large.png +0 -0
- matplotlib_rs/mpl-data/images/forward-symbolic.svg +46 -0
- matplotlib_rs/mpl-data/images/forward.pdf +0 -0
- matplotlib_rs/mpl-data/images/forward.png +0 -0
- matplotlib_rs/mpl-data/images/forward.svg +46 -0
- matplotlib_rs/mpl-data/images/forward_large.png +0 -0
- matplotlib_rs/mpl-data/images/hand.pdf +0 -0
- matplotlib_rs/mpl-data/images/hand.png +0 -0
- matplotlib_rs/mpl-data/images/hand.svg +130 -0
- matplotlib_rs/mpl-data/images/help-symbolic.svg +52 -0
- matplotlib_rs/mpl-data/images/help.pdf +71 -0
- matplotlib_rs/mpl-data/images/help.png +0 -0
- matplotlib_rs/mpl-data/images/help.svg +52 -0
- matplotlib_rs/mpl-data/images/help_large.png +0 -0
- matplotlib_rs/mpl-data/images/home-symbolic.svg +59 -0
- matplotlib_rs/mpl-data/images/home.pdf +0 -0
- matplotlib_rs/mpl-data/images/home.png +0 -0
- matplotlib_rs/mpl-data/images/home.svg +59 -0
- matplotlib_rs/mpl-data/images/home_large.png +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.pdf +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.png +0 -0
- matplotlib_rs/mpl-data/images/matplotlib.svg +3171 -0
- matplotlib_rs/mpl-data/images/matplotlib_large.png +0 -0
- matplotlib_rs/mpl-data/images/move-symbolic.svg +73 -0
- matplotlib_rs/mpl-data/images/move.pdf +0 -0
- matplotlib_rs/mpl-data/images/move.png +0 -0
- matplotlib_rs/mpl-data/images/move.svg +73 -0
- matplotlib_rs/mpl-data/images/move_large.png +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.pdf +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.png +0 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options.svg +48 -0
- matplotlib_rs/mpl-data/images/qt4_editor_options_large.png +0 -0
- matplotlib_rs/mpl-data/images/subplots-symbolic.svg +81 -0
- matplotlib_rs/mpl-data/images/subplots.pdf +0 -0
- matplotlib_rs/mpl-data/images/subplots.png +0 -0
- matplotlib_rs/mpl-data/images/subplots.svg +81 -0
- matplotlib_rs/mpl-data/images/subplots_large.png +0 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect-symbolic.svg +40 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.pdf +69 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.png +0 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect.svg +40 -0
- matplotlib_rs/mpl-data/images/zoom_to_rect_large.png +0 -0
- matplotlib_rs/mpl-data/kpsewhich.lua +4 -0
- matplotlib_rs/mpl-data/matplotlibrc +849 -0
- matplotlib_rs/mpl-data/plot_directive/plot_directive.css +16 -0
- matplotlib_rs/mpl-data/sample_data/Minduka_Present_Blue_Pack.png +0 -0
- matplotlib_rs/mpl-data/sample_data/README.txt +2 -0
- matplotlib_rs/mpl-data/sample_data/Stocks.csv +526 -0
- matplotlib_rs/mpl-data/sample_data/axes_grid/bivariate_normal.npy +0 -0
- matplotlib_rs/mpl-data/sample_data/data_x_x2_x3.csv +11 -0
- matplotlib_rs/mpl-data/sample_data/eeg.dat +0 -0
- matplotlib_rs/mpl-data/sample_data/embedding_in_wx3.xrc +65 -0
- matplotlib_rs/mpl-data/sample_data/goog.npz +0 -0
- matplotlib_rs/mpl-data/sample_data/grace_hopper.jpg +0 -0
- matplotlib_rs/mpl-data/sample_data/jacksboro_fault_dem.npz +0 -0
- matplotlib_rs/mpl-data/sample_data/logo2.png +0 -0
- matplotlib_rs/mpl-data/sample_data/membrane.dat +0 -0
- matplotlib_rs/mpl-data/sample_data/msft.csv +66 -0
- matplotlib_rs/mpl-data/sample_data/s1045.ima.gz +0 -0
- matplotlib_rs/mpl-data/sample_data/topobathy.npz +0 -0
- matplotlib_rs/mpl-data/stylelib/Solarize_Light2.mplstyle +53 -0
- matplotlib_rs/mpl-data/stylelib/_classic_test_patch.mplstyle +8 -0
- matplotlib_rs/mpl-data/stylelib/_mpl-gallery-nogrid.mplstyle +19 -0
- matplotlib_rs/mpl-data/stylelib/_mpl-gallery.mplstyle +19 -0
- matplotlib_rs/mpl-data/stylelib/bmh.mplstyle +27 -0
- matplotlib_rs/mpl-data/stylelib/classic.mplstyle +491 -0
- matplotlib_rs/mpl-data/stylelib/dark_background.mplstyle +26 -0
- matplotlib_rs/mpl-data/stylelib/fast.mplstyle +11 -0
- matplotlib_rs/mpl-data/stylelib/fivethirtyeight.mplstyle +37 -0
- matplotlib_rs/mpl-data/stylelib/ggplot.mplstyle +39 -0
- matplotlib_rs/mpl-data/stylelib/grayscale.mplstyle +29 -0
- matplotlib_rs/mpl-data/stylelib/petroff10.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/petroff6.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/petroff8.mplstyle +5 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-bright.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-colorblind.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark-palette.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-deep.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-muted.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-notebook.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-paper.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-pastel.mplstyle +3 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-poster.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-talk.mplstyle +21 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-white.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle +30 -0
- matplotlib_rs/mpl-data/stylelib/seaborn-v0_8.mplstyle +57 -0
- matplotlib_rs/mpl-data/stylelib/tableau-colorblind10.mplstyle +3 -0
- matplotlib_rs/mpl_toolkits/__init__.py +3 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/__init__.py +11 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/anchored_artists.py +415 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_divider.py +619 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_grid.py +565 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_rgb.py +158 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/axes_size.py +272 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/inset_locator.py +525 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/mpl_axes.py +129 -0
- matplotlib_rs/mpl_toolkits/axes_grid1/parasite_axes.py +261 -0
- matplotlib_rs/mpl_toolkits/axisartist/__init__.py +15 -0
- matplotlib_rs/mpl_toolkits/axisartist/angle_helper.py +396 -0
- matplotlib_rs/mpl_toolkits/axisartist/axes_divider.py +3 -0
- matplotlib_rs/mpl_toolkits/axisartist/axis_artist.py +1148 -0
- matplotlib_rs/mpl_toolkits/axisartist/axisline_style.py +193 -0
- matplotlib_rs/mpl_toolkits/axisartist/axislines.py +475 -0
- matplotlib_rs/mpl_toolkits/axisartist/floating_axes.py +265 -0
- matplotlib_rs/mpl_toolkits/axisartist/grid_finder.py +329 -0
- matplotlib_rs/mpl_toolkits/axisartist/grid_helper_curvelinear.py +353 -0
- matplotlib_rs/mpl_toolkits/axisartist/parasite_axes.py +8 -0
- matplotlib_rs/mpl_toolkits/mplot3d/__init__.py +4 -0
- matplotlib_rs/mpl_toolkits/mplot3d/art3d.py +1758 -0
- matplotlib_rs/mpl_toolkits/mplot3d/axes3d.py +4462 -0
- matplotlib_rs/mpl_toolkits/mplot3d/axis3d.py +807 -0
- matplotlib_rs/mpl_toolkits/mplot3d/proj3d.py +270 -0
- matplotlib_rs/offsetbox.py +1726 -0
- matplotlib_rs/patches.py +5049 -0
- matplotlib_rs/path.py +1147 -0
- matplotlib_rs/patheffects.py +512 -0
- matplotlib_rs/projections/__init__.py +126 -0
- matplotlib_rs/projections/geo.py +512 -0
- matplotlib_rs/projections/polar.py +1518 -0
- matplotlib_rs/pylab.py +68 -0
- matplotlib_rs/pyplot.py +4834 -0
- matplotlib_rs/quiver.py +1236 -0
- matplotlib_rs/rcsetup.py +3435 -0
- matplotlib_rs/sankey.py +815 -0
- matplotlib_rs/scale.py +1002 -0
- matplotlib_rs/spines.py +618 -0
- matplotlib_rs/stackplot.py +144 -0
- matplotlib_rs/streamplot.py +768 -0
- matplotlib_rs/style/__init__.py +269 -0
- matplotlib_rs/style/core.py +28 -0
- matplotlib_rs/table.py +860 -0
- matplotlib_rs/texmanager.py +375 -0
- matplotlib_rs/text.py +2412 -0
- matplotlib_rs/textpath.py +377 -0
- matplotlib_rs/ticker.py +3111 -0
- matplotlib_rs/transforms.py +3069 -0
- matplotlib_rs/tri/__init__.py +24 -0
- matplotlib_rs/tri/_triangulation.py +248 -0
- matplotlib_rs/tri/_tricontour.py +271 -0
- matplotlib_rs/tri/_trifinder.py +97 -0
- matplotlib_rs/tri/_triinterpolate.py +1575 -0
- matplotlib_rs/tri/_tripcolor.py +170 -0
- matplotlib_rs/tri/_triplot.py +87 -0
- matplotlib_rs/tri/_trirefine.py +308 -0
- matplotlib_rs/tri/_tritools.py +264 -0
- matplotlib_rs/typing.py +597 -0
- matplotlib_rs/units.py +196 -0
- matplotlib_rs/widgets.py +4455 -0
- matplotlib_rs-0.0.8.dist-info/METADATA +392 -0
- matplotlib_rs-0.0.8.dist-info/RECORD +352 -0
- matplotlib_rs-0.0.8.dist-info/WHEEL +4 -0
- matplotlib_rs-0.0.8.dist-info/sboms/matplotlib-rs.cyclonedx.json +4390 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Vendored by tools/vendor_deps.py from python-dateutil 3.0.0 (see licenses/LICENSE_DATEUTIL).
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
from . import _tzpath
|
|
6
|
+
from ._tzpath import reset_tzpath
|
|
7
|
+
from .tz import *
|
|
8
|
+
from .tz import __doc__
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"tzutc",
|
|
12
|
+
"tzoffset",
|
|
13
|
+
"tzlocal",
|
|
14
|
+
"tzfile",
|
|
15
|
+
"tzrange",
|
|
16
|
+
"tzstr",
|
|
17
|
+
"tzical",
|
|
18
|
+
"tzwin",
|
|
19
|
+
"tzwinlocal",
|
|
20
|
+
"gettz",
|
|
21
|
+
"enfold",
|
|
22
|
+
"datetime_ambiguous",
|
|
23
|
+
"datetime_exists",
|
|
24
|
+
"resolve_imaginary",
|
|
25
|
+
"available_iana_timezones",
|
|
26
|
+
"UTC",
|
|
27
|
+
"TZPATH",
|
|
28
|
+
"reset_tzpath",
|
|
29
|
+
"DeprecatedTzFormatWarning",
|
|
30
|
+
"DeprecatedTzKeyWarning",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
if sys.version_info < (3, 7):
|
|
34
|
+
# Module-level __getattr__ was added in Python 3.7, so instead of lazily
|
|
35
|
+
# populating TZPATH on every access, we will register a callback with
|
|
36
|
+
# reset_tzpath to update the top-level tuple.
|
|
37
|
+
TZPATH = _tzpath.TZPATH
|
|
38
|
+
|
|
39
|
+
def _tzpath_callback(new_tzpath):
|
|
40
|
+
global TZPATH
|
|
41
|
+
TZPATH = new_tzpath
|
|
42
|
+
|
|
43
|
+
_tzpath.TZPATH_CALLBACKS.append(_tzpath_callback)
|
|
44
|
+
|
|
45
|
+
else:
|
|
46
|
+
|
|
47
|
+
def __getattr__(name):
|
|
48
|
+
if name == "TZPATH":
|
|
49
|
+
return _tzpath.TZPATH
|
|
50
|
+
else:
|
|
51
|
+
raise AttributeError(
|
|
52
|
+
"Module %s has no attribute %s" % (repr(__name__), repr(name))
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def __dir__():
|
|
57
|
+
return sorted(list(globals()) + ["TZPATH"])
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class DeprecatedTzFormatWarning(Warning):
|
|
61
|
+
"""Warning raised when time zones are parsed from deprecated formats."""
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# Vendored by tools/vendor_deps.py from python-dateutil 3.0.0 (see licenses/LICENSE_DATEUTIL).
|
|
2
|
+
from matplotlib_rs._vendor.six import PY2
|
|
3
|
+
|
|
4
|
+
from functools import wraps
|
|
5
|
+
|
|
6
|
+
from datetime import datetime, timedelta, tzinfo
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
ZERO = timedelta(0)
|
|
10
|
+
|
|
11
|
+
__all__ = ['tzname_in_python2', 'enfold']
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def tzname_in_python2(namefunc):
|
|
15
|
+
"""Change unicode output into bytestrings in Python 2
|
|
16
|
+
|
|
17
|
+
tzname() API changed in Python 3. It used to return bytes, but was changed
|
|
18
|
+
to unicode strings
|
|
19
|
+
"""
|
|
20
|
+
if PY2:
|
|
21
|
+
@wraps(namefunc)
|
|
22
|
+
def adjust_encoding(*args, **kwargs):
|
|
23
|
+
name = namefunc(*args, **kwargs)
|
|
24
|
+
if name is not None:
|
|
25
|
+
name = name.encode()
|
|
26
|
+
|
|
27
|
+
return name
|
|
28
|
+
|
|
29
|
+
return adjust_encoding
|
|
30
|
+
else:
|
|
31
|
+
return namefunc
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# The following is adapted from Alexander Belopolsky's tz library
|
|
35
|
+
# https://github.com/abalkin/tz
|
|
36
|
+
if hasattr(datetime, 'fold'):
|
|
37
|
+
# This is the pre-python 3.6 fold situation
|
|
38
|
+
def enfold(dt, fold=1):
|
|
39
|
+
"""
|
|
40
|
+
Provides a unified interface for assigning the ``fold`` attribute to
|
|
41
|
+
datetimes both before and after the implementation of PEP-495.
|
|
42
|
+
|
|
43
|
+
:param fold:
|
|
44
|
+
The value for the ``fold`` attribute in the returned datetime. This
|
|
45
|
+
should be either 0 or 1.
|
|
46
|
+
|
|
47
|
+
:return:
|
|
48
|
+
Returns an object for which ``getattr(dt, 'fold', 0)`` returns
|
|
49
|
+
``fold`` for all versions of Python. In versions prior to
|
|
50
|
+
Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
|
|
51
|
+
subclass of :py:class:`datetime.datetime` with the ``fold``
|
|
52
|
+
attribute added, if ``fold`` is 1.
|
|
53
|
+
|
|
54
|
+
.. versionadded:: 2.6.0
|
|
55
|
+
"""
|
|
56
|
+
return dt.replace(fold=fold)
|
|
57
|
+
|
|
58
|
+
else:
|
|
59
|
+
class _DatetimeWithFold(datetime):
|
|
60
|
+
"""
|
|
61
|
+
This is a class designed to provide a PEP 495-compliant interface for
|
|
62
|
+
Python versions before 3.6. It is used only for dates in a fold, so
|
|
63
|
+
the ``fold`` attribute is fixed at ``1``.
|
|
64
|
+
|
|
65
|
+
.. versionadded:: 2.6.0
|
|
66
|
+
"""
|
|
67
|
+
__slots__ = ()
|
|
68
|
+
|
|
69
|
+
def replace(self, *args, **kwargs):
|
|
70
|
+
"""
|
|
71
|
+
Return a datetime with the same attributes, except for those
|
|
72
|
+
attributes given new values by whichever keyword arguments are
|
|
73
|
+
specified. Note that tzinfo=None can be specified to create a naive
|
|
74
|
+
datetime from an aware datetime with no conversion of date and time
|
|
75
|
+
data.
|
|
76
|
+
|
|
77
|
+
This is reimplemented in ``_DatetimeWithFold`` because pypy3 will
|
|
78
|
+
return a ``datetime.datetime`` even if ``fold`` is unchanged.
|
|
79
|
+
"""
|
|
80
|
+
argnames = (
|
|
81
|
+
'year', 'month', 'day', 'hour', 'minute', 'second',
|
|
82
|
+
'microsecond', 'tzinfo'
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
for arg, argname in zip(args, argnames):
|
|
86
|
+
if argname in kwargs:
|
|
87
|
+
raise TypeError('Duplicate argument: {}'.format(argname))
|
|
88
|
+
|
|
89
|
+
kwargs[argname] = arg
|
|
90
|
+
|
|
91
|
+
for argname in argnames:
|
|
92
|
+
if argname not in kwargs:
|
|
93
|
+
kwargs[argname] = getattr(self, argname)
|
|
94
|
+
|
|
95
|
+
dt_class = self.__class__ if kwargs.get('fold', 1) else datetime
|
|
96
|
+
|
|
97
|
+
return dt_class(**kwargs)
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def fold(self):
|
|
101
|
+
return 1
|
|
102
|
+
|
|
103
|
+
def enfold(dt, fold=1):
|
|
104
|
+
"""
|
|
105
|
+
Provides a unified interface for assigning the ``fold`` attribute to
|
|
106
|
+
datetimes both before and after the implementation of PEP-495.
|
|
107
|
+
|
|
108
|
+
:param fold:
|
|
109
|
+
The value for the ``fold`` attribute in the returned datetime. This
|
|
110
|
+
should be either 0 or 1.
|
|
111
|
+
|
|
112
|
+
:return:
|
|
113
|
+
Returns an object for which ``getattr(dt, 'fold', 0)`` returns
|
|
114
|
+
``fold`` for all versions of Python. In versions prior to
|
|
115
|
+
Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
|
|
116
|
+
subclass of :py:class:`datetime.datetime` with the ``fold``
|
|
117
|
+
attribute added, if ``fold`` is 1.
|
|
118
|
+
|
|
119
|
+
.. versionadded:: 2.6.0
|
|
120
|
+
"""
|
|
121
|
+
if getattr(dt, 'fold', 0) == fold:
|
|
122
|
+
return dt
|
|
123
|
+
|
|
124
|
+
args = dt.timetuple()[:6]
|
|
125
|
+
args += (dt.microsecond, dt.tzinfo)
|
|
126
|
+
|
|
127
|
+
if fold:
|
|
128
|
+
return _DatetimeWithFold(*args)
|
|
129
|
+
else:
|
|
130
|
+
return datetime(*args)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _validate_fromutc_inputs(f):
|
|
134
|
+
"""
|
|
135
|
+
The CPython version of ``fromutc`` checks that the input is a ``datetime``
|
|
136
|
+
object and that ``self`` is attached as its ``tzinfo``.
|
|
137
|
+
"""
|
|
138
|
+
@wraps(f)
|
|
139
|
+
def fromutc(self, dt):
|
|
140
|
+
if not isinstance(dt, datetime):
|
|
141
|
+
raise TypeError("fromutc() requires a datetime argument")
|
|
142
|
+
if dt.tzinfo is not self:
|
|
143
|
+
raise ValueError("dt.tzinfo is not self")
|
|
144
|
+
|
|
145
|
+
return f(self, dt)
|
|
146
|
+
|
|
147
|
+
return fromutc
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class _tzinfo(tzinfo):
|
|
151
|
+
"""
|
|
152
|
+
Base class for all ``dateutil`` ``tzinfo`` objects.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
def is_ambiguous(self, dt):
|
|
156
|
+
"""
|
|
157
|
+
Whether or not the "wall time" of a given datetime is ambiguous in this
|
|
158
|
+
zone.
|
|
159
|
+
|
|
160
|
+
:param dt:
|
|
161
|
+
A :py:class:`datetime.datetime`, naive or time zone aware.
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
:return:
|
|
165
|
+
Returns ``True`` if ambiguous, ``False`` otherwise.
|
|
166
|
+
|
|
167
|
+
.. versionadded:: 2.6.0
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
dt = dt.replace(tzinfo=self)
|
|
171
|
+
|
|
172
|
+
wall_0 = enfold(dt, fold=0)
|
|
173
|
+
wall_1 = enfold(dt, fold=1)
|
|
174
|
+
|
|
175
|
+
same_offset = wall_0.utcoffset() == wall_1.utcoffset()
|
|
176
|
+
same_dt = wall_0.replace(tzinfo=None) == wall_1.replace(tzinfo=None)
|
|
177
|
+
|
|
178
|
+
return same_dt and not same_offset
|
|
179
|
+
|
|
180
|
+
def _fold_status(self, dt_utc, dt_wall):
|
|
181
|
+
"""
|
|
182
|
+
Determine the fold status of a "wall" datetime, given a representation
|
|
183
|
+
of the same datetime as a (naive) UTC datetime. This is calculated based
|
|
184
|
+
on the assumption that ``dt.utcoffset() - dt.dst()`` is constant for all
|
|
185
|
+
datetimes, and that this offset is the actual number of hours separating
|
|
186
|
+
``dt_utc`` and ``dt_wall``.
|
|
187
|
+
|
|
188
|
+
:param dt_utc:
|
|
189
|
+
Representation of the datetime as UTC
|
|
190
|
+
|
|
191
|
+
:param dt_wall:
|
|
192
|
+
Representation of the datetime as "wall time". This parameter must
|
|
193
|
+
either have a `fold` attribute or have a fold-naive
|
|
194
|
+
:class:`datetime.tzinfo` attached, otherwise the calculation may
|
|
195
|
+
fail.
|
|
196
|
+
"""
|
|
197
|
+
if self.is_ambiguous(dt_wall):
|
|
198
|
+
delta_wall = dt_wall - dt_utc
|
|
199
|
+
_fold = int(delta_wall == (dt_utc.utcoffset() - dt_utc.dst()))
|
|
200
|
+
else:
|
|
201
|
+
_fold = 0
|
|
202
|
+
|
|
203
|
+
return _fold
|
|
204
|
+
|
|
205
|
+
def _fold(self, dt):
|
|
206
|
+
return getattr(dt, 'fold', 0)
|
|
207
|
+
|
|
208
|
+
def _fromutc(self, dt):
|
|
209
|
+
"""
|
|
210
|
+
Given a timezone-aware datetime in a given timezone, calculates a
|
|
211
|
+
timezone-aware datetime in a new timezone.
|
|
212
|
+
|
|
213
|
+
Since this is the one time that we *know* we have an unambiguous
|
|
214
|
+
datetime object, we take this opportunity to determine whether the
|
|
215
|
+
datetime is ambiguous and in a "fold" state (e.g. if it's the first
|
|
216
|
+
occurrence, chronologically, of the ambiguous datetime).
|
|
217
|
+
|
|
218
|
+
:param dt:
|
|
219
|
+
A timezone-aware :class:`datetime.datetime` object.
|
|
220
|
+
"""
|
|
221
|
+
|
|
222
|
+
# Re-implement the algorithm from Python's datetime.py
|
|
223
|
+
dtoff = dt.utcoffset()
|
|
224
|
+
if dtoff is None:
|
|
225
|
+
raise ValueError("fromutc() requires a non-None utcoffset() "
|
|
226
|
+
"result")
|
|
227
|
+
|
|
228
|
+
# The original datetime.py code assumes that `dst()` defaults to
|
|
229
|
+
# zero during ambiguous times. PEP 495 inverts this presumption, so
|
|
230
|
+
# for pre-PEP 495 versions of python, we need to tweak the algorithm.
|
|
231
|
+
dtdst = dt.dst()
|
|
232
|
+
if dtdst is None:
|
|
233
|
+
raise ValueError("fromutc() requires a non-None dst() result")
|
|
234
|
+
delta = dtoff - dtdst
|
|
235
|
+
|
|
236
|
+
dt += delta
|
|
237
|
+
# Set fold=1 so we can default to being in the fold for
|
|
238
|
+
# ambiguous dates.
|
|
239
|
+
dtdst = enfold(dt, fold=1).dst()
|
|
240
|
+
if dtdst is None:
|
|
241
|
+
raise ValueError("fromutc(): dt.dst gave inconsistent "
|
|
242
|
+
"results; cannot convert")
|
|
243
|
+
return dt + dtdst
|
|
244
|
+
|
|
245
|
+
@_validate_fromutc_inputs
|
|
246
|
+
def fromutc(self, dt):
|
|
247
|
+
"""
|
|
248
|
+
Given a timezone-aware datetime in a given timezone, calculates a
|
|
249
|
+
timezone-aware datetime in a new timezone.
|
|
250
|
+
|
|
251
|
+
Since this is the one time that we *know* we have an unambiguous
|
|
252
|
+
datetime object, we take this opportunity to determine whether the
|
|
253
|
+
datetime is ambiguous and in a "fold" state (e.g. if it's the first
|
|
254
|
+
occurrence, chronologically, of the ambiguous datetime).
|
|
255
|
+
|
|
256
|
+
:param dt:
|
|
257
|
+
A timezone-aware :class:`datetime.datetime` object.
|
|
258
|
+
"""
|
|
259
|
+
dt_wall = self._fromutc(dt)
|
|
260
|
+
|
|
261
|
+
# Calculate the fold status given the two datetimes.
|
|
262
|
+
_fold = self._fold_status(dt, dt_wall)
|
|
263
|
+
|
|
264
|
+
# Set the default fold value for ambiguous dates
|
|
265
|
+
return enfold(dt_wall, fold=_fold)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
class tzrangebase(_tzinfo):
|
|
269
|
+
"""
|
|
270
|
+
This is an abstract base class for time zones represented by an annual
|
|
271
|
+
transition into and out of DST. Child classes should implement the following
|
|
272
|
+
methods:
|
|
273
|
+
|
|
274
|
+
* ``__init__(self, *args, **kwargs)``
|
|
275
|
+
* ``transitions(self, year)`` - this is expected to return a tuple of
|
|
276
|
+
datetimes representing the DST on and off transitions in standard
|
|
277
|
+
time.
|
|
278
|
+
|
|
279
|
+
A fully initialized ``tzrangebase`` subclass should also provide the
|
|
280
|
+
following attributes:
|
|
281
|
+
* ``hasdst``: Boolean whether or not the zone uses DST.
|
|
282
|
+
* ``_dst_offset`` / ``_std_offset``: :class:`datetime.timedelta` objects
|
|
283
|
+
representing the respective UTC offsets.
|
|
284
|
+
* ``_dst_abbr`` / ``_std_abbr``: Strings representing the timezone short
|
|
285
|
+
abbreviations in DST and STD, respectively.
|
|
286
|
+
* ``_hasdst``: Whether or not the zone has DST.
|
|
287
|
+
|
|
288
|
+
.. versionadded:: 2.6.0
|
|
289
|
+
"""
|
|
290
|
+
def __init__(self):
|
|
291
|
+
raise NotImplementedError('tzrangebase is an abstract base class')
|
|
292
|
+
|
|
293
|
+
def utcoffset(self, dt):
|
|
294
|
+
isdst = self._isdst(dt)
|
|
295
|
+
|
|
296
|
+
if isdst is None:
|
|
297
|
+
return None
|
|
298
|
+
elif isdst:
|
|
299
|
+
return self._dst_offset
|
|
300
|
+
else:
|
|
301
|
+
return self._std_offset
|
|
302
|
+
|
|
303
|
+
def dst(self, dt):
|
|
304
|
+
isdst = self._isdst(dt)
|
|
305
|
+
|
|
306
|
+
if isdst is None:
|
|
307
|
+
return None
|
|
308
|
+
elif isdst:
|
|
309
|
+
return self._dst_base_offset
|
|
310
|
+
else:
|
|
311
|
+
return ZERO
|
|
312
|
+
|
|
313
|
+
@tzname_in_python2
|
|
314
|
+
def tzname(self, dt):
|
|
315
|
+
if self._isdst(dt):
|
|
316
|
+
return self._dst_abbr
|
|
317
|
+
else:
|
|
318
|
+
return self._std_abbr
|
|
319
|
+
|
|
320
|
+
def fromutc(self, dt):
|
|
321
|
+
""" Given a datetime in UTC, return local time """
|
|
322
|
+
if not isinstance(dt, datetime):
|
|
323
|
+
raise TypeError("fromutc() requires a datetime argument")
|
|
324
|
+
|
|
325
|
+
if dt.tzinfo is not self:
|
|
326
|
+
raise ValueError("dt.tzinfo is not self")
|
|
327
|
+
|
|
328
|
+
# Get transitions - if there are none, fixed offset
|
|
329
|
+
transitions = self.transitions(dt.year)
|
|
330
|
+
if transitions is None:
|
|
331
|
+
return dt + self.utcoffset(dt)
|
|
332
|
+
|
|
333
|
+
# Get the transition times in UTC
|
|
334
|
+
dston, dstoff = transitions
|
|
335
|
+
|
|
336
|
+
dston -= self._std_offset
|
|
337
|
+
dstoff -= self._std_offset
|
|
338
|
+
|
|
339
|
+
utc_transitions = (dston, dstoff)
|
|
340
|
+
dt_utc = dt.replace(tzinfo=None)
|
|
341
|
+
|
|
342
|
+
isdst = self._naive_isdst(dt_utc, utc_transitions)
|
|
343
|
+
|
|
344
|
+
if isdst:
|
|
345
|
+
dt_wall = dt + self._dst_offset
|
|
346
|
+
else:
|
|
347
|
+
dt_wall = dt + self._std_offset
|
|
348
|
+
|
|
349
|
+
_fold = int(not isdst and self.is_ambiguous(dt_wall))
|
|
350
|
+
|
|
351
|
+
return enfold(dt_wall, fold=_fold)
|
|
352
|
+
|
|
353
|
+
def is_ambiguous(self, dt):
|
|
354
|
+
"""
|
|
355
|
+
Whether or not the "wall time" of a given datetime is ambiguous in this
|
|
356
|
+
zone.
|
|
357
|
+
|
|
358
|
+
:param dt:
|
|
359
|
+
A :py:class:`datetime.datetime`, naive or time zone aware.
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
:return:
|
|
363
|
+
Returns ``True`` if ambiguous, ``False`` otherwise.
|
|
364
|
+
|
|
365
|
+
.. versionadded:: 2.6.0
|
|
366
|
+
"""
|
|
367
|
+
if not self.hasdst:
|
|
368
|
+
return False
|
|
369
|
+
|
|
370
|
+
start, end = self.transitions(dt.year)
|
|
371
|
+
|
|
372
|
+
dt = dt.replace(tzinfo=None)
|
|
373
|
+
return (end <= dt < end + self._dst_base_offset)
|
|
374
|
+
|
|
375
|
+
def _isdst(self, dt):
|
|
376
|
+
if not self.hasdst:
|
|
377
|
+
return False
|
|
378
|
+
elif dt is None:
|
|
379
|
+
return None
|
|
380
|
+
|
|
381
|
+
transitions = self.transitions(dt.year)
|
|
382
|
+
|
|
383
|
+
if transitions is None:
|
|
384
|
+
return False
|
|
385
|
+
|
|
386
|
+
dt = dt.replace(tzinfo=None)
|
|
387
|
+
|
|
388
|
+
isdst = self._naive_isdst(dt, transitions)
|
|
389
|
+
|
|
390
|
+
# Handle ambiguous dates
|
|
391
|
+
if not isdst and self.is_ambiguous(dt):
|
|
392
|
+
return not self._fold(dt)
|
|
393
|
+
else:
|
|
394
|
+
return isdst
|
|
395
|
+
|
|
396
|
+
def _naive_isdst(self, dt, transitions):
|
|
397
|
+
dston, dstoff = transitions
|
|
398
|
+
|
|
399
|
+
dt = dt.replace(tzinfo=None)
|
|
400
|
+
|
|
401
|
+
if dston < dstoff:
|
|
402
|
+
isdst = dston <= dt < dstoff
|
|
403
|
+
else:
|
|
404
|
+
isdst = not dstoff <= dt < dston
|
|
405
|
+
|
|
406
|
+
return isdst
|
|
407
|
+
|
|
408
|
+
@property
|
|
409
|
+
def _dst_base_offset(self):
|
|
410
|
+
return self._dst_offset - self._std_offset
|
|
411
|
+
|
|
412
|
+
__hash__ = None
|
|
413
|
+
|
|
414
|
+
def __ne__(self, other):
|
|
415
|
+
return not (self == other)
|
|
416
|
+
|
|
417
|
+
def __repr__(self):
|
|
418
|
+
return "%s(...)" % self.__class__.__name__
|
|
419
|
+
|
|
420
|
+
__reduce__ = object.__reduce__
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Vendored by tools/vendor_deps.py from python-dateutil 3.0.0 (see licenses/LICENSE_DATEUTIL).
|
|
2
|
+
from datetime import timedelta
|
|
3
|
+
import weakref
|
|
4
|
+
from collections import OrderedDict
|
|
5
|
+
|
|
6
|
+
from matplotlib_rs._vendor.six.moves import _thread
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class _TzSingleton(type):
|
|
10
|
+
def __init__(cls, *args, **kwargs):
|
|
11
|
+
cls.__instance = None
|
|
12
|
+
super(_TzSingleton, cls).__init__(*args, **kwargs)
|
|
13
|
+
|
|
14
|
+
def __call__(cls):
|
|
15
|
+
if cls.__instance is None:
|
|
16
|
+
cls.__instance = super(_TzSingleton, cls).__call__()
|
|
17
|
+
return cls.__instance
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class _TzFactory(type):
|
|
21
|
+
def instance(cls, *args, **kwargs):
|
|
22
|
+
"""Alternate constructor that returns a fresh instance"""
|
|
23
|
+
return type.__call__(cls, *args, **kwargs)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class _TzOffsetFactory(_TzFactory):
|
|
27
|
+
def __init__(cls, *args, **kwargs):
|
|
28
|
+
cls.__instances = weakref.WeakValueDictionary()
|
|
29
|
+
cls.__strong_cache = OrderedDict()
|
|
30
|
+
cls.__strong_cache_size = 8
|
|
31
|
+
|
|
32
|
+
cls._cache_lock = _thread.allocate_lock()
|
|
33
|
+
|
|
34
|
+
def __call__(cls, name, offset):
|
|
35
|
+
if isinstance(offset, timedelta):
|
|
36
|
+
key = (name, offset.total_seconds())
|
|
37
|
+
else:
|
|
38
|
+
key = (name, offset)
|
|
39
|
+
|
|
40
|
+
instance = cls.__instances.get(key, None)
|
|
41
|
+
if instance is None:
|
|
42
|
+
instance = cls.__instances.setdefault(key,
|
|
43
|
+
cls.instance(name, offset))
|
|
44
|
+
|
|
45
|
+
# This lock may not be necessary in Python 3. See GH issue #901
|
|
46
|
+
with cls._cache_lock:
|
|
47
|
+
cls.__strong_cache[key] = cls.__strong_cache.pop(key, instance)
|
|
48
|
+
|
|
49
|
+
# Remove an item if the strong cache is overpopulated
|
|
50
|
+
if len(cls.__strong_cache) > cls.__strong_cache_size:
|
|
51
|
+
cls.__strong_cache.popitem(last=False)
|
|
52
|
+
|
|
53
|
+
return instance
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class _TzStrFactory(_TzFactory):
|
|
57
|
+
def __init__(cls, *args, **kwargs):
|
|
58
|
+
cls.__instances = weakref.WeakValueDictionary()
|
|
59
|
+
cls.__strong_cache = OrderedDict()
|
|
60
|
+
cls.__strong_cache_size = 8
|
|
61
|
+
|
|
62
|
+
cls.__cache_lock = _thread.allocate_lock()
|
|
63
|
+
|
|
64
|
+
def __call__(cls, s, posix_offset=False):
|
|
65
|
+
key = (s, posix_offset)
|
|
66
|
+
instance = cls.__instances.get(key, None)
|
|
67
|
+
|
|
68
|
+
if instance is None:
|
|
69
|
+
instance = cls.__instances.setdefault(key,
|
|
70
|
+
cls.instance(s, posix_offset))
|
|
71
|
+
|
|
72
|
+
# This lock may not be necessary in Python 3. See GH issue #901
|
|
73
|
+
with cls.__cache_lock:
|
|
74
|
+
cls.__strong_cache[key] = cls.__strong_cache.pop(key, instance)
|
|
75
|
+
|
|
76
|
+
# Remove an item if the strong cache is overpopulated
|
|
77
|
+
if len(cls.__strong_cache) > cls.__strong_cache_size:
|
|
78
|
+
cls.__strong_cache.popitem(last=False)
|
|
79
|
+
|
|
80
|
+
return instance
|
|
81
|
+
|