[
https://issues.apache.org/jira/browse/BEAM-5787?focusedWorklogId=172967&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-172967
]
ASF GitHub Bot logged work on BEAM-5787:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Dec/18 12:00
Start Date: 07/Dec/18 12:00
Worklog Time Spent: 10m
Work Description: robertwb closed pull request #6739: [BEAM-5787] Fix
test_translate_pattern on Python 3.7
URL: https://github.com/apache/beam/pull/6739
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/sdks/python/apache_beam/io/filesystem_test.py
b/sdks/python/apache_beam/io/filesystem_test.py
index c3ab88cb3866..c39da9a837e7 100644
--- a/sdks/python/apache_beam/io/filesystem_test.py
+++ b/sdks/python/apache_beam/io/filesystem_test.py
@@ -228,7 +228,10 @@ def test_match_glob(self, file_pattern,
expected_object_names):
expected_num_items)
@parameterized.expand([
- param(os_path=posixpath, sep_re='\\/'),
+ param(os_path=posixpath,
+ # re.escape does not escape forward slashes since Python 3.7
+ # https://docs.python.org/3/whatsnew/3.7.html ("bpo-29995")
+ sep_re='\\/' if sys.version_info < (3, 7, 0) else '/'),
param(os_path=ntpath, sep_re='\\\\'),
])
def test_translate_pattern(self, os_path, sep_re):
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 172967)
Time Spent: 20m (was: 10m)
> test_translate_pattern fails on Python 3.7
> ------------------------------------------
>
> Key: BEAM-5787
> URL: https://issues.apache.org/jira/browse/BEAM-5787
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Affects Versions: 2.8.0
> Reporter: Joar Wandborg
> Assignee: Ahmet Altay
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Originally reported by michel on slack:
> [https://the-asf.slack.com/archives/CBDNLQZM1/p1539697967000100]
> Cause:
> {quote}[https://docs.python.org/3/whatsnew/3.7.html]:
> Change re.escape() to only escape regex special characters instead of
> escaping all characters other than ASCII letters, numbers, and '_'.
> (Contributed by Serhiy Storchaka in bpo-29995.)
> {quote}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)