Skip to content

Commit

Permalink
Python2 is actually dead now
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed Apr 14, 2024
1 parent ca8ac44 commit dab23cf
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions pavement.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,28 +109,6 @@ def pull_plugins():
sh('cd "{}";git pull'.format(plugin_dir))


@task
def assert_all_files_import_unicode_literals():
"""
error if a python file is found in sideboard or plugins that does not import unicode_literals; \
this is skipped for Python 3
"""
if sys.version_info[0] == 2:
all_files_found = []
cmd = ("find '%s' -name '*.py' ! -size 0 "
"-exec grep -RL 'from __future__ import.*unicode_literals.*$' {} \;")
for test_dir in chain(['sideboard'], collect_plugin_dirs(module=True)):
output = sh(cmd % test_dir, capture=True)
if output:
all_files_found.append(output)

if all_files_found:
print('the following files did not include "from __future__ import unicode_literals":')
print(''.join(all_files_found))
raise BuildFailure("there were files that didn't include "
'"from __future__ import unicode_literals"')


@task
def assert_all_projects_correctly_define_a_version():
"""
Expand Down

0 comments on commit dab23cf

Please sign in to comment.