summaryrefslogtreecommitdiff
path: root/src/plugins/python
AgeCommit message (Collapse)Author
2022-06-18doc: add trailing slashes in URLsSébastien Helleu
2022-03-17core: Fix regex for constants in the Python stub generatorTrygve Aaberge
In Python raw strings, newlines can't be escaped with a backslash. If you do that, both the backslash and the newline become part of the string. This meant that the regex for constants both started and ended with a newline which caused every other constant to be skipped.
2022-03-13python: add function buffer_new_props in Python stub fileSébastien Helleu
2022-03-13api: add function buffer_new_props (closes #1759)Sébastien Helleu
2022-03-12scripts: allow null values in config_new_optionTrygve Aaberge
The plugin API function config_new_option accepts null as the default_value and/or value however the scripting APIs (except for lua) didn't allow sending null as a parameter value, so it was impossible to use it this way. This allows sending a null value for these parameters. Lua already supported sending in nil for these parameters and it works as expected, so nothing is changed for this plugin. For Guile you can now send in #nil, for JavaScript null or undefined, for Perl undef, for PHP NULL, for Python None, for Ruby nil and for Tcl $::weechat::WEECHAT_NULL. In all of these languages except Tcl this is the special value indicating a missing value. However Tcl only has one type, string, so it doesn't have a null value. Therefore I created a constant with the value `\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF` which is used instead. This is very unlikely to appear unintentionally. Using the unicode code point \uFFFF was suggested on https://wiki.tcl-lang.org/page/null. I tested this with these scripts: https://gist.github.com/trygveaa/f91977dde5d2876d502bf55fbf9b50cc
2022-02-20doc/api: Add missing parameter to python prototype for config_new_sectionTrygve Aaberge
2022-02-20scripts: auto-load scripts with supported extensions only (closes #1698)Sébastien Helleu
2022-02-14doc/api: add missing type for argument "count" in Python prototype of ↵Sébastien Helleu
function ngettext
2022-01-30core: add support of date and tags in messages displayed in buffers with ↵Sébastien Helleu
free content, add function printf_y_date_tags (closes #1746)
2022-01-30doc/api: fix type of parameter "date" in script prototype of function ↵Sébastien Helleu
prnt_date_tags
2022-01-22python: fix crash in hook callbacks after script loading failure (closes #1740)Sébastien Helleu
2022-01-17core: update copyright datesSébastien Helleu
2021-11-06api: add parameters pointers, extra_vars and options in function hdata_searchSébastien Helleu
2021-10-02plugins: use a different plugin priority for each scripting languageSébastien Helleu
2021-05-14core: add generator and Python stub file for WeeChat API (issue #1377)Sébastien Helleu
2021-05-11core: split WeeChat home in 4 directories, use XDG directories by default ↵Sébastien Helleu
(issue #1285) The 4 directories (which can be the same): - config: configuration files, certificates - data: log/upgrade files, local plugins, scripts, xfer files - cache: script repository, scripts downloaded (temporary location) - runtime: FIFO pipe, relay UNIX sockets
2021-04-11doc: mark info "python2_bin" as deprecated since version 2.6 (plugin API ↵Sébastien Helleu
reference)
2021-01-02core: update copyright datesSébastien Helleu
2020-08-23api: add argument "bytes" in function string_dyn_concatSébastien Helleu
2020-08-22api: add function string_color_code_size (issue #1547)Sébastien Helleu
2020-07-07Add $weechat_sharedir/python for global python package importMarco Sirabella
Related: #1461 Some scripts (eg weechat-matrix) ship directories that need to be imported from the script. Rather than globally installing the python packages to python's `site-packages` the directories can be installed alongside the script in `WEECHAT_SHAREDIR/python`. This change adds that directory to the `$PYTHONPATH` to import successfully.
2020-06-21core: add bar option "color_bg_inactive" (issue #732)Sébastien Helleu
2020-05-08core: rename functions hook_completion_{get_string|list_add} to ↵Sébastien Helleu
completion_{get_string|list_add} Old functions are kept for compatibility reasons.
2020-04-28api: return integer in function gui_completion_search (issue #1484)Sébastien Helleu
2020-04-27api: add functions completion_new, completion_search and completion_free ↵Sébastien Helleu
(issue #1484)
2020-04-04python: fix crash when invalid UTF-8 string is in a WeeChat hashtable ↵Sébastien Helleu
converted to a Python dict (closes #1463)
2020-01-04core: update copyright datesSébastien Helleu
2019-11-12python: use more idiomatic cmake pkg-config linkingEli Schwartz
cmake documentation is absolutely atrocious, and I don't know why they mention all the wrong things to use, and the cargo cult of successfully writing a cmake build definition (copy-pasting what works from other projects) also uses all the wrong things. But it turns out it is possible to correctly link a PkgConfig target despite all that, at least, *iff* you use cmake >= 3.13. I've chosen option 2, which is to vendor in cmake >= 3.13's FindPkgConfig module in the previous commit. Using IMPORTED_TARGET GLOBAL in a pkg-config check will result in a proper linker target being created. For comparison, this is like using meson's dependency() target, except meson forces you to do this by default. The result is that the build system's internal representation of how to link something, is used instead of manually passing build flags defined in variables. This is an important distinction to make, because cmake does not have a list datatype, and instead turns lists into strings separated by ';' which are indistinguishable from, like, strings which contain ';' characters. When you pass the resulting list-which-isn't-really-a-list to link an executable/library, you either need to preprocess the variable to replace ';' with ' ' (just in case there are multiple elements) or use cmake functions which magically know to do this themselves -- or at least, I assume there are cmake functions that correctly handle so-called "lists", or there would be no need for "lists" to exist. The IMPORTED_TARGET will define a bunch of INTERFACE_* properties which do seem to do exactly this. The resulting build definition should actually, correctly, link python, thereby fixing #1398 in a better way.
2019-10-12python: send "bytes" instead of "str" to callbacks in Python 3 when the ↵Sébastien Helleu
string is not UTF-8 valid (issue #1220, closes #1389)
2019-10-01core: fix style in CMake filesSébastien Helleu
2019-08-31core: fix compilation of Python plugin on FreeBSD 12.0 (closes #1398)Sébastien Helleu
2019-07-31build: use pkg-config to properly link pythonEli Schwartz
fixes incorrect (non)detection of libpython3.Ym.so due to PEP 3149 since python's officially exported build flags know how to correctly link to python.
2019-06-15api: add argument "strip_items" in function string_splitSébastien Helleu
2019-04-25cmake: allow custom libdir (fix #1341)Ryan Farley
Allows for custom LIBDIR to specified with cmake builds. WEECHAT_LIBDIR is used for a custom Weechat directory, or set from LIBDIR (as LIBDIR used to be set).
2019-04-13api: return allocated string in hook_info callback and function info_getSébastien Helleu
2019-03-24core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage ↵Sébastien Helleu
options This option is OFF by default and should be enabled only for tests, to measure test coverage.
2019-03-10core: replace argument "keep_eol" by "flags" in function string_split ↵Sébastien Helleu
(closes #1322)
2019-02-28api: add function command_options (issue #928)Sébastien Helleu
2019-02-27api: add function string_match_listSébastien Helleu
2019-01-01core: update copyright datesSébastien Helleu
2018-11-29core: use https for links to GNU GPL licenseSébastien Helleu
2018-08-12api: add function hook_lineSébastien Helleu
2018-07-25scripts: fix duplicated lines in output of script eval (python, perl, ruby, ↵Sébastien Helleu
lua and guile) When there was a call to a hook callback during the eval, the output buffer was cleared too late, and displayed multiple times in the buffer. This commit clears the buffer even before we display it (this display can trigger a hook callback).
2018-07-12python: fix crash when loading a script with Python >= 3.7 (closes #1219)Sébastien Helleu
2018-04-13scripts: fix memory leak in hook_info callbackSébastien Helleu
2018-04-12scripts: fix return value of hook_infolist callback (pointer instead of string)Sébastien Helleu
2018-04-10scripts: return long integer instead of string in function infolist_timeSébastien Helleu
2018-04-10scripts: do not allocate memory when converting pointers to stringsSébastien Helleu
2018-04-07api: add function string_format_size in scripting APISébastien Helleu
2018-03-17scripts: hide message when the eval script is unloadedSébastien Helleu
Related to commit 8fbbe8b0d509df26ff86ca8cd7fe4b2205c6d15e.