From 327a55f7ffe911bd5fd4c065322e56a12cd7768a Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 28 Aug 2019 16:18:01 +0300 Subject: [PATCH 1/6] README.md Update Travis shield to point to master See also https://github.com/badges/shields/issues/3928 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da1f0c2..69da404 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Library to parse and apply unified diffs. -[![Build Status](https://img.shields.io/travis/techtonik/python-patch.svg)](https://travis-ci.org/techtonik/python-patch) +[![Build Status](https://img.shields.io/travis/techtonik/python-patch/master)](https://travis-ci.org/techtonik/python-patch/branches) ### Features From eea59a880f9ffb5b480bcd53451316181847e90c Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 28 Aug 2019 17:08:43 +0300 Subject: [PATCH 2/6] .travis.yml: Update Python versions and remove 2.6 Python 2.6 is not among supported Python anymore https://docs.travis-ci.com/user/languages/python/ --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19851de..356b919 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,13 @@ language: python python: - - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" - - "3.5-dev" # 3.5 development branch - - "nightly" # currently points to 3.6-dev + - "3.6" + - "3.7" + - "3.7-dev" + - "3.8-dev" install: - pip install coverage From b51b431a97f5055286d16d14efc845f9531d96fb Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 28 Aug 2019 17:29:33 +0300 Subject: [PATCH 3/6] README.md Add PyPI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69da404..6cca3fd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Library to parse and apply unified diffs. -[![Build Status](https://img.shields.io/travis/techtonik/python-patch/master)](https://travis-ci.org/techtonik/python-patch/branches) +[![Build Status](https://img.shields.io/travis/techtonik/python-patch/master)](https://travis-ci.org/techtonik/python-patch/branches) [![PyPI](https://img.shields.io/pypi/v/patch)](https://pypi.python.org/pypi/patch) ### Features From e49bf35f96ac5e44251d5b6d0b98a09e09cfecdb Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 28 Aug 2019 17:35:04 +0300 Subject: [PATCH 4/6] .travis.yml: Python 3.3 is phased out https://docs.travis-ci.com/user/languages/python/ Builds are still failing for other 3.x versions https://travis-ci.org/techtonik/python-patch/builds/577891154 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 356b919..286ed03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" From 33bda09082b4391e3729c363cb39e10886233b6e Mon Sep 17 00:00:00 2001 From: ossdev07 <39188636+ossdev07@users.noreply.github.com> Date: Fri, 20 Dec 2019 14:57:31 +0530 Subject: [PATCH 5/6] Add arm64 jobs --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 286ed03..239708f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,12 @@ python: - "3.7" - "3.7-dev" - "3.8-dev" - + +os: linux +arch: + - amd64 + - arm64 + install: - pip install coverage - pip install pypack From 249e2af7f372d4b6e6621902e6d3c2a2dfbe5e5d Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sun, 23 Feb 2020 21:04:45 +0530 Subject: [PATCH 6/6] Fix deprecation warnings due to invalid escape sequences. --- patch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patch.py b/patch.py index 4b82af0..4775d70 100755 --- a/patch.py +++ b/patch.py @@ -337,7 +337,7 @@ def lineno(self): hunkparsed = False # state after successfully parsed hunk # regexp to match start of hunk, used groups - 1,3,4,6 - re_hunk_start = re.compile(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@") + re_hunk_start = re.compile(br"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@") self.errors = 0 # temp buffers for header and filenames info @@ -516,7 +516,7 @@ def lineno(self): filenames = False headscan = True else: - re_filename = b"^\+\+\+ ([^\t]+)" + re_filename = br"^\+\+\+ ([^\t]+)" match = re.match(re_filename, line) if not match: warning("skipping invalid patch - no target filename at line %d" % (lineno+1)) @@ -542,7 +542,7 @@ def lineno(self): continue if hunkhead: - match = re.match(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@(.*)", line) + match = re.match(br"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@(.*)", line) if not match: if not p.hunks: warning("skipping invalid patch with no hunks for file %s" % p.source)