summaryrefslogtreecommitdiff
path: root/scripting/source/pyprov
AgeCommit message (Collapse)Author
2020-05-14fix python 3.8 deprecation warningsNoel Grandin
the logo changes were caused by > Support of nested sets and set operations as in Unicode Technical Standard > #18 might be added in the future. This would change the syntax, so to facilitate > this change a FutureWarning will be raised in ambiguous cases for the time being. > That includes sets starting with a literal '[' or containing literal character > sequences '--', '&&', '~~', and '||'. > To avoid a warning escape them with a backslash. Change-Id: I4d48be3df2eaadf03a9d1f5750c0c94b3abbf674 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94191 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-09pyuno,*: kill Python 2 support with fireMichael Stahl
Python 2 support was retained for use with --enable-python=system on RHEL7 and SLES. The time has arrived to remove it. Some .py files that were imported from third parties are not changed to enable easier replacement with updated versions if necessary. solenv/gdb should continue to support Python 2. bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access Launchpad. Change-Id: I26414ae8e9f8402c90336af82020135685694217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-06scripting: mailmerge.py: remove Python 3.0/3.1 supportMichael Stahl
Change-Id: I934b8f07f99aca1cbc7489f019c905a79acab258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91695 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-28sys.version is for displaying; use sys.version_info for version checkMike Kaganski
Change-Id: If0d26019d9f842bcf56c1e01c46cc86c21523c3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87476 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-19Improve check for absolute URIStephan Bergmann
Change-Id: I4dee44832107f72f8f3fb68554428dc1e646c346 Reviewed-on: https://gerrit.libreoffice.org/77706 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-16member 'Context' of struct type 'uno.Exception' not given a valueCaolán McNamara
Change-Id: Ie80f729e5c1dbf3214f9532dcb935b239bac7997 Reviewed-on: https://gerrit.libreoffice.org/77566 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16AttributeError on getMessageCaolán McNamara
Change-Id: If0bd315fe605b850ec397eb2267b08ad8039355c Reviewed-on: https://gerrit.libreoffice.org/77565 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16an absolute uri is invalid inputCaolán McNamara
Change-Id: I392be4282be8ed67e3451b28d2c9f22acd4c87fc Reviewed-on: https://gerrit.libreoffice.org/77564 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-13construct final url from parsed outputCaolán McNamara
Change-Id: Ifd733625a439685ad307603eb2b00bf463eb9ca9 Reviewed-on: https://gerrit.libreoffice.org/77373 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-06keep name percent-encodedStephan Bergmann
Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b Reviewed-on: https://gerrit.libreoffice.org/76892 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19keep pyuno script processing below base uriCaolán McNamara
Change-Id: Icc13fb7193fb1e7c50e0df286161a10b4ed636c7 Reviewed-on: https://gerrit.libreoffice.org/61957 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-05-05Fix typosAndrea Gelmini
Change-Id: Id7d66c06e18dbccd5c85ba36143bdb6cee7a5197 Reviewed-on: https://gerrit.libreoffice.org/53564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-27tdf#117202 more pythonic and allow spaces as argumentLaurent Godard
space argument must be encapsulated in double-quotes that will be stripped Change-Id: I0387cc7f3fcb4cc48c5a94afcd481306bb4644e2 Reviewed-on: https://gerrit.libreoffice.org/53453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-25tdf#117202 - parse function name to get argumentsLaurent Godard
they are then aggregated to the other and passed to the function Change-Id: I158a747de9c22d50716fc066074a593b4928d6bf Reviewed-on: https://gerrit.libreoffice.org/53424 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-28Fix class name in debug messageTor Lillqvist
Change-Id: I171e74a34273ddf969e49260fec487dd8cf2fb12 Reviewed-on: https://gerrit.libreoffice.org/51981 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-03-27Bin some dead codeTor Lillqvist
We defined the same function member in the class PythonScriptProvider twice. The first one was some accidental leftover surely. Change-Id: I10eebab7084af790a9263176f01f7817fa5124ff Reviewed-on: https://gerrit.libreoffice.org/51965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-30tdf#63388: use SMTP_SSL for port 465Justin Luth
Thanks to Jurassic Pork and prrychr (tdf#99363) for the 2016 patch. I used smtp.gmail.com as my testing server. Port 587 is the "official" port to use for encrypted email. I confirmed that 587 CANNOT use SMTP_SSL [SSL: UNKNOWN_PROTOCOL], so I limited SMTP_SSL use to common TLS port 465 only. Port 465 was temporarily recommended, but OFFICIALLY has long since been abandoned. However, LOTS of documentation and ISPs still recommend it as the port to use. I confirmed that 465 DOES NOT support STARTTLS, so it is specifically excluded. So, technically the button should say use STARTTLS instead of SSL, but only for SMTP. IMAP/POP do use SSL, so terminology gets rather confusing. This patch forces SSL without STARTTLS for port 465 regardless of the "use SSL" setting due to all the confusion. Currently we don't support ANY SSL/TLS connections. With this patch we now at least support the extremely common use case of port 465. Change-Id: I210cc307491157c1121cfffd70cbb94347ee2856 Reviewed-on: https://gerrit.libreoffice.org/48210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2018-01-24scripting: add missing vim modelines to python filesMiklos Vajna
Change-Id: Iedc3a8ab37deeb7a686fa709afb0cf350f815ec6 Reviewed-on: https://gerrit.libreoffice.org/48418 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-30mailmerge.py: Use strip in server nameXisco Fauli
Using spaces in the dialog might lead to incorrect server name Change-Id: I29a1ffa867d2e415338accf98bb45c7d65b14fa2 Reviewed-on: https://gerrit.libreoffice.org/44052 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-12tdf#92007 python scripts with tuple-assignments fails on access from GUIWerner Tietz
Change-Id: Ice1d7d92cec56751cb26cbb31a5995ab30895125 Reviewed-on: https://gerrit.libreoffice.org/36399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-19Fix typos + some German translationsAndrea Gelmini
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253 Reviewed-on: https://gerrit.libreoffice.org/35406 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-12-18tdf#103363: add unicodedata and import idna encoding for mailmergeJulien Nabet
Thank you Moggi for your help on how to add unicodedata module to Python! Change-Id: I071e9279d1de4748f9443ac2d624fe925288e408 Reviewed-on: https://gerrit.libreoffice.org/32140 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-10-26normalize existing emacs/vim mode-lines in python filesMichael Stahl
Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
2016-08-09python macros aren't listed under scripting organizeCaolán McNamara
since... commit deb989dd6d1f86e74864131be50ed92d8d43768c Author: Kenneth Koski <mechaxl@gmail.com> Date: Mon Feb 29 22:22:10 2016 -0600 blew away the uno.ByteSequence(str) path Change-Id: I8b73883c4f246ebafd2f810ca61b19da40f833e2
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-09-30Fix typosAndrea Gelmini
Change-Id: Idd4b0f7b6c422abd6790185b5d48082b294bae64 Reviewed-on: https://gerrit.libreoffice.org/18968 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30Script: better way to detect WindowsAndrea Gelmini
Change-Id: I0e99443f3715cde4414d14b2fa507ecab0995c6d Reviewed-on: https://gerrit.libreoffice.org/18937 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-03-17Fix various XServiceInfo implementationsStephan Bergmann
...to match what is recorded in the .component files Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2015-03-02pyuno, scripting: remove executable bits from python, js, bsh filesMichael Stahl
Change-Id: Id108693d84fbca7764614e126ee1b3b045baec17
2014-12-02pyuno: move "officehelper.py" from scripting to pyunoMichael Stahl
... because at least in Fedora packages with system python it's a pain to use officehelper.bootstrap() because unlike pyuno it is not installed in the standard python directories but in libreoffice/program. You might think that bootstrap() is not appropriate functionality for a UNO langauge binding, but then why does ::cppu::bootstrap() exist? Change-Id: I5fd4b344a811c087d32fb6304e55105ab3cb137e Reviewed-on: https://gerrit.libreoffice.org/12968 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-09-17BRAND_BIN_SUBDIR -> BRAND_INI_DIR, to cater for new Mac OS X layoutStephan Bergmann
Change-Id: Ic367545895a25a4cf6e95fc1be2f5db9f36a221b
2013-08-21deb#719941: pythonscript.py: use open() instead of file()Rene Engelhard
Change-Id: Ib9f06b2b5629d149e932fe37312fdf5e8448c39f
2013-08-20deb#719941: unbreak python script provider debug logging on Python 3Michael Stahl
Don't mess with encoding in Logger.log, since sys.stdout.write() accepts str (in python3) and both str/unicode (in python2) anyway. Change-Id: Ib0339b7fd882a7654cc24c38efdaf67f519663ff
2013-08-18Use subfolder names from <config_folders.h>Tor Lillqvist
Change all instances of hardcoded "program", "share" etc subfolder names to use those from <config_folders.h> instead. In normal builds, the end result will not change. Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-07-15Related: fdo#66761 the double-encoding bug appears gone in python 3.3.2Caolán McNamara
i.e. I see the bug in our built-in python3 3.3.0 but not in my system python 3.3.2 and there's a raft of email related bug fixes in the 3.3.2/3.3.1 python Changelog Change-Id: I257770cd0ec41fc3b2f2a638009b075b9a2f325f
2013-07-14Related: fdo#66761 we want the bytes, not a str representation of themCaolán McNamara
Change-Id: I3c268b0c51f7e1ddd2fa6588f40412a33f316b52
2013-07-13Resolves: fdo#66761 Macro controlled Python Mailmerge brokenCaolán McNamara
Change-Id: Id8bbf06a5571534aa5eef8624e89565fe3715938
2013-07-12Resolves: #i120083# make python loglevel and log output changeable...Herbert Dürr
through environment vars Set the log level with the environment variable "PYSCRIPT_LOG_LEVEL" "DEBUG" (for debugging) "ERROR" (show errors only) "NONE" (or anything else) (for production) is the default and the log output type with the enviroment variable "PYSCRIPT_LOG_STDOUT" "0" (log output to user/Scripts/python/log.txt) "1" (or anything else) (log output to stdout) Patch by: Tsutomu Uchino <hanya.runo@gmail.com> Review by: Herbert Durr <hdu@apache.org> Note: Commit message edited by ASF infra team to work around a known issue with the ASF svn install (not an issue with svn) and UTF-8 handling. This is a temporary issue that we hope to resolve soon. (cherry picked from commit 9dc7f72febe9d294304f70cc7b9cdeab1c67dc8b) Change-Id: I099c8b3f812559c380078f63b692c83fdc811e33
2013-06-18add python ver to debugging infoCaolán McNamara
Change-Id: Idd2130a0f8c0190ab075f5e80021aa99a57939e8
2013-06-17Resolves: fdo#55411 python 2 vs 3 str/bytes encoding issuesCaolán McNamara
Change-Id: Ic1aac1609f3a1fcbd0af9a1c9ecc07a735c8785a
2013-05-24Resolves: #i55055# Simplify pythonscript.py codePedro Giffuni
author: hanya (cherry picked from commit e945b49105bab50700274f797e41d1446a70641d) Conflicts: scripting/source/pyprov/pythonscript.py Change-Id: Ia019a737c5f80d3af9fc50aefcda6f5b00987513
2013-05-11Resolves: #ii118478# Implement getInvocationContext in PyUNO ScriptContextAriel Constenla-Haile
Original author: Tsutomu Uchino <hanya.runo at gmail.com> (cherry picked from commit 5de5fd495d7cdad852d1631941ae03ec213f93b7) Change-Id: Iaa0aa8b1dd6a326cd738f2e296a1b5ecdc379c65
2013-04-30Move to MPLv2 license headers, with ESC decision and author's permission.Michael Meeks
2013-04-18date/time IDL datatypes incompatible changeLionel Elie Mamane
- nanosecond precision - signed (allowed negative) year Also: assorted improvements / bugfixes in date/time handling code. Some factorisation of copy/pasted code. Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-02-22scripting: s/pathes/paths and s/Pathes/PathsMiklos Vajna
Change-Id: I58d8e8dc9c6a6864206d923165d075114368c866
2013-01-15make emailmerge work with python3 and python2 at the same timeCaolán McNamara
Change-Id: I6289b522513a2fc86e261c85a04ca9c89fd55b63
2013-01-15tidy mailmerge debuging messagesCaolán McNamara
Change-Id: Ibca2af0efa448ed4c2c5b7ad73febf16cbf03480
2013-01-15make emailmerge work for me with python3Caolán McNamara
Change-Id: I4f79aa69b39d2be8fcceacc90b858f116f875385
2013-01-15i118814 - Allow set connection timeout in Mail APIAriel Constenla-Haile
Conflicts: scripting/source/pyprov/mailmerge.py Change-Id: I7a3eb3b29f41eed154abd45e1aa5be824983f5de
2013-01-15i118791 - Encode ReadableName in UTF-8 only when necessaryAriel Constenla-Haile
Conflicts: scripting/source/pyprov/mailmerge.py Change-Id: I5275bdbbc21f422248a32b824ea6de965c23abd0