Skip to content

Conversation

@xmo-odoo
Copy link

@xmo-odoo xmo-odoo commented Aug 9, 2024

Python 2 compatibility was removed in #31 so these should not be useful / necessary anymore.

Python 2 compatibility was removed in conan-io#31 so these should not be useful / necessary anymore.
The CLI mode uses `sys` internally but has its own import.
It does almost nothing at this point and is only used by one caller, so can be inlined.
@memsharded
Copy link
Member

Thanks for your contribution, sorry it wasn't handled earlier.

@uilianries maybe this change helps a bit with conan-io/conan#16727?
As using the right with open() could be related to problems with large files, as file handlers not being correctly closed?

@lunacd
Copy link

lunacd commented Sep 30, 2025

Any update on this? I was meaning to add type hints to this, but the traces of Python2 in here is making things harder than it needs to be :)

Signed-off-by: Uilian Ries <uilianr@jfrog.com>
Signed-off-by: Uilian Ries <uilianr@jfrog.com>
Signed-off-by: Uilian Ries <uilianr@jfrog.com>
@uilianries
Copy link
Member

I just fixed some minor mistakes using replace all in the code, and added a new test to validate when applying a 30MB patch file.

Signed-off-by: Uilian Ries <uilianr@jfrog.com>
Signed-off-by: Uilian Ries <uilianr@jfrog.com>
Signed-off-by: Uilian Ries <uilianr@jfrog.com>
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for your contribution @xmo-odoo and @uilianries for reviewing and testing

@uilianries uilianries merged commit e209ff9 into conan-io:master Oct 1, 2025
6 checks passed
@uilianries
Copy link
Member

@xmo-odoo Hello! Release 1.19.0 just arrived with your current PR!

You can find its changelog at https://github.com/conan-io/python-patch-ng/releases/tag/1.19.0

Please, update your local version of Python Patch-NG and feel free to give us your feedback:

pip install -U patch-ng

Regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants