23 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
Philip Wellnitz [10]
6b36ba8ae9 fix #2257 2024-05-12 04:45:27 +09:00
Philip Wellnitz
7310d53ade
i3 segments rework (#2159)
rework i3wm segments
2021-03-15 03:45:17 +09:00
sol
1869cc8bed
Use updated i3ipc syntax in i3 segments/listers (#2062)
Close #2046

Co-authored-by: s-ol <s-ol@users.noreply.github.com>
2021-01-08 19:25:53 +09:00
StopMotionCuber
a6060c760a
Fix non-meaningful venv names. (#2134)
* Add feature to ignore certain virtualenv names

* Add tests for testing ignored names (specific as well as default)

* Don't use `zsh.environ` as this does not stringify the environment
2020-10-27 21:50:36 +09:00
StopMotionCuber
a80bbdf17d
Updated uptime segment to have show time in a better way (#2036)
* Updated uptime segment to have show time in a better way

* Made current solution backwards compatible

* Include proposed change for proper uptime support

* Updated tests to reflect new default values for uptime
2020-10-06 04:32:36 +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
Philip Wellnitz
59a5425597
Add timezone argument to date and fuzzy_time segments (#2097)
* add basic timezone support
2020-05-26 20:08:44 +09:00
Torstein Husebø
15c611ca46 doc: installation, fix typo (#2041)
* doc: installation, fix typo

* Fix a lot of documentation/comment typos
2019-11-03 04:29:20 +09:00
Philip Wellnitz
6569cc6cfd disable unstable network_load segment test 2019-10-08 16:05:45 +09:00
Philip Wellnitz
bc33b1ce31
fix #1969 (#2026) 2019-09-27 14:33:24 +02:00
Foo
4a834f38aa Only enable tracing for “final” suites: suites not having subsuites 2018-02-25 22:16:05 +03:00
Foo
2a01c4687e Supply segment_info to powerline.segments.env.user() segment in tests 2017-12-02 18:30:24 +03:00
Foo
cbea5357a9 Use different character for strwidth tests 2017-12-02 17:56:30 +03:00
Foo
eb5834cf3e Move version
I do not actually see this character in diff of EastAsianWidth.txt though, but 
it appears that test with 5.1.0 uses 2 and succeeds, tests with 6.0.0 and 8.0.0 
use 1 and succeed, but test with 5.2.0 uses 2 and fails.
2017-12-02 17:56:28 +03:00
Foo
335be73d3e Check unidata_version to determine width
Did not actually determine whether this check is correct.
2017-12-02 17:56:26 +03:00
Foo
f111a95b0d Change width to 1
May make test fail on older Python’s
2017-12-02 17:56:21 +03:00
Foo
2787855008 Disable travis hack
Assuming it is outdated.
2017-12-02 17:56:19 +03:00
Foo
30acc6ed4c Make default_leftonly theme use last_pipe_status 2017-05-16 19:34:27 +03:00
Foo
443679d532 Make last_pipe_status fallback to last_exit_code 2017-05-16 19:34:26 +03:00
Foo
de899c5fc5 Export pipe status in bash bindings 2017-05-16 19:34:26 +03:00
Foo
1303cd1b04 Move tests/run_*_tests.sh to tests/test_*/test.sh
Warning: this also makes shell tests run.
2017-04-30 22:40:43 +03:00
Foo
f3bf749467 Move tests run by run_python_tests to tests/test_python 2017-04-30 18:20:30 +03:00