Re: [Python-Dev] Debugging Python scripts with GDB on OSX

2016-10-14 Thread Christian Tismer
Hi Alexandru,

because I know that you are multi-platform, I can recommend the
debugger integration of PTVS very much.

I am currently using the WingWare debugger for all my projects,
but the Python/C++ integration of PTVS is something that I didn't
find anywhere else!

Please have a look at the following introduction.

https://www.youtube.com/watch?v=JNNAOypc6Ek

Starting with minute 22, you will find the kind of debugging that
you are looking for.

I was pretty amazed by this, and it is probably very helpful in
debugging Qt and PySide. Will give it a try, soon.

Cheers -- Chris


On 14/10/2016 11:12, Alexandru Croitor wrote:
> Hi,
> 
> pdb is fine for pure python scripts.
> 
> I was interested in things like getting the python back trace or local
> variables from inside GDB, when used in conjunction with c++, so that I
> know which parts of C++ calls python functions, and which parts of
> python call c++ functions. You can't do that with pdb.
> 
> 
>> On 13 Oct 2016, at 19:12, Christian Tismer > > wrote:
>>
>> Hi Alexandru,
>>
>> I stumbled over this question a little late by chance. 
>>
>> There is the possibility to use GDB, but it is most likely that you
>> want to use python's pdb module, instead. 
>>
>> Only in rare cases, when debugging the interpreter itself, you use
>> gdb. For debugging Python code, use pdb or something better. 
>>
>> Sent from my Ei4Steve
>>
>> On Jul 6, 2016, at 18:14, Alexandru Croitor > > wrote:
>>
>>> Hello,
>>>
>>> I'm interested to find out if debugging Python scripts with GDB is
>>> supported on OSX at all?
>>>
>>> I'm referring to the functionality described
>>> on https://wiki.python.org/moin/DebuggingWithGdb and
>>> on http://fedoraproject.org/wiki/Features/EasierPythonDebugging.
>>>
>>> I've tried so far various combinations of pre-compiled GDB from the
>>> homebrew package manager, locally-compiled GDB from homebrew, as well
>>> as locally compiled GDB from MacPorts, together with a pre-compiled
>>> Python 2.7, homebrew-compiled 2.7, and custom compiled Python 2.7
>>> from the official source tarball.
>>>
>>> My results so far were not successful. The legacy GDB commands to
>>> show a python stack trace or the local variables - do not work. And
>>> the new GDB commands (referenced on the Fedora project page) are not
>>> present at all in any of the GDB versions.
>>>
>>> I've checked the python CI build bot tests, and it seems the new GDB
>>> commands are only successfully tested on Linux machines, and are
>>> skipped on FreeBSD, OS X, and Solaris machines.
>>>
>>> Are the new python <-> GDB commands specific to Linux?
>>> Are there any considerations to take in regards to debug symbols for
>>> Python / GDB on OSX?
>>>
>>> Has anyone attempted what I'm trying to do?
>>>
>>> I would be grateful for any advice.
>>>
>>> And I apologize if my choice of the mailing lists is not the best.
>>>
>>> Regards, Alex.
>>>
>>>
>>> ___
>>> Python-Dev mailing list
>>> [email protected] 
>>> https://mail.python.org/mailman/listinfo/python-dev
>>> Unsubscribe:
>>> https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com
> 


-- 
Christian Tismer :^)   [email protected]
Software Consulting  : http://www.stackless.com/
Karl-Liebknecht-Str. 121 : https://github.com/PySide
14482 Potsdam: GPG key -> 0xFB7BEE0E
phone +49 173 24 18 776  fax +49 (30) 700143-0023
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Update to PEP 1 re: content type

2016-10-14 Thread Nick Coghlan
On 14 October 2016 at 06:32, Guido van Rossum  wrote:
> Confirming, +1 from me. Barry, Nick? You two are the most active
> authors of PEP 1.

I've merged the PR that Barry wrote to address Mariatta's query, so I
guess that counts as +1's from both of us :)

Cheers,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Debugging Python scripts with GDB on OSX

2016-10-14 Thread Alexandru Croitor
Hi,

pdb is fine for pure python scripts.

I was interested in things like getting the python back trace or local 
variables from inside GDB, when used in conjunction with c++, so that I know 
which parts of C++ calls python functions, and which parts of python call c++ 
functions. You can't do that with pdb.


On 13 Oct 2016, at 19:12, Christian Tismer 
mailto:[email protected]>> wrote:

Hi Alexandru,

I stumbled over this question a little late by chance.

There is the possibility to use GDB, but it is most likely that you want to use 
python's pdb module, instead.

Only in rare cases, when debugging the interpreter itself, you use gdb. For 
debugging Python code, use pdb or something better.

Sent from my Ei4Steve

On Jul 6, 2016, at 18:14, Alexandru Croitor 
mailto:[email protected]>> wrote:

Hello,

I'm interested to find out if debugging Python scripts with GDB is supported on 
OSX at all?

I'm referring to the functionality described on 
https://wiki.python.org/moin/DebuggingWithGdb and on 
http://fedoraproject.org/wiki/Features/EasierPythonDebugging.

I've tried so far various combinations of pre-compiled GDB from the homebrew 
package manager, locally-compiled GDB from homebrew, as well as locally 
compiled GDB from MacPorts, together with a pre-compiled Python 2.7, 
homebrew-compiled 2.7, and custom compiled Python 2.7 from the official source 
tarball.

My results so far were not successful. The legacy GDB commands to show a python 
stack trace or the local variables - do not work. And the new GDB commands 
(referenced on the Fedora project page) are not present at all in any of the 
GDB versions.

I've checked the python CI build bot tests, and it seems the new GDB commands 
are only successfully tested on Linux machines, and are skipped on FreeBSD, OS 
X, and Solaris machines.

Are the new python <-> GDB commands specific to Linux?
Are there any considerations to take in regards to debug symbols for Python / 
GDB on OSX?

Has anyone attempted what I'm trying to do?

I would be grateful for any advice.

And I apologize if my choice of the mailing lists is not the best.

Regards, Alex.


___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Summary of Python tracker Issues

2016-10-14 Thread Python tracker

ACTIVITY SUMMARY (2016-10-07 - 2016-10-14)
Python tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.

Issues counts and deltas:
  open5527 (+10)
  closed 34673 (+49)
  total  40200 (+59)

Open issues with patches: 2397 


Issues opened (37)
==

#28386: Improve documentation about tzinfo.dst(None)
http://bugs.python.org/issue28386  opened by Daniel Moisset

#28387: double free in io.TextIOWrapper
http://bugs.python.org/issue28387  opened by scufre

#28393: Update encoding lookup docs wrt #27938
http://bugs.python.org/issue28393  opened by scop

#28395: Remove unnecessary semicolons
http://bugs.python.org/issue28395  opened by scop

#28396: Remove *.pyo references from man page
http://bugs.python.org/issue28396  opened by scop

#28398: Return singleton empty string in _PyUnicode_FromASCII
http://bugs.python.org/issue28398  opened by xiang.zhang

#28401: Don't support the PEP384 stable ABI in pydebug builds
http://bugs.python.org/issue28401  opened by stefanor

#28403: Porting guide: disabling & warning on implicit unicode convers
http://bugs.python.org/issue28403  opened by ncoghlan

#28407: Improve coverage of email.utils.make_msgid()
http://bugs.python.org/issue28407  opened by dillon.brock

#28408: Fix redundant code and memory leak in _PyUnicodeWriter_Finish
http://bugs.python.org/issue28408  opened by xiang.zhang

#28409: test.regrtest does not support multiple -x flags
http://bugs.python.org/issue28409  opened by cstratak

#28410: Add convenient C API for "raise ... from ..."
http://bugs.python.org/issue28410  opened by serhiy.storchaka

#28411: Eliminate PyInterpreterState.modules.
http://bugs.python.org/issue28411  opened by eric.snow

#28412: os.path.splitdrive documentation out of date
http://bugs.python.org/issue28412  opened by snooter

#28414: SSL match_hostname fails for internationalized domain names
http://bugs.python.org/issue28414  opened by abracadaber

#28415: PyUnicode_FromFromat interger format handling different from p
http://bugs.python.org/issue28415  opened by xiang.zhang

#28416: defining persistent_id in _pickle.Pickler subclass causes refe
http://bugs.python.org/issue28416  opened by cwitty

#28418: Raise Deprecation warning for tokenize.generate_tokens
http://bugs.python.org/issue28418  opened by mbussonn

#28422: multiprocessing Manager mutable type member access failure
http://bugs.python.org/issue28422  opened by vilnis.termanis

#28424: pkgutil.get_data() doesn't work with namespace packages
http://bugs.python.org/issue28424  opened by dgreiman

#28425: Python3 ignores __init__.py that are links to /dev/null
http://bugs.python.org/issue28425  opened by dgreiman

#28426: PyUnicode_AsDecodedObject can only return unicode now
http://bugs.python.org/issue28426  opened by xiang.zhang

#28427: WeakValueDictionary next bug (with multithreading)
http://bugs.python.org/issue28427  opened by arigo

#28428: Rename _futures module to _asyncio
http://bugs.python.org/issue28428  opened by inada.naoki

#28429: ctypes fails to import with grsecurity's TPE
http://bugs.python.org/issue28429  opened by Glandos

#28430: asyncio: C implemeted Future cause Tornado test fail
http://bugs.python.org/issue28430  opened by inada.naoki

#28431: socket gethostbyaddr returns IPv6 names for 127.0.0.1
http://bugs.python.org/issue28431  opened by carbonin

#28432: Fix doc of PyUnicode_EncodeLocale
http://bugs.python.org/issue28432  opened by xiang.zhang

#28435: test_urllib2_localnet.ProxyAuthTests fails with no_proxy and N
http://bugs.python.org/issue28435  opened by Piotr Szczepaniak

#28436: GzipFile doesn't properly handle short reads and writes on the
http://bugs.python.org/issue28436  opened by abacabadabacaba

#28437: Class definition is not consistent with types.new_class
http://bugs.python.org/issue28437  opened by neil.g

#28439: Remove redundant checks in PyUnicode_EncodeLocale
http://bugs.python.org/issue28439  opened by xiang.zhang

#28440: pip failures on macOS Sierra
http://bugs.python.org/issue28440  opened by Marc.Culler

#28441: sys.executable is ambiguous on Cygwin without .exe suffix
http://bugs.python.org/issue28441  opened by erik.bray

#28442: tuple(a list subclass) does not iterate through the list
http://bugs.python.org/issue28442  opened by siming85

#28443: Logger methods never use kwargs
http://bugs.python.org/issue28443  opened by jb098

#28444: Missing extensions modules when cross compiling python 3.5.2 f
http://bugs.python.org/issue28444  opened by bennykj



Most recent 15 issues with no replies (15)
==

#28444: Missing extensions modules when cross compiling python 3.5.2 f
http://bugs.python.org/issue28444

#28443: Logger methods never use kwargs
http://bugs.python.org/issue28443

#28442: tuple(a list subclass) does not iterate through the list
http://bugs.python.org/issue28442

#28441: sys.executable is ambiguous on Cygwin 

Re: [Python-Dev] Debugging Python scripts with GDB on OSX

2016-10-14 Thread Wes Turner
On Friday, October 14, 2016, Alexandru Croitor 
wrote:

> Hi,
>
> pdb is fine for pure python scripts.
>
> I was interested in things like getting the python back trace or local
> variables from inside GDB, when used in conjunction with c++, so that I
> know which parts of C++ calls python functions, and which parts of python
> call c++ functions. You can't do that with pdb.
>

>From https://westurner.org/wiki/awesome-python-testing#advanced-debugging :

- https://hg.python.org/cpython/file/tip/Tools/gdb/libpython.py

- https://github.com/lmacken/pyrasite/blob/develop/README.rst mentions
something about codesigned GDB and OSX.
 - https://sourceware.org/gdb/wiki/BuildingOnDarwin

- https://github.com/google/pyringe doesnt mention OSX.

- dtrace probably doesn't help with stack traces or local variables:
  -
https://github.com/benesch/python-dtrace-tracker/blob/master/dtrace-osx-apple.27.patch

Are there error messages?



>
> On 13 Oct 2016, at 19:12, Christian Tismer  > wrote:
>
> Hi Alexandru,
>
> I stumbled over this question a little late by chance.
>
> There is the possibility to use GDB, but it is most likely that you want
> to use python's pdb module, instead.
>
> Only in rare cases, when debugging the interpreter itself, you use gdb.
> For debugging Python code, use pdb or something better.
>
> Sent from my Ei4Steve
>
> On Jul 6, 2016, at 18:14, Alexandru Croitor  > wrote:
>
> Hello,
>
> I'm interested to find out if debugging Python scripts with GDB is
> supported on OSX at all?
>
> I'm referring to the functionality described on https://wiki.python.org/
> moin/DebuggingWithGdb and on http://fedoraproject.org/wiki/Features/
> EasierPythonDebugging.
>
> I've tried so far various combinations of pre-compiled GDB from the
> homebrew package manager, locally-compiled GDB from homebrew, as well as
> locally compiled GDB from MacPorts, together with a pre-compiled Python
> 2.7, homebrew-compiled 2.7, and custom compiled Python 2.7 from the
> official source tarball.
>
> My results so far were not successful. The legacy GDB commands to show a
> python stack trace or the local variables - do not work. And the new GDB
> commands (referenced on the Fedora project page) are not present at all in
> any of the GDB versions.
>
> I've checked the python CI build bot tests, and it seems the new GDB
> commands are only successfully tested on Linux machines, and are skipped on
> FreeBSD, OS X, and Solaris machines.
>
> Are the new python <-> GDB commands specific to Linux?
> Are there any considerations to take in regards to debug symbols for
> Python / GDB on OSX?
>
> Has anyone attempted what I'm trying to do?
>
> I would be grateful for any advice.
>
> And I apologize if my choice of the mailing lists is not the best.
>
> Regards, Alex.
>
>
> ___
> Python-Dev mailing list
> [email protected]
> 
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> tismer%40stackless.com
>
>
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Debugging Python scripts with GDB on OSX

2016-10-14 Thread Alexandru Croitor
Hi,

I'm aware of PTVS, but I was hoping of getting a crude version of that for 
macOS, which you could say that GDB provides.

Unfortunately the GDB functionality only works on Linux, which is why I sent my 
message in the first place, hoping that I might be missing something.

Regards,

Alex.


> On 14 Oct 2016, at 11:56, Christian Tismer  wrote:
> 
> Hi Alexandru,
> 
> because I know that you are multi-platform, I can recommend the
> debugger integration of PTVS very much.
> 
> I am currently using the WingWare debugger for all my projects,
> but the Python/C++ integration of PTVS is something that I didn't
> find anywhere else!
> 
> Please have a look at the following introduction.
> 
> https://www.youtube.com/watch?v=JNNAOypc6Ek
> 
> Starting with minute 22, you will find the kind of debugging that
> you are looking for.
> 
> I was pretty amazed by this, and it is probably very helpful in
> debugging Qt and PySide. Will give it a try, soon.
> 
> Cheers -- Chris
> 
> 
> On 14/10/2016 11:12, Alexandru Croitor wrote:
>> Hi,
>> 
>> pdb is fine for pure python scripts.
>> 
>> I was interested in things like getting the python back trace or local
>> variables from inside GDB, when used in conjunction with c++, so that I
>> know which parts of C++ calls python functions, and which parts of
>> python call c++ functions. You can't do that with pdb.
>> 
>> 
>>> On 13 Oct 2016, at 19:12, Christian Tismer >> > wrote:
>>> 
>>> Hi Alexandru,
>>> 
>>> I stumbled over this question a little late by chance. 
>>> 
>>> There is the possibility to use GDB, but it is most likely that you
>>> want to use python's pdb module, instead. 
>>> 
>>> Only in rare cases, when debugging the interpreter itself, you use
>>> gdb. For debugging Python code, use pdb or something better. 
>>> 
>>> Sent from my Ei4Steve
>>> 
>>> On Jul 6, 2016, at 18:14, Alexandru Croitor >> > wrote:
>>> 
 Hello,
 
 I'm interested to find out if debugging Python scripts with GDB is
 supported on OSX at all?
 
 I'm referring to the functionality described
 on https://wiki.python.org/moin/DebuggingWithGdb and
 on http://fedoraproject.org/wiki/Features/EasierPythonDebugging.
 
 I've tried so far various combinations of pre-compiled GDB from the
 homebrew package manager, locally-compiled GDB from homebrew, as well
 as locally compiled GDB from MacPorts, together with a pre-compiled
 Python 2.7, homebrew-compiled 2.7, and custom compiled Python 2.7
 from the official source tarball.
 
 My results so far were not successful. The legacy GDB commands to
 show a python stack trace or the local variables - do not work. And
 the new GDB commands (referenced on the Fedora project page) are not
 present at all in any of the GDB versions.
 
 I've checked the python CI build bot tests, and it seems the new GDB
 commands are only successfully tested on Linux machines, and are
 skipped on FreeBSD, OS X, and Solaris machines.
 
 Are the new python <-> GDB commands specific to Linux?
 Are there any considerations to take in regards to debug symbols for
 Python / GDB on OSX?
 
 Has anyone attempted what I'm trying to do?
 
 I would be grateful for any advice.
 
 And I apologize if my choice of the mailing lists is not the best.
 
 Regards, Alex.
 
 
 ___
 Python-Dev mailing list
 [email protected] 
 https://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com
>> 
> 
> 
> -- 
> Christian Tismer :^)   [email protected]
> Software Consulting  : http://www.stackless.com/
> Karl-Liebknecht-Str. 121 : https://github.com/PySide
> 14482 Potsdam: GPG key -> 0xFB7BEE0E
> phone +49 173 24 18 776  fax +49 (30) 700143-0023

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com