Skip to content

Releases: gqylpy/systempath

1.1

04 Jun 01:37
0c1dbba
Compare
Choose a tag to compare
  1. Supports concatenating paths using the / or + operators.
  2. Implements the __fspath__ method to support path representation on the file system, and adjusts numerous code snippets accordingly.
  3. Improves a few type annotations by introducing TypeAlias and Annotated.
  4. Refines some code by using !r in formatted strings to simplify repr() function calls.
  5. Fixes an issue in the Path.chattr and Path.lsattr methods that cause errors when the path type is bytes.
  6. Improves the code snippet handling path type exceptions in dst2abs.
  7. Optimizes the performance of path concatenation operations by reducing unnecessary string allocations.
  8. Removes the annotated method __ne__.
  9. Updates the version of the only dependent library.
  10. Update the project description.

  1. 支持使用运算符 /+ 拼接路径。
  2. 实现 __fspath__ 方法支持文件系统上的路径表示,并为此调整了大量代码片段。
  3. 改进少量类型注解,引入 TypeAliasAnnotated
  4. 改进少量代码,在格式化字符串中使用 !r 简化 repr() 函数调用。
  5. 修复当路径类型为字节类型时 Path.chattrPath.lsattr 方法中引发错误的问题。
  6. 改进 dst2abs 中处理路径类型异常的代码片段。
  7. 通过减少不必要的字符串分配来优化路径连接操作的性能。
  8. 删除注解方法 __ne__
  9. 更新唯一依赖库版本。
  10. 更新项目简述。

1.0.14

20 May 01:01
eae6bfa
Compare
Choose a tag to compare
  1. Optimize the logic block of importing actual code.
  2. Optimize MasqueradeClass.
  3. Fix a line break error.
  4. Improve line break formatting in one place.
  5. Correct a formatting error.

  1. 优化导入真实代码的逻辑块。
  2. 优化 MasqueradeClass
  3. 纠正一处换行错误。
  4. 改进一处换行格式。
  5. 纠正一处格式错误。

1.0.13

15 Oct 01:51
46ed510
Compare
Choose a tag to compare
  1. Optimize MasqueradeClass and fix known problems.
  2. Refactor the tree function, now the code is more decoupled.
  3. tree function parameter naming adjustment: downtop -> bottom_up, mysophobia -> pure_path.
  4. tree function parameter level default value adjustment: maximum recursion depth -> maximum directory depth.
  5. Supports checking whether a file contains subcontent, The method is located in Content.contains. #4
  6. Adjust some parameter comments, all Generator is replaced with Iterator.

  1. 优化 MasqueradeClass,并修复已知的问题。
  2. 重构 tree 函数,现在的代码更解耦。
  3. tree 函数参数命名调整:downtop -> bottom_up, mysophobia -> pure_path
  4. tree 函数参数 level 默认值调整:最大递归深度 -> 最大目录深度。
  5. 增加检查文件内容中是否包含子内容的方法,位于 Content.contains#4
  6. 调整部分参数注解,所有的 Generator 全部更换为 Iterator

1.0.12

01 Jul 05:29
Compare
Choose a tag to compare
  1. Fix issue: Exception SystemPathNotFoundError could not be handled properly. #6
  2. Add a method called isempty to quickly check if the directory or file content is empty. #7
  3. Upgrade the version of the only dependency library.
  4. Optimize the package release process (file setup.py).

1.修复问题:异常 SystemPathNotFoundError 无法被妥善处理。#6
2.新增方法 isempty,可快速判断目录或文件内容是否为空。 #7
3.升级唯一依赖库版本。
4.优化包发布流程(文件 setup.py)。

1.0.11

22 Jun 03:33
Compare
Choose a tag to compare
  1. Optimize the block of code in Directory that gets subpaths, now the logic is cleaner and clearer.
  2. Path objects support Boolean judgment (return True if path exists else False).
  3. Fix a possible error, the default parameter level in the Directory.tree method sets the default value too early, may invalidate the maximum depth set by the developer.
  4. Improve the internal call of the method Path.lexists.
  5. No longer rely on the pathlib built-in library.
  6. Enable Python3.12 support.

1.优化 Directory 中获取子路径的代码块,现在逻辑更简洁、更明晰。
2.路径对象支持布尔判断(路径存在返回 True 否则 False)。
3.修复一个可能发生的错误,Directory.tree 方法中的默认参数 level 过早设置默认值,可能使开发者设置的最大深度值无效。
4.改进方法 Path.lexists 的内部调用。
5.不再依赖 pathlib 内置库。
6.启用对 Python3.12 支持。

1.0.10

13 May 02:33
Compare
Choose a tag to compare
  1. Improve the scheme for judging whether the contents of two files are equal. Check first whether they are the same file, and if so, directly confirm they are equal and skip the subsequent judging process.
  2. When judging the equality of two paths, first check whether they refer to the same path object. If so, directly confirm they are equal and skip the subsequent judging process.
  3. Enhance the File.contents method by directly passing in the File instance when obtaining a Content instance.
  4. Improve the parameter names of certain methods in the Content class, changing content to other. (This parameter is always positional only and will not have compatibility issues.)
  5. Correct an extra string escape in Open.__init__ location.
  6. Improve the standardization of imported function names (as we define).
  7. Improve several descriptions or comments.
  8. Refactor (improve) the method of obtaining version information in setup by directly extracting it from package.__doc__, rather than opening a file.
  9. Adjust the classification information of the open-source library on PyPi.
  10. Update the README file.

1.改进判断文件内容是否相等的方案,先检查是否为同一个文件,如果是则直接确认相等,跳过后续的判断流程。
2.在做路径相等性判断时,先判断是否为同一个路径对象,如果是则直接确认相等,跳过后续的判断流程。
3.改进方法 File.contents,获得 Content 实例时直接传入 File 实例。
4.改进 Content 类中个别方法的参数名称,content -> other。(该参数始终仅限位置传参,不会有兼容性问题。)
5.修正一处多余的字符串转义,位置 Open.__init__
6.改进引入的函数名称的规范性(我们认为的规范)。
7.改进多处描述或注释。
8.重构(改进) setup 中获得版本信息的方案,直接从 package.__doc__ 中提取,而不再打开文件。
9.调整在PyPi上的开源库分类信息。
10.更新自述文件。

1.0.9

07 May 08:21
Compare
Choose a tag to compare

1.Found a method description error and fixed it, in Path.getsize.
2.Improve a magic method definition, define __repr__ directly in class Open and omit __str__.
3.Improve MasqueradeClass, masquerade the attribute __qualname__.
4.Fix an exception description error in ReadOnly and improved similar exception description in ReadOnlyMode.

1.发现一个方法的描述错误并修复,方法 Path.getsize
2.改进一个魔化方法定义,在类 Open 中直接定义 __repr__,省略 __str__
3.改进 MasqueradeClass,隐藏属性 __qualname__
4.修正 ReadOnly 中异常描述信息的错误,并改进了 ReadOnlyMode 中的类似的异常描述。

1.0.8

29 Apr 02:31
Compare
Choose a tag to compare

1.Optimize logical blocks for real code imports.
2.Update the open source library description information on PyPi.

1.优化真实代码导入的逻辑块。
2.更新在PyPi上的开源库简述信息。

1.0.7

22 Apr 03:44
Compare
Choose a tag to compare

1.Fixed a serious issue where Path instance could not be deserialized (we made a lot of sacrifices to fix this).
2.Fixed a judgment statement error in the protection instance attributes, in ReadOnly.__setattr__.
3.Supported equality judgment of Path instances.
4.Upgraded the unique dependent library version.
5.Getting child path instance by taking attribute value is no longer supported in Directory.
6.Fixed an issue where specifying maximum depth in tree could be invalid.
7.Improved Path.__str__, return the prototype for the path link characters of type bytes.
8.Improved the prompt string that raise the destination path exception, in dst2abs.<locals>.core.
9.Raise the stack level of the warning information, in Path.chattr and Path.lsattr.
10.Updated parameter description of tree, and change the name of parameter idiocy directly to mysophobia (no warning, no compatibility processing).
11.Stop recording issues in the project file (removed file issues.yml).

1.修复了 Path 实例无法被反序列化的严重问题(为修复这个问题,我们做了很大牺牲)。
2.修复了 ReadOnly.__setattr__ 中用于保护实例属性不被篡改的一些逻辑错误。
3.Path 实例支持相等性判断。
4.升级了唯一依赖库版本 gqylpy-exception
5.Directory 中不再支持通过属性取值的方式来获取子路径实例。
6.修复了 tree 中指定最大深度可能无效的问题。
7.改进了 Path.__str__,针对 bytes 类型的路径链接,直接返回其原形。
8.改进了 dst2abs.<locals>.core 中引发目标路径异常的提示字符串。
9.提高了警告信息的堆栈级别,涉及位置 Path.chattr and Path.lsattr
10.更新了 tree 的参数描述,并直接修改了其中的一个参数命名 idiocy -> mysophobia (没有警告,也没有做任何兼容)。
11.停止在项目文件中记录问题(删除文件 issues.yml)。

1.0.6

15 Apr 04:52
Compare
Choose a tag to compare

1.Fixed a deprecated description reference error, in File.copycontent.