Commit Graph

17 Commits

Author SHA1 Message Date
Carl Smedstad 8484023b7b
Fix Python deprecations (#2262)
* Add missing import 'types'

The commit 6950c04614d0bd1fc9c61b79ec7e2be0d16abdc4 did the following,
but missed to import the 'types' module:

-    module = imp.new_module(name)
+    module = types.ModuleType(name)

* Remove usage of 'imp' module - removed in Python 3.12

* Remove usage of deprecated method locale.getdefaultlocale()

Fixes the following deprecation warning:

powerline/lib/encoding.py:49: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
  or locale.getdefaultlocale()[1]

* Fix invalid escape sequences

Specifically:

    powerline/bindings/config.py:179: SyntaxWarning: invalid escape sequence '\$'
    powerline/lint/__init__.py:208: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/__init__.py:226: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/__init__.py:44: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/spec.py:24: SyntaxWarning: invalid escape sequence '\w'
    powerline/lint/spec.py:588: SyntaxWarning: invalid escape sequence '\w'
    powerline/segments/common/mail.py:36: SyntaxWarning: invalid escape sequence '\d'
2024-08-29 20:00:48 +09:00
Robin Candau c04a8dd5a1
Remove imp module from tests to make them compatible with python 3.12 (#2251) 2024-02-27 18:59:10 +09:00
Philip Wellnitz 7310d53ade
i3 segments rework (#2159)
rework i3wm segments
2021-03-15 03:45:17 +09:00
StopMotionCuber 73881c1dce
Shifted away from (abandoned) Yahoo API to OpenWeatherMap (#2038)
* Shifted away from (abandoned) Yahoo API to OpenWeatherMap
* Calculate gradient based on converted temperature
* Added Stubs for https://freegeoip.app as well as https://api.openweathermap.com
* Updated tests for weather segment with OpenWeatherMap mocking
* Make Weather API key configurable
* Added documentation for the OpenWeatherMap API keys
2020-09-19 14:31:49 +09:00
Rijnard van Tonder e64ce9bd1a
Fix duplicate conditional check 2018-11-09 22:16:02 -05:00
Foo 1b0df9c2bd Wait for thread to start 2017-12-02 17:56:45 +03:00
Foo 870de7be21 Improve terminal.py:
1. Make it print true color escape sequences when debugging.
2. Add support for automatic row detection.
2017-12-02 17:56:37 +03:00
Foo 6bbcb610c7 Make vterm UTF-8 2017-12-02 17:56:36 +03:00
Foo 96f9c62d86 Start creating shell vterm tests
Should replace #1448.
2017-12-02 17:56:33 +03:00
Foo b047abcd9a First call suite.fail, then super().fail 2017-12-02 17:56:24 +03:00
Foo 55d9c320dc Add missing import 2017-12-02 17:56:23 +03:00
Foo 0a1cf1780f Use better failure message 2017-12-02 17:56:22 +03:00
Foo f0944f840e Make python tests also print to summary 2017-12-02 17:56:15 +03:00
Foo 45e148b3a0 Fix what attempts means for PowerlineTestSuite.test 2017-12-02 17:56:07 +03:00
Foo 0ad1d9be40 More granular failure reports in summary from vterm tests 2017-12-02 17:56:03 +03:00
Foo 1151449a8c Switch vterm tests to use “standard” temporary directory in tests/tmp 2017-05-21 02:33:50 +03:00
Foo c30383a194 Move Python tests.* modules to tests/modules, rename tests/path 2017-04-30 16:02:04 +03:00