Commit Graph

398 Commits

Author SHA1 Message Date
boulanger
b75b66fe4e Fix local run of testsuite on Windows
add_dll_directory will print the new directory in stdout which
will make the GS testsuite fails.
2023-02-09 12:12:16 +01:00
Anthony Leonardo Gracio
41c30ab309 Update copyright year (no-tn-check)
Change-Id: Ie2cf22f9729f30d2228572a7296c23889be4c563
2023-01-03 11:39:28 +01:00
Adrien Boulanger
8d588bfb0c S712-022: Python leaks related to FileLocation
Each FileLocation was leaking a File: they were keeping a pointer
to File without using any proxy to release them.
Break the dependency and only create the File from the FileLocation
when needed.

Add a test.

Change-Id: I1df713a7c0e6cc54f7c4912b803247b3189dcd92
2022-04-11 15:54:11 +00:00
Vadim Godunko
7e48a999ba V124-002 Rename GPS_ environment variables to GNATSTUDIO_.
Change-Id: I823ad31339e0a111cc76b81d8ff5765674c6983f
2022-01-24 13:48:59 +03:00
Vadim Godunko
cf1fe73a82 V124-002 Replace GNAT.OS_Lib by VSS.Environment.
Change-Id: I2e5ad0c81bda2109c8032a004dc3bb89c8959980
2022-01-24 13:37:11 +03:00
Vadim Godunko
4326d10823 V124-002 Allow to specify few paths to lookup DLLs.
Change-Id: I320c6a2866f2d02d8f12b610d302e297debcac81
2022-01-24 12:05:54 +03:00
Nicolas Setton
2b886cac44 UC20-014 Expect Python to be under share/gnatstudio/python
... and expect this to be a full Python installation, meaning
there is no longer the need for the hack on "Program_Name".

Depends-On: Ie1db8e10bc57c4fd0cccde5b5da30cac45209ade
Change-Id: Iaf89c8b7c51bad0c2d57199b144a13a346bb9cce
2022-01-17 15:56:18 +00:00
Adrien Boulanger
3ac9853c7e UC15-039: add_dll_directory is windows only
Change-Id: Id862ef6aff7c6c6aab8dc7d159b74e69f3b41a8e
2022-01-10 15:09:38 +00:00
boulanger
81c22c0885 UC15-039: load dll in GPS_GTKDLL if set
This is needed for the GS spawn via ancr because gtk dll needed by
python4gnatstudio are not located in the same directory.

Change-Id: I04725fd35562cc8ec64a2a25cf1d6e686c93de35
2022-01-10 15:09:38 +00:00
Adrien Boulanger
295f334e84 U914-005: Transition from python 3.7 to 3.9
- Fix "is not" warnings
- ReadPlist has been removed
- Fix crash related to wrong __repr__ definition
- Add defensive GIL lock in the hooks
- Following the parso/jedi bumped, update the python completion
to use the new API.

(no-precommit-check)

Change-Id: I2e027361b17d0f0101763901ba3064b204a56799
2022-01-10 15:09:38 +00:00
Anthony Leonardo Gracio
af4c8f2d41 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: Id71d3f84cd6ab219a37821da1460038f4eea525c
2022-01-03 15:09:31 +01:00
Nicolas Setton
28d7eb1336 UC14-048 Pass 'gnatstudio' as Python "Program_Name"
... unless we're in development mode and using "GPS_PYTHONHOME".

Add a block of explanatory comment.

Change-Id: I7ed3856f20bb795a3e812454af2913dadae5ca16
2021-12-20 13:00:28 +00:00
Nicolas Setton
1a42b2d60f U330-020 Enforce utf8 Python source encoding
Python source files should be encoded in utf-8 by default, but on Windows
our Python interpreter uses cp1252 instead. Adjust this by overriding the
function that returns the encoding.

Change-Id: Ie52f0e933d299ba858fc7a1c5137b15a9a543375
2021-03-30 07:00:35 -04:00
Adrien Boulanger
a702e282dd TC16-004: Replace __cmp__ by the full comp/sort API
__cmp__ is not supported by python 3

Change-Id: I0ac93a54c60a583357cc311a6212f58d753ca1eb
2021-03-03 17:33:56 +01:00
Vadim Godunko
dc4569feaf T109-039 Fix compilation failure in dev env
Change-Id: I9cbbb00a0e454d16c4660c78b6384a864e5445ba
2021-03-03 09:06:07 +03:00
Vadim Godunko
d75f5ce0a8 T109-039 Protect calls to Python C API.
Change-Id: I53fa492609cf7c79839992265aa1d341347ca070
2021-02-22 13:28:54 +03:00
Vadim Godunko
c39299441a Remove commented out line.
(no-tn-check)

Change-Id: I554432a5687fb5cb3645d25712b9309e44baaca9
2021-02-22 13:28:54 +03:00
Anthony Leonardo Gracio
63c2e9d9c9 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: I50abdaba131d76d914f1df9a53f013ec8f48ca68
2021-01-11 17:22:37 +01:00
Adrien Boulanger
172aaf4eaf TA14-030: Python coverage in GS
Monitor the new environment variable GNATSTUDIO_PYTHON_COV.
This variable must be set to the name of the directory being
tested.

Add --pycov switch in the testsuite CLI.

Create a pycov_data repository containing:
- preferences in the form of .coveragerc
- pycov_startup.xml: when put in $GNATSTUDIO_HOME\startup.xml
enabled all the plugins.
- all the generated file in the form of .coverage.${test_name}

When all the file are generated, run:
$ coverage combine # ignore this if there is only one .coverage*
$ coverage report
$ coverage html    # optional

Change-Id: I4b45243924d939ede5b885ff86541a6d70571b0c
2020-11-04 14:42:43 +01:00
Andry Ogorodnik
fd3caf3477 S903-025 GS acronym has been added into Python API.
no-precommit-check

Change-Id: I785d68130051e8d12f4a6b627cb1ad5b48f903e5
2020-11-04 11:05:12 +01:00
Andry Ogorodnik
5a7e5d0193 TA29-031 Python console local toolbar with Clear button
Also "clear" command has been added for Python console

Change-Id: Ib2e5b2c73fecee4903fb3b8e362d1271cc4b3adf
2020-11-03 16:49:15 +01:00
Andry Ogorodnik
d9993c6c21 S903-025 Rename GPS to GNAT Studio in comments, strings
Depends-On: If8db363de9c59b395772b715a838e3a785b568d7
Change-Id: I509eebd12037a49e0ff751220c7f6911b7480694
2020-10-28 12:03:44 +01:00
Andry Ogorodnik
881ee959f8 SB22-061 Add gps_utils support for gnatstudio/plugins directory
Some customers place their plugins in this directory, so we add
gps_utils -> gs_utils alias immediately after gs_utils has been
loaded.

Change-Id: Icd4a88baf55c41d197e330e1627c2586a86fb5dc
2020-01-13 15:27:04 +01:00
Adrien Boulanger
4f4904c818 Update Copyright 2019 => 2020.
(no-tn-check)

Change-Id: I7b854142151c6fc934c80c14dbe085e8bc7f6bb7
2020-01-07 10:45:26 +01:00
Andry Ogorodnik
48011f905a S904-001 Rename GPS_help.py to GS_help.py
Change-Id: I9b80fdd16968aa96ab95a9087d976b5b4da90f52
2019-11-06 15:29:10 +01:00