Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Releases: gqylpy/gqylpy-exception

3.1.2

15 Jul 01:31
Compare
Choose a tag to compare

No longer maintained, please switch to exceptionx.

3.1.1

08 Jul 00:41
40bf594
Compare
Choose a tag to compare
  1. 对多处注释、注解以及变量命名进行规范性调整。

  1. Make normative adjustments to multiple comments, annotations, and variable naming.

3.1

24 Jun 01:12
d74d3bf
Compare
Choose a tag to compare
3.1
  1. Added a new context manager TryContext to support contextual exception handling.
  2. The parameters silent_exc and raw_exc are deprecated and replaced with silent and raw.
  3. 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
  4. Refactored the code segments for exception parsing and handling, resulting in a faster solution.
  5. Added support for automatically setting the stacklevel parameter when acquiring the logger method.
  6. Improved numerous comments and type annotations.
  7. Updated the README file to reflect the above changes.

  1. 新增上下文管理器 TryContext,以支持上下文异常处理。
  2. 参数 silent_excraw_exc 将弃用,更新为 silentraw
  3. 修复问题:当异常发生的行不在被 TryExcept 装饰的函数内部时,行数定位可能会出现错误。#7
  4. 重构异常解析和异常处理的代码段,重构后的方案速度更快。
  5. 在获取日志记录器方法时支持自动设置 stacklevel 参数。
  6. 改进大量注释和类型注解。
  7. 对于以上改动更新自述文件。

3.0.1

13 May 01:21
7f9e55b
Compare
Choose a tag to compare
  1. Optimize the code for creating exception types.
  2. Rename an internal method to a better name.
  3. Add support for Python 3.13.
  4. Provide English documentation.

  1. 优化创建异常类型的代码。
  2. 调整一个内部方法的名称,更好的名称。
  3. 新增对 Python3.13 支持。
  4. 提供英文文档。

3.0

09 Feb 10:01
Compare
Choose a tag to compare
3.0
  1. Warning: This version is a refactored version and all changes are not backward compatible.
  2. Refactor the core code that creates the exception type, based on the new scheme module.__getattr__ to achieve.
  3. 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).
  4. The new scheme is not supported in versions below Python 3.8.
  5. For the new scheme, refactored the logical block that imports real code.
  6. Removes the custom exception type ParameterError, in turn use the built-in exception type ValueError.
  7. Remove the deprecated paramenters ignore and output_raw_exc.
  8. Update the readme file and other information for the above changes.

  1. 警告:此版本为重构版本,所有改动均不向下兼容。
  2. 重构创建异常类型的核心代码,基于新的方案 module.__getattr__ 来实现。
  3. 新的方案不支持通过下标创建异常类型,这与低的版本不能兼容(解决方案是将下标换成 getattr)。
  4. 新的方案在 Python3.8 以下的版本不受支持。
  5. 针对新的方案,重构了导入真实代码的逻辑块。
  6. 移除自定义异常类型 ParameterError,转而使用内置的异常类型 ValueError,当传入的参数错误时。
  7. 移除已弃用的参数 ignoreoutput_raw_exc
  8. 对于以上改动更新自述文件等信息。

2.1

02 Oct 02:07
6362d27
Compare
Choose a tag to compare
2.1
  1. Optimize the core code of creating exception types.
  2. The dictionary __history__ is now not allowed to be modified externally.
  3. Reconstructs the underlying exception type GqylpyError.
  4. Add decorators ATryExcept and ARetry, replacing TryExceptAsync and RetryAsync, respectively.
  5. For the decorator TryExceptAsync and RetryAsync that will be deprecated, a large number of parameter comments are omitted.
  6. Adjust the code block that gets logger in TryExcept.
  7. Update the annotation information for the __getattr__ method, now the feature description is more complete.
  8. Correct the description when the parameter error of the Retry.
  9. Update the logical blocks imported into real code to fit the new design.
  10. Other minor changes, fixes or optimizations.

  1. 优化创建异常类型的核心代码。
  2. 字典 __history__ 现在不允许被外部修改。
  3. 重构底层异常类型 GqylpyError
  4. 新增装饰器 ATryExceptARetry,分别取代 TryExceptAsyncRetryAsync
  5. 对于即将弃用的装饰器 TryExceptAsyncRetryAsync,省略掉大量的参数注解。
  6. 调整 TryExcept 中获取 logger 的代码块。
  7. 更新 __getattr__ 方法的注释信息,现在的功能描述更清晰。
  8. 纠正 Retry 中的参数错误时的描述信息。
  9. 更新导入真实代码的逻辑块为适配新的设计方案。
  10. 其它一些小的改动,修复或优化。

2.0.4

03 Jun 05:58
Compare
Choose a tag to compare
  1. Fix the possible error in TryExcept when the decorated object is a class. #3
  2. Improve a piece of code to warn unnecessary specification of default warning type in warnings.warn call.
  3. Simplify and improve some annotation code to be more concise and intuitive.
  4. Deprecated parameters in TryExcept will no longer generate warning and will be removed soon in the future.
  5. 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

13 May 02:43
Compare
Choose a tag to compare
  1. 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.
  2. 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.
  3. Refactor (improve) the method of obtaining version information in setup by directly extracting it from package.__doc__, rather than opening a file.
  4. Adjust the classification information of the open-source library on PyPi.

1.修复一个严重的错误,在导入真实代码的逻辑块中篡改类属性值的错误,这导致上次未成功发布版本。
2.修复一个可能发生的错误,在尝试获取 ge 的魔法属性时,如果该魔化属性不存在,同时该魔化属性又存在于 builtins 模块,将引发异常。
3.重构(改进) setup 中获得版本信息的方案,直接从 package.__doc__ 中提取,而不再打开文件。
4.调整在PyPi上的开源库分类信息。

2.0.2

29 Apr 02:07
Compare
Choose a tag to compare

1.Optimize logical blocks for real code imports.

1.优化真实代码导入的逻辑块。

2.0.1

22 Apr 03:31
Compare
Choose a tag to compare

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.从自述文件中移除附加功能描述。