Skip to content

Commit

Permalink
Merge pull request #24 from cocolato/dev
Browse files Browse the repository at this point in the history
Bump version 0.1.3
  • Loading branch information
cocolato authored Mar 12, 2024
2 parents de1fcfb + 5dfc16d commit bb6fc75
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 27 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ English | [简体中文](README_zh.md)
It's a fork/optimized version from [elifiner/pydump](https://github.com/elifiner/pydump).The main optimization points are:
* Save the `Python traceback` anywhere, not just when it's an exception.
* Optimize code structure && remove redundant code
* fix bug in python2.7 && support python3.10+
* fix bug in python3.10+
* supported more pdb commnd
* a useful command line tool for debug

Expand All @@ -22,11 +22,10 @@ pdb and with other popular debuggers (pudb, ipdb and pdbpp).
* If we were able to save the exception error and then use the debugger to recover the traceback at that time, we could see the entire stack variables along the traceback as if you had caught the exception at the local breakpoint.

## Install pydumpling
Python version:>= 2.7, >=3.6
Python version:>=3.7

Not published in pypi,so use the `.whl` file install pydumpling in the dist path.
```
pip install dist/pydumpling-0.1.1-py2.py3-none-any.whl
pip install pydumpling
```

## How to use pydumpling
Expand Down
7 changes: 3 additions & 4 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
这是 [elifiner/pydump](https://github.com/elifiner/pydump) 的fork/优化版本, 主要优化点有:
* 支持在任何地方保存`Python traceback`,而不是只在异常发生的时候
* 优化代码结构, 去除冗余代码
* 修复其在2.7及3.10版本中的bug
* 修复其在3.10+版本中的bug
* 支持更多的pdb命令
* 提供了一个方便用来调试的命令行工具

Expand All @@ -17,11 +17,10 @@ pydumpling可以在代码的任何位置中,将当前Python程序的traceback
* 如果我们能够把线上的异常现场保存下来,然后通过调试器去恢复当时的异常堆栈,我们可以看到这个异常的整条调用链路以及链路上的堆栈变量,就如同你在本地断点捕获到了这个异常一样。

## 安装方法
Python版本支持:>= 2.7, >=3.6
Python版本支持:>=3.7

目前还没有在Pypi上面进行发布,因此直接使用PIP安装dist目录下的whl文件
```
pip install dist/pydumpling-0.1.1-py2.py3-none-any.whl
pip install -i pydumpling
```

## 使用方法
Expand Down
13 changes: 1 addition & 12 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pydumpling/fake_types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import os
import six
import sys
import dill


Expand Down Expand Up @@ -43,7 +43,7 @@ def _convert(cls, v):
else:
from datetime import date, time, datetime, timedelta

BUILTIN = (str, unicode, int, long, float, date, time, datetime, timedelta) if six.PY2 \
BUILTIN = (str, unicode, int, long, float, date, time, datetime, timedelta) if sys.version_info.major == 2 \
else (str, int, float, date, time, datetime, timedelta) # noqa: F821

if type(v) in BUILTIN:
Expand Down
2 changes: 1 addition & 1 deletion pydumpling/pydumpling.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import inspect
from .fake_types import FakeFrame, FakeTraceback

__version__ = "0.1.1"
__version__ = "0.1.3"


def save_dumping(filename=None, tb=None):
Expand Down
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ includes = ["pydumpling/*.py"]
test = [
"pytest-order>=1.2.0",
"flake8>=5.0.4",
"six>=1.16.0",
]
[build-system]
requires = ["pdm-backend"]
Expand All @@ -20,15 +19,18 @@ build-backend = "pdm.backend"

[project]
name = "pydumpling"
version = "0.1.2"
description = ""
version = "0.1.3"
description = "Python post-mortem debugger"
authors = [
{name = "cocolato", email = "[email protected]"},
]
dependencies = [
"dill<1.0.0,>=0.3.2",
"six<2.0.0,>=1.16.0",
]
requires-python = ">=3.7"
readme = "README.md"
license = {text = "MIT"}


[project.urls]
homepage = "https://github.com/cocolato/pydumpling"

0 comments on commit bb6fc75

Please sign in to comment.