| From: | Dave Page <dpage(at)pgadmin(dot)org> |
|---|---|
| To: | Jan Alexander Steffens <jan(dot)steffens(at)gmail(dot)com> |
| Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
| Subject: | Re: [pgAdmin4] [PATCH] Simplify Server's python setup |
| Date: | 2017-01-27 16:56:07 |
| Message-ID: | CA+OCxozasHZyxR1Tc=UG61BbNmykC7-et3kcsOs0T8Hxt=VObw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgadmin-hackers |
On Fri, Jan 27, 2017 at 1:37 PM, Jan Alexander Steffens
<jan(dot)steffens(at)gmail(dot)com> wrote:
> On Fri, Jan 27, 2017 at 12:04 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> On Thu, Jan 26, 2017 at 7:22 PM, Jan Alexander Steffens
>> <jan(dot)steffens(at)gmail(dot)com> wrote:
>> > Looking through the cpython code, Py_SetPath(NULL) clears the calculated
>> > module search path again. Try calling this before the Py_Initialize.
>>
>> Unfortunately that just crashes:
>
>
>>
>> 1 org.python.python 0x000000010daec349 PySys_SetPath + 24
>
>
> I did mean Py_SetPath, not PySys_SetPath.
Ah, OK - it wouldn't compile with that (Python 2 :-/ ) so I assumed it
was a typo.
> Unfortunately, after checking
> again it turns out this is Python 3 only. Python 2 has no means of changing
> the module_search_path from outside. So, there it definitely needs a
> restart. :-(
Yeah :-(. How does the attached patch look to you?
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Simplify-Server-s-python-setup-Dave-2.patch | application/octet-stream | 19.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | George Gelashvili | 2017-01-27 17:11:48 | Re: [Patch] Refactor sql template version picking |
| Previous Message | Dave Page | 2017-01-27 16:43:18 | Re: [Patch] Refactor sql template version picking |