PythonQwt 0.16.0__tar.gz → 0.16.1__tar.gz

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.
Files changed (131) hide show
  1. {pythonqwt-0.16.0/PythonQwt.egg-info → pythonqwt-0.16.1}/PKG-INFO +1 -1
  2. {pythonqwt-0.16.0 → pythonqwt-0.16.1/PythonQwt.egg-info}/PKG-INFO +1 -1
  3. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/pyproject.toml +1 -1
  4. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/__init__.py +1 -1
  5. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/scale_draw.py +7 -26
  6. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/text.py +12 -18
  7. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/LICENSE +0 -0
  8. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/MANIFEST.in +0 -0
  9. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt-tests.desktop +0 -0
  10. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt.egg-info/SOURCES.txt +0 -0
  11. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt.egg-info/dependency_links.txt +0 -0
  12. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt.egg-info/entry_points.txt +0 -0
  13. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt.egg-info/requires.txt +0 -0
  14. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/PythonQwt.egg-info/top_level.txt +0 -0
  15. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/README.md +0 -0
  16. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/_static/PythonQwt_logo.png +0 -0
  17. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/_static/QwtPlot_example.png +0 -0
  18. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/_static/panorama.png +0 -0
  19. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/_static/symbol_path_example.png +0 -0
  20. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/conf.py +0 -0
  21. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/bodedemo.rst +0 -0
  22. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/cartesian.rst +0 -0
  23. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/cpudemo.rst +0 -0
  24. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/curvebenchmark1.rst +0 -0
  25. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/curvebenchmark2.rst +0 -0
  26. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/curvedemo1.rst +0 -0
  27. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/curvedemo2.rst +0 -0
  28. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/data.rst +0 -0
  29. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/errorbar.rst +0 -0
  30. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/eventfilter.rst +0 -0
  31. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/image.rst +0 -0
  32. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/index.rst +0 -0
  33. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/logcurve.rst +0 -0
  34. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/mapdemo.rst +0 -0
  35. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/multidemo.rst +0 -0
  36. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/simple.rst +0 -0
  37. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/examples/vertical.rst +0 -0
  38. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/index.rst +0 -0
  39. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/installation.rst +0 -0
  40. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/issue93_optimization_summary.md +0 -0
  41. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/overview.rst +0 -0
  42. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/plot_example.py +0 -0
  43. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/graphic.rst +0 -0
  44. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/index.rst +0 -0
  45. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/interval.rst +0 -0
  46. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/plot.rst +0 -0
  47. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/plot_directpainter.rst +0 -0
  48. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/plot_layout.rst +0 -0
  49. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/plot_series.rst +0 -0
  50. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/scale.rst +0 -0
  51. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/symbol.rst +0 -0
  52. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/text.rst +0 -0
  53. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/toqimage.rst +0 -0
  54. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/reference/transform.rst +0 -0
  55. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/doc/symbol_path_example.py +0 -0
  56. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/_math.py +0 -0
  57. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/color_map.py +0 -0
  58. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/column_symbol.py +0 -0
  59. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/dyngrid_layout.py +0 -0
  60. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/graphic.py +0 -0
  61. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/interval.py +0 -0
  62. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/legend.py +0 -0
  63. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/null_paintdevice.py +0 -0
  64. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/painter.py +0 -0
  65. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/painter_command.py +0 -0
  66. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot.py +0 -0
  67. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_canvas.py +0 -0
  68. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_curve.py +0 -0
  69. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_directpainter.py +0 -0
  70. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_grid.py +0 -0
  71. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_layout.py +0 -0
  72. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_marker.py +0 -0
  73. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_renderer.py +0 -0
  74. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/plot_series.py +0 -0
  75. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/qthelpers.py +0 -0
  76. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/scale_div.py +0 -0
  77. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/scale_engine.py +0 -0
  78. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/scale_map.py +0 -0
  79. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/scale_widget.py +0 -0
  80. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/symbol.py +0 -0
  81. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/__init__.py +0 -0
  82. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/comparative_benchmarks.py +0 -0
  83. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/conftest.py +0 -0
  84. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/PythonQwt.svg +0 -0
  85. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/bodedemo.png +0 -0
  86. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/cartesian.png +0 -0
  87. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/cpudemo.png +0 -0
  88. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/curvebenchmark1.png +0 -0
  89. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/curvebenchmark2.png +0 -0
  90. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/curvedemo1.png +0 -0
  91. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/curvedemo2.png +0 -0
  92. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/data.png +0 -0
  93. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/errorbar.png +0 -0
  94. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/eventfilter.png +0 -0
  95. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/image.png +0 -0
  96. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/loadtest.png +0 -0
  97. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/logcurve.png +0 -0
  98. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/mapdemo.png +0 -0
  99. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/multidemo.png +0 -0
  100. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/simple.png +0 -0
  101. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/stylesheet.png +0 -0
  102. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/symbol.svg +0 -0
  103. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/symbols.png +0 -0
  104. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/testlauncher.png +0 -0
  105. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/data/vertical.png +0 -0
  106. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_backingstore.py +0 -0
  107. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_bodedemo.py +0 -0
  108. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_cartesian.py +0 -0
  109. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_cpudemo.py +0 -0
  110. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_curvebenchmark1.py +0 -0
  111. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_curvebenchmark2.py +0 -0
  112. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_curvedemo1.py +0 -0
  113. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_curvedemo2.py +0 -0
  114. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_data.py +0 -0
  115. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_errorbar.py +0 -0
  116. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_eventfilter.py +0 -0
  117. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_highdpi.py +0 -0
  118. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_image.py +0 -0
  119. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_loadtest.py +0 -0
  120. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_logcurve.py +0 -0
  121. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_mapdemo.py +0 -0
  122. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_multidemo.py +0 -0
  123. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_relativemargin.py +0 -0
  124. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_simple.py +0 -0
  125. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_stylesheet.py +0 -0
  126. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_symbols.py +0 -0
  127. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/test_vertical.py +0 -0
  128. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/tests/utils.py +0 -0
  129. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/toqimage.py +0 -0
  130. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/qwt/transform.py +0 -0
  131. {pythonqwt-0.16.0 → pythonqwt-0.16.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PythonQwt
3
- Version: 0.16.0
3
+ Version: 0.16.1
4
4
  Summary: Qt plotting widgets for Python
5
5
  Author-email: Pierre Raybaut <pierre.raybaut@gmail.com>
6
6
  License: PythonQwt License Agreement
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PythonQwt
3
- Version: 0.16.0
3
+ Version: 0.16.1
4
4
  Summary: Qt plotting widgets for Python
5
5
  Author-email: Pierre Raybaut <pierre.raybaut@gmail.com>
6
6
  License: PythonQwt License Agreement
@@ -59,7 +59,7 @@ version = { attr = "qwt.__version__" }
59
59
  addopts = "qwt"
60
60
 
61
61
  [tool.ruff]
62
- exclude = [".git", ".vscode", "build", "dist"]
62
+ exclude = [".git", ".vscode", "build", "dist","venv*",".venv*"]
63
63
  line-length = 88 # Same as Black.
64
64
  indent-width = 4 # Same as Black.
65
65
  target-version = "py39" # Assume Python 3.9.
@@ -63,7 +63,7 @@ from qwt.symbol import QwtSymbol as QSbl # see deprecated section
63
63
  from qwt.text import QwtText # noqa: F401
64
64
  from qwt.toqimage import array_to_qimage as toQImage # noqa: F401
65
65
 
66
- __version__ = "0.16.0"
66
+ __version__ = "0.16.1"
67
67
  QWT_VERSION_STR = "6.1.5"
68
68
 
69
69
 
@@ -24,6 +24,7 @@ from datetime import datetime
24
24
 
25
25
  from qtpy.QtCore import (
26
26
  QLineF,
27
+ QObject,
27
28
  QPoint,
28
29
  QPointF,
29
30
  QRect,
@@ -50,22 +51,11 @@ _ALIGN_TOP = int(Qt.AlignTop)
50
51
  _ALIGN_BOTTOM = int(Qt.AlignBottom)
51
52
 
52
53
 
53
- class QwtAbstractScaleDraw_PrivateData(object):
54
- # See QwtText_PrivateData: ``QObject`` inheritance is unused and the
55
- # base class' ``__init__`` is a measurable cost in tick-heavy renders.
56
- __slots__ = (
57
- "spacing",
58
- "penWidth",
59
- "minExtent",
60
- "components",
61
- "tick_length",
62
- "tick_lighter_factor",
63
- "map",
64
- "scaleDiv",
65
- "labelCache",
66
- )
54
+ class QwtAbstractScaleDraw_PrivateData(QObject):
55
+ # QObject base class restored for Qt parent/child ownership semantics.
67
56
 
68
57
  def __init__(self):
58
+ QObject.__init__(self)
69
59
  self.spacing = 4
70
60
  self.penWidth = 0
71
61
  self.minExtent = 0.0
@@ -492,20 +482,11 @@ class QwtAbstractScaleDraw(object):
492
482
  self.__data.labelCache.clear()
493
483
 
494
484
 
495
- class QwtScaleDraw_PrivateData(object):
496
- # See QwtText_PrivateData: ``QObject`` inheritance is unused and the
497
- # base class' ``__init__`` is a measurable cost in tick-heavy renders.
498
- __slots__ = (
499
- "len",
500
- "alignment",
501
- "orientation",
502
- "labelAlignment",
503
- "labelRotation",
504
- "labelAutoSize",
505
- "pos",
506
- )
485
+ class QwtScaleDraw_PrivateData(QObject):
486
+ # QObject base class restored for Qt parent/child ownership semantics.
507
487
 
508
488
  def __init__(self):
489
+ QObject.__init__(self)
509
490
  self.len = 0
510
491
  self.alignment = QwtScaleDraw.BottomScale
511
492
  # Cached orientation - kept in sync by ``QwtScaleDraw.setAlignment``
@@ -234,6 +234,7 @@ _FONT_KEY_CACHE: dict = {} # id(font) -> tuple_key (fast path)
234
234
  _FONT_TUPLE_CACHE: dict = {} # tuple_key -> tuple_key (interning, also acts
235
235
  # as the "have we seen this logical font" set)
236
236
  _FONT_KEY_CACHE_LIMIT = 1024
237
+ _FM_CACHE_LIMIT = 256 # max QFontMetrics/QFontMetricsF entries per engine
237
238
 
238
239
 
239
240
  def _font_tuple_key(font):
@@ -317,6 +318,8 @@ class QwtPlainTextEngine(QwtTextEngine):
317
318
  try:
318
319
  return self._fm_cache[fid]
319
320
  except KeyError:
321
+ if len(self._fm_cache) >= _FM_CACHE_LIMIT:
322
+ self._fm_cache.clear()
320
323
  return self._fm_cache.setdefault(fid, QFontMetrics(font))
321
324
 
322
325
  def fontmetrics_f(self, font):
@@ -324,6 +327,8 @@ class QwtPlainTextEngine(QwtTextEngine):
324
327
  try:
325
328
  return self._fm_cache_f[fid]
326
329
  except KeyError:
330
+ if len(self._fm_cache_f) >= _FM_CACHE_LIMIT:
331
+ self._fm_cache_f.clear()
327
332
  return self._fm_cache_f.setdefault(fid, QFontMetricsF(font))
328
333
 
329
334
  def heightForWidth(self, font, flags, text, width):
@@ -359,6 +364,8 @@ class QwtPlainTextEngine(QwtTextEngine):
359
364
  ascent = ASCENTCACHE.get(fontKey)
360
365
  if ascent is not None:
361
366
  return ascent
367
+ if len(ASCENTCACHE) >= _FM_CACHE_LIMIT:
368
+ ASCENTCACHE.clear()
362
369
  return ASCENTCACHE.setdefault(fontKey, self.findAscent(font))
363
370
 
364
371
  def findAscent(self, font):
@@ -411,6 +418,8 @@ class QwtPlainTextEngine(QwtTextEngine):
411
418
  if cached is None:
412
419
  fm = self.fontmetrics(font)
413
420
  cached = (0, 0, fm.ascent() - self.effectiveAscent(font), fm.descent())
421
+ if len(self._margins_cache) >= _FM_CACHE_LIMIT:
422
+ self._margins_cache.clear()
414
423
  self._margins_cache[fkey] = cached
415
424
  self._margins_last_id = font_id
416
425
  self._margins_last_value = cached
@@ -557,26 +566,11 @@ class QwtRichTextEngine(QwtTextEngine):
557
566
  return 0, 0, 0, 0
558
567
 
559
568
 
560
- class QwtText_PrivateData(object):
561
- # ``QObject`` was previously used as the base class but no Qt signals
562
- # or events are ever emitted from ``_PrivateData`` containers and the
563
- # ``QObject.__init__`` call dominates ``QwtText.__init__`` (it is the
564
- # single most expensive line for tick-label-heavy renders, see
565
- # https://github.com/PlotPyStack/PythonQwt/issues/93).
566
- __slots__ = (
567
- "renderFlags",
568
- "borderRadius",
569
- "borderPen",
570
- "backgroundBrush",
571
- "paintAttributes",
572
- "layoutAttributes",
573
- "textEngine",
574
- "text",
575
- "font",
576
- "color",
577
- )
569
+ class QwtText_PrivateData(QObject):
570
+ # QObject base class restored for Qt parent/child ownership semantics.
578
571
 
579
572
  def __init__(self):
573
+ QObject.__init__(self)
580
574
  self.renderFlags = Qt.AlignCenter
581
575
  self.borderRadius = 0
582
576
  self.borderPen = Qt.NoPen
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes