Skip to content

Commit 1d04284

Browse files
committed
DEP: support old import name for applications
Allow their import with DeprecationWarning.
1 parent e71a137 commit 1d04284

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env python
2+
##############################################################################
3+
#
4+
# diffpy.structure Complex Modeling Initiative
5+
# (c) 2019 Brookhaven Science Associates,
6+
# Brookhaven National Laboratory.
7+
# All rights reserved.
8+
#
9+
# File coded by: Pavol Juhas
10+
#
11+
# See AUTHORS.txt for a list of people who contributed.
12+
# See LICENSE.txt for license information.
13+
#
14+
##############################################################################
15+
16+
"""
17+
Import support for renamed subpackage diffpy.structure.applications.
18+
19+
This module is deprecated and will be removed in version 3.1.
20+
"""
21+
22+
# TODO remove this module in version 3.1.
23+
24+
from warnings import warn
25+
26+
27+
warn("Module 'diffpy.structure.applications' is deprecated. "
28+
"Import 'diffpy.structure.apps' instead.",
29+
DeprecationWarning, stacklevel=2)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Temporary support for old import name.
5+
6+
This module is deprecated and will be removed in version 3.1.
7+
"""
8+
9+
# TODO remove this module in version 3.1.
10+
11+
from diffpy.structure.apps.anyeye import main
12+
13+
if __name__ == "__main__":
14+
main()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Temporary support for old import name.
5+
6+
This module is deprecated and will be removed in version 3.1.
7+
"""
8+
9+
# TODO remove this module in version 3.1.
10+
11+
from diffpy.structure.apps.transtru import main
12+
13+
if __name__ == "__main__":
14+
main()

0 commit comments

Comments
 (0)