Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 8064c43

Browse files
authored
Merge pull request #218 from Nurdok/drop_pep257_back_comp
Remove `pep257` entry point (drop backward compatibility)
2 parents 7e0c3f4 + 3749f63 commit 8064c43

File tree

4 files changed

+13
-31
lines changed

4 files changed

+13
-31
lines changed

docs/release_notes.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Current Development Version
1010
Major Updates
1111

1212
* Support for Python 2.6 has been dropped (#206, #217).
13+
* Support for the ``pep257`` console script has been dropped. Only the
14+
``pydocstyle`` console script should be used (#216, #218).
15+
16+
New Features
17+
1318
* Decorator-based skipping via ``--ignore-decorators`` has been added (#204).
1419

1520
Bug Fixes
@@ -21,8 +26,8 @@ Bug Fixes
2126

2227
Bug Fixes
2328

24-
* Fixed an issue where the `flake8-docstrings` failed when accessing some
25-
public API from `pydocstyle`.
29+
* Fixed an issue where the ``flake8-docstrings`` failed when accessing some
30+
public API from ``pydocstyle``.
2631

2732

2833
1.1.0 - September 29th, 2016

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
entry_points={
3535
'console_scripts': [
3636
'pydocstyle = pydocstyle.cli:main',
37-
'pep257 = pydocstyle.cli:main_pep257',
3837
],
3938
},
4039
)

src/pydocstyle/cli.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ReturnCode(object):
1717
invalid_options = 2
1818

1919

20-
def run_pydocstyle(use_pep257=False):
20+
def run_pydocstyle():
2121
log.setLevel(logging.DEBUG)
2222
conf = ConfigurationParser()
2323
setup_stream_handlers(conf.get_default_run_configuration())
@@ -32,12 +32,6 @@ def run_pydocstyle(use_pep257=False):
3232
# Reset the logger according to the command line arguments
3333
setup_stream_handlers(run_conf)
3434

35-
if use_pep257:
36-
log.warning("Deprecation Warning:\n"
37-
"pep257 has been renamed to pydocstyle and the use of the "
38-
"pep257 executable is deprecated and will be removed in "
39-
"the next major version. Please use `pydocstyle` instead.")
40-
4135
log.debug("starting in debug mode.")
4236

4337
Error.explain = run_conf.explain
@@ -66,23 +60,14 @@ def run_pydocstyle(use_pep257=False):
6660
return exit_code
6761

6862

69-
def main(use_pep257=False):
70-
"""Run pydocstyle as a script.
71-
72-
`use_pep257` is True if the script was invoked with the deprecated script
73-
name `pep257`, in which case a deprecation warning will be printed.
74-
75-
"""
63+
def main():
64+
"""Run pydocstyle as a script."""
7665
try:
77-
sys.exit(run_pydocstyle(use_pep257))
66+
sys.exit(run_pydocstyle())
7867
except KeyboardInterrupt:
7968
pass
8069

8170

82-
def main_pep257():
83-
main(use_pep257=True)
84-
85-
8671
def setup_stream_handlers(conf):
8772
"""Setup logging stream handlers according to the options."""
8873
class StdoutFilter(logging.Filter):

src/tests/test_integration.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def install_package(request):
108108
subprocess.check_call(shlex.split(uninstall_cmd), cwd=cwd)
109109

110110

111-
@pytest.yield_fixture(scope="function", params=('pydocstyle', 'pep257'))
111+
@pytest.yield_fixture(scope="function")
112112
def env(request):
113-
with SandboxEnv(request.param) as test_env:
113+
with SandboxEnv() as test_env:
114114
yield test_env
115115

116116

@@ -882,10 +882,3 @@ def foo():
882882
_, _, code = env.invoke()
883883

884884
assert code == 0
885-
886-
887-
def test_pep257_entry_point():
888-
with SandboxEnv('pep257') as env:
889-
_, err, code = env.invoke()
890-
assert code == 0
891-
assert 'Deprecation Warning' in err, err

0 commit comments

Comments
 (0)