This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
Releases: gqylpy/gqylpy-exception
Releases · gqylpy/gqylpy-exception
3.1.2
3.1.1
- 对多处注释、注解以及变量命名进行规范性调整。
- Make normative adjustments to multiple comments, annotations, and variable naming.
3.1
- Added a new context manager
TryContext
to support contextual exception handling. - The parameters
silent_exc
andraw_exc
are deprecated and replaced withsilent
andraw
. - Fixed an issue where the line number positioning could be incorrect when an exception occurs on a line outside the function decorated by
TryExcept
. #7 - Refactored the code segments for exception parsing and handling, resulting in a faster solution.
- Added support for automatically setting the
stacklevel
parameter when acquiring the logger method. - Improved numerous comments and type annotations.
- Updated the README file to reflect the above changes.
- 新增上下文管理器
TryContext
,以支持上下文异常处理。 - 参数
silent_exc
和raw_exc
将弃用,更新为silent
和raw
。 - 修复问题:当异常发生的行不在被
TryExcept
装饰的函数内部时,行数定位可能会出现错误。#7 - 重构异常解析和异常处理的代码段,重构后的方案速度更快。
- 在获取日志记录器方法时支持自动设置
stacklevel
参数。 - 改进大量注释和类型注解。
- 对于以上改动更新自述文件。
3.0.1
- Optimize the code for creating exception types.
- Rename an internal method to a better name.
- Add support for Python 3.13.
- Provide English documentation.
- 优化创建异常类型的代码。
- 调整一个内部方法的名称,更好的名称。
- 新增对 Python3.13 支持。
- 提供英文文档。
3.0
- Warning: This version is a refactored version and all changes are not backward compatible.
- Refactor the core code that creates the exception type, based on the new scheme
module.__getattr__
to achieve. - The new scheme does not support the creation of exception types by subscript, this is not compatible with the lower version (the solution is to replace the subscript with
getattr
). - The new scheme is not supported in versions below Python 3.8.
- For the new scheme, refactored the logical block that imports real code.
- Removes the custom exception type
ParameterError
, in turn use the built-in exception typeValueError
. - Remove the deprecated paramenters
ignore
andoutput_raw_exc
. - Update the readme file and other information for the above changes.
- 警告:此版本为重构版本,所有改动均不向下兼容。
- 重构创建异常类型的核心代码,基于新的方案
module.__getattr__
来实现。 - 新的方案不支持通过下标创建异常类型,这与低的版本不能兼容(解决方案是将下标换成
getattr
)。 - 新的方案在 Python3.8 以下的版本不受支持。
- 针对新的方案,重构了导入真实代码的逻辑块。
- 移除自定义异常类型
ParameterError
,转而使用内置的异常类型ValueError
,当传入的参数错误时。 - 移除已弃用的参数
ignore
和output_raw_exc
。 - 对于以上改动更新自述文件等信息。
2.1
- Optimize the core code of creating exception types.
- The dictionary
__history__
is now not allowed to be modified externally. - Reconstructs the underlying exception type
GqylpyError
. - Add decorators
ATryExcept
andARetry
, replacingTryExceptAsync
andRetryAsync
, respectively. - For the decorator
TryExceptAsync
andRetryAsync
that will be deprecated, a large number of parameter comments are omitted. - Adjust the code block that gets
logger
inTryExcept
. - Update the annotation information for the
__getattr__
method, now the feature description is more complete. - Correct the description when the parameter error of the
Retry
. - Update the logical blocks imported into real code to fit the new design.
- Other minor changes, fixes or optimizations.
- 优化创建异常类型的核心代码。
- 字典
__history__
现在不允许被外部修改。 - 重构底层异常类型
GqylpyError
。 - 新增装饰器
ATryExcept
和ARetry
,分别取代TryExceptAsync
和RetryAsync
。 - 对于即将弃用的装饰器
TryExceptAsync
和RetryAsync
,省略掉大量的参数注解。 - 调整
TryExcept
中获取logger
的代码块。 - 更新
__getattr__
方法的注释信息,现在的功能描述更清晰。 - 纠正
Retry
中的参数错误时的描述信息。 - 更新导入真实代码的逻辑块为适配新的设计方案。
- 其它一些小的改动,修复或优化。
2.0.4
- Fix the possible error in
TryExcept
when the decorated object is a class. #3 - Improve a piece of code to warn unnecessary specification of default warning type in
warnings.warn
call. - Simplify and improve some annotation code to be more concise and intuitive.
- Deprecated parameters in
TryExcept
will no longer generate warning and will be removed soon in the future. - Adjust the sorting order of the classification information of the open-source library.
1.修复 TryExcept
中当被装饰的对象是一个类时可能会发生的错误。#3
2.改进一段代码,警告调用 warnings.warn
无需指定默认警告类型。
3.改进少量注解代码,更简洁直观。
4.在 TryExcept
中已弃用的参数不再给出警告,并在将来很快彻底移除。
5.调整开源库分类信息的排序。
2.0.3
- Fix a crucial error where class attribute values were tampered with in the logic block for importing real code, which caused the last release to fail.
- Fix a potential error where attempting to access the "ge" magic attribute would raise an exception if the magic attribute did not exist, but also existed in the
builtins
module. - Refactor (improve) the method of obtaining version information in
setup
by directly extracting it frompackage.__doc__
, rather than opening a file. - Adjust the classification information of the open-source library on PyPi.
1.修复一个严重的错误,在导入真实代码的逻辑块中篡改类属性值的错误,这导致上次未成功发布版本。
2.修复一个可能发生的错误,在尝试获取 ge
的魔法属性时,如果该魔化属性不存在,同时该魔化属性又存在于 builtins
模块,将引发异常。
3.重构(改进) setup
中获得版本信息的方案,直接从 package.__doc__
中提取,而不再打开文件。
4.调整在PyPi上的开源库分类信息。
2.0.2
1.Optimize logical blocks for real code imports.
1.优化真实代码导入的逻辑块。
2.0.1
1.Fixed a parameter annotation error, of TryExcept.etype
.
2.Raise the stack level of the exception class name warning information, in GqylpyException.__getattr__
.
3.Removed additional function descriptions from readme file.
1.修复了 tryexception .etype
中一个参数注释错误。
2.提高了 GqylpyException.__getattr__
警告信息的堆栈级别。
3.从自述文件中移除附加功能描述。