Skip to content

Commit

Permalink
Debugger updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Feb 1, 2024
1 parent 92cdcc7 commit fdabe10
Show file tree
Hide file tree
Showing 33 changed files with 17,456 additions and 12,222 deletions.
14 changes: 7 additions & 7 deletions plugins/com.python.pydev.docs/release_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ python x:\liclipsews\pydev.page\build_homepage.py

## Commit everything and merge with master (homepage at: x:\liclipsews\pydev.page and X:\liclipsews\liclipsews\Pydev repo)

mu acp "PyDev release 11.0.3"
mu acp "PyDev release 12.0.0"

## Do build:

Expand All @@ -39,8 +39,8 @@ python -m dev add_to_update_site_mirror

## Tag repository (needed so that GitHub can reference it later)

git tag pydev_11_0_3 -a -m "PyDev 11.0.3"
git push --tag origin pydev_11_0_3
git tag pydev_12_0_0 -a -m "PyDev 12.0.0"
git push --tag origin pydev_12_0_0

## Create release in Github Releases

Expand All @@ -49,19 +49,19 @@ python -m dev add_to_github
Contents in: X:\pydev_build\build_dir\pydev\features\org.python.pydev.p2-repo\target\github

### Title:
PyDev 11.0.3
PyDev 12.0.0

### Message:

This release contains PyDev 11.0.3
This release contains PyDev 12.0.0

It's possible to add it as an Eclipse update site using the url:

https://github.com/fabioz/Pydev/releases/download/pydev_11_0_3/
https://github.com/fabioz/Pydev/releases/download/pydev_12_0_0/

Or get a .zip to install manually by unzipping it in the dropins:

https://github.com/fabioz/Pydev/releases/download/pydev_11_0_3/PyDev.11.0.3.zip
https://github.com/fabioz/Pydev/releases/download/pydev_12_0_0/PyDev.12.0.0.zip


## Update homepage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: pp*
CIBW_SKIP: pp* cp36-* cp37-*
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,27 @@ jobs:
name: [
"ubuntu-pypy3",
# "macos-py37-cython", -- misbehaving on github actions
"ubuntu-py38-cython",
"ubuntu-py38-cython-checkbin",
"windows-py39-cython",
"windows-py310-cython-checkbin",
"windows-py311-cython",
"ubuntu-py311-cython",
"ubuntu-py312-cython",
"ubuntu-py312-cython-checkbin",
"windows-py312-cython-checkbin",
]

include:
- name: "ubuntu-pypy3"
python: "pypy3.10"
os: ubuntu-latest
os: ubuntu-20.04
PYDEVD_USE_CYTHON: NO
# - name: "macos-py37-cython"
# python: "3.7"
# os: macos-latest
# PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py38-cython"
- name: "ubuntu-py38-cython-checkbin"
python: "3.8"
os: ubuntu-latest
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "windows-py39-cython"
python: "3.9"
Expand All @@ -53,11 +54,15 @@ jobs:
PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py311-cython"
python: "3.11.0"
os: ubuntu-latest
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "ubuntu-py312-cython"
- name: "ubuntu-py312-cython-checkbin"
python: "3.12.0"
os: ubuntu-latest
os: ubuntu-20.04
PYDEVD_USE_CYTHON: YES
- name: "windows-py312-cython-checkbin"
python: "3.12"
os: windows-latest
PYDEVD_USE_CYTHON: YES

steps:
Expand Down Expand Up @@ -103,13 +108,27 @@ jobs:
if: contains(matrix.name, 'py3')
run: |
pip install trio
- name: Check that wheels can be built
if: contains(matrix.name, 'checkbin') && contains(matrix.name, 'ubuntu')
run: |
python -m pip install cibuildwheel==2.16.2
# Remove these .so files (will be rebuilt)
rm pydevd_attach_to_process/*.so
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp310-*manylinux*x86_64 cp311-*manylinux*x86_64 cp312-*manylinux*x86_64
CIBW_BUILD_VERBOSITY: 1

- name: Check cython unchanged
if: contains(matrix.name, 'checkbin')
env:
PYTHONPATH: .
run: |
python build_tools/build.py
python build_tools/check_no_git_modifications.py
- name: Create cython binaries
if: contains(matrix.name, 'cython')
run: |
Expand Down
29 changes: 24 additions & 5 deletions plugins/org.python.pydev.core/pysrc/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
PyDev.Debugger
==============
===============

Latest `3.x` version: the PyDev debugger now supports `sys.monitoring` which enables
really fast tracing on `Python 3.12` (so, if speed is an issue, make sure you upgrade).

The PyDev Debugger is a Python debugger which historically was created to
work with `PyDev` (in Eclipse).

Over the years (as it's open source -- EPL) it was adopted by other IDEs/companies
(so, it was integrated into PyCharm and VSCode Python through `debugpy`, which bundles `pydevd`).

Note that although it was adopted by other IDEs (and over the years companies of other
commercial IDEs did provide backing), by far most of the work was done without any
external backing and the ongoing work on the project relies on community support.

So, if you like using it, please consider becoming a backer of the project (this is
done through the `PyDev` umbrella, so please see https://www.pydev.org/about.html
for how to contribute to the project).

The sources for the PyDev.Debugger may be seen at:

https://github.com/fabioz/PyDev.Debugger

In general, the debugger backend should **NOT** be installed separately if you're using an IDE which already
bundles it (such as PyDev, PyCharm or bundled through debugpy, which is the debug adapter used in
bundles it (such as PyDev, PyCharm or bundled through debugpy, which is the debug adapter used in
VSCode Python and Visual Studio Python).

It is however available in PyPi so that it can be installed for doing remote debugging with `pip` -- so, when
debugging a process which runs in another machine, it's possible to `pip install pydevd` and in the code use
`pydevd.settrace(host='10.1.1.1')` to connect the debugger backend to the debugger UI running in the IDE
(whereas previously the sources had to be manually copied from the IDE installation).

`pydevd` is compatible with Python 3.6 onwards.
For instructions on how to `Remote Debug` with `PyDev`, see: https://www.pydev.org/manual_adv_remote_debugger.html

For `Python 2` please keep using `pydevd 2.8.0`.
`pydevd` is compatible with Python 3.8 onwards and is tested both with CPython as well as PyPy.

`pydevd` is tested both with CPython as well as PyPy.
For `Python 3.3 to 3.7` please keep using `pydevd 2.10.0`.

For `Python 2` please keep using `pydevd 2.8.0`.

Recent versions contain speedup modules using Cython, which are generated with a few changes in the regular files
to `cythonize` the files. To update and compile the cython sources (and generate some other auto-generated files),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def check(self, module, expected_attributes):

with VerifyShadowedImport('threading') as verify_shadowed:
import threading; verify_shadowed.check(threading, ['Thread', 'settrace', 'setprofile', 'Lock', 'RLock', 'current_thread'])
ThreadingEvent = threading.Event
ThreadingLock = threading.Lock
threading_current_thread = threading.current_thread

with VerifyShadowedImport('time') as verify_shadowed:
import time; verify_shadowed.check(time, ['sleep', 'time', 'mktime'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ def start_watching(): # Called from thread
Note: changes are only reported for files (added/modified/deleted), not directories.
'''
import threading
import sys
from os.path import basename
from _pydev_bundle import pydev_log
from _pydev_bundle import pydev_log, _pydev_saved_modules
from os import scandir

try:
Expand Down Expand Up @@ -205,7 +204,7 @@ def __init__(self, accept_directory=None, accept_file=None):
Note: if passed it'll override the `accepted_file_extensions`.
'''
self._path_watchers = set()
self._disposed = threading.Event()
self._disposed = _pydev_saved_modules.ThreadingEvent()

if accept_directory is None:
accept_directory = lambda dir_path: basename(dir_path) not in self.ignored_dirs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@

if USE_CYTHON_FLAG in ENV_TRUE_LOWER_VALUES:
# We must import the cython version if forcing cython
from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock # @UnusedImport
from _pydevd_bundle.pydevd_cython_wrapper import (
PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock, # @UnusedImport
any_thread_stepping, remove_additional_info) # @UnusedImport

elif USE_CYTHON_FLAG in ENV_FALSE_LOWER_VALUES:
# Use the regular version if not forcing cython
from _pydevd_bundle.pydevd_additional_thread_info_regular import PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock # @UnusedImport @Reimport
from _pydevd_bundle.pydevd_additional_thread_info_regular import (
PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock, # @UnusedImport @Reimport
any_thread_stepping, remove_additional_info) # @UnusedImport @Reimport

else:
# Regular: use fallback if not found (message is already given elsewhere).
try:
from _pydevd_bundle.pydevd_cython_wrapper import PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock
from _pydevd_bundle.pydevd_cython_wrapper import (
PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock,
any_thread_stepping, remove_additional_info)
except ImportError:
from _pydevd_bundle.pydevd_additional_thread_info_regular import PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock # @UnusedImport
from _pydevd_bundle.pydevd_additional_thread_info_regular import (
PyDBAdditionalThreadInfo, set_additional_thread_info, _set_additional_thread_info_lock, # @UnusedImport
any_thread_stepping, remove_additional_info) # @UnusedImport

Loading

0 comments on commit fdabe10

Please sign in to comment.