Skip to content

Commit 53ea91a

Browse files
authored
Merge pull request #380 from moremoban/dev
release 0.7.4
2 parents e8bd2e0 + 10ba852 commit 53ea91a

File tree

20 files changed

+67
-45
lines changed

20 files changed

+67
-45
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
max-parallel: 4
1111
matrix:
12-
python-version: [3.6, 3.7]
12+
python-version: [3.6, 3.7, 3.8]
1313

1414
steps:
1515
- uses: actions/checkout@v1

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ parts/
2525
sdist/
2626
var/
2727
wheels/
28-
pip-wheel-metadata/
2928
share/python-wheels/
3029
*.egg-info/
3130
.installed.cfg
@@ -143,10 +142,6 @@ dmypy.json
143142
# Cython debug symbols
144143
cython_debug/
145144

146-
# static files generated from Django application using `collectstatic`
147-
media
148-
static
149-
150145
# VirtualEnv rules
151146
# Virtualenv
152147
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
@@ -431,6 +426,9 @@ tmtags
431426
!.vscode/extensions.json
432427
*.code-workspace
433428

429+
# Local History for Visual Studio Code
430+
.history/
431+
434432
# Xcode rules
435433
# Xcode
436434
#

.moban.cd/changelog.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: moban
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Fixed
6+
details:
7+
- "`#378`: suppress stdout message from deprecated pip install.
8+
but please do not use and migrate deprecated`requires` syntax."
9+
date: 13.5.2020
10+
version: 0.7.4
411
- changes:
512
- action: Added
613
details:

.moban.cd/moban.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ organisation: moremoban
44
author: C. W.
55
66
license: MIT
7-
version: 0.7.3
8-
current_version: 0.7.3
9-
release: 0.7.3
7+
version: 0.7.4
8+
current_version: 0.7.4
9+
release: 0.7.4
1010
branch: master
1111
master: index
1212
command_line_interface: "moban"
@@ -18,7 +18,6 @@ keywords:
1818
- jinja2
1919
- moban
2020
dependencies:
21-
- ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4'
2221
- ruamel.yaml>=0.15.42;python_version == '3.7'
2322
- ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7'
2423
- ruamel.yaml>=0.15.98;python_version == '3.8'
@@ -35,3 +34,4 @@ moban_command: make update git-diff-check
3534
setup_use_markers: true
3635
setup_use_markers_fix: true
3736
python_requires: ">=3.6"
37+
min_python_version: "3.6"

.moban.d/moban_travis.yml.jj2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
{%block extra_matrix %}
44
env:
5-
- MINREQ=0
65
- MINREQ=1
76
{%endblock%}
87

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ python:
88
- 3.6
99
- 3.8
1010
env:
11-
- MINREQ=0
1211
- MINREQ=1
1312

1413
stages:
@@ -21,11 +20,15 @@ stages:
2120
git:
2221
submodules: false
2322
python: 3.6
23+
env:
24+
- MINREQ=0
2425
stage: lint
2526
script: make install_test format git-diff-check lint
2627

2728
.moban: &moban
2829
python: 3.6
30+
env:
31+
- MINREQ=0
2932
stage: moban
3033
install: pip install moban>=0.0.4 gitfs2 pypifs
3134
script: make update git-diff-check

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Change log
22
================================================================================
33

4+
0.7.4 - 13.5.2020
5+
--------------------------------------------------------------------------------
6+
7+
**Fixed**
8+
9+
#. `#378 <https://github.com/moremoban/moban/issues/378>`_: suppress stdout
10+
message from deprecated pip install. but please do not use and migrate
11+
deprecated`requires` syntax.
12+
413
0.7.3 - 2.5.2020
514
--------------------------------------------------------------------------------
615

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
copyright = '2017-2020 Onni Software Ltd.'
2626
author = 'C. W.'
2727
# The short X.Y version
28-
version = '0.7.3'
28+
version = '0.7.4'
2929
# The full version, including alpha/beta/rc tags
30-
release = '0.7.3'
30+
release = '0.7.4'
3131

3232
# -- General configuration ---------------------------------------------------
3333

min_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
ruamel.yaml==0.15.5;python_version == '3.4'
21
ruamel.yaml==0.15.42;python_version == '3.7'
32
ruamel.yaml==0.15.5;python_version != '3.4' and python_version < '3.7'
43
ruamel.yaml==0.15.98;python_version == '3.8'

moban/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.7.3"
1+
__version__ = "0.7.4"
22
__author__ = "C. W."

moban/core/moban_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def get_engine(self, template_type, template_dirs, context_dirs):
4949
template_dirs = utils.verify_the_existence_of_directories(
5050
template_dirs
5151
)
52-
5352
if template_type in self.options_registry:
53+
5454
custom_engine_spec = self.options_registry[template_type]
5555
engine_cls = self.load_me_now(
5656
custom_engine_spec[constants.TEMPLATE_TYPES_BASE_TYPE]

moban/deprecated/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def pip_install(packages):
6565
import subprocess
6666

6767
subprocess.check_call(
68-
[sys.executable, "-m", "pip", "install", " ".join(packages)]
68+
[sys.executable, "-m", "pip", "install", " ".join(packages)],
69+
stdout=subprocess.DEVNULL,
70+
stderr=subprocess.DEVNULL,
6971
)
7072

7173

moban/externals/reporter.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def report_templating(
1818
action_in_present_continuous_tense, source_file, destination_file
1919
):
20-
print(
20+
do_print(
2121
MESSAGE_TEMPLATING.format(
2222
action_in_present_continuous_tense,
2323
crayons.yellow(source_file),
@@ -27,36 +27,36 @@ def report_templating(
2727

2828

2929
def report_no_action():
30-
print(crayons.yellow(MESSAGE_NO_TEMPLATING, bold=True))
30+
do_print(crayons.yellow(MESSAGE_NO_TEMPLATING, bold=True))
3131

3232

3333
def report_full_run(action_in_past_tense, file_count):
3434
figure = crayons.green(str(file_count), bold=True)
3535
message = MESSAGE_TEMPLATED_ALL.format(action_in_past_tense, figure)
36-
print(_format_single(message, file_count))
36+
do_print(_format_single(message, file_count))
3737

3838

3939
def report_partial_run(action_in_past_tense, file_count, total):
4040
figure = crayons.green(str(file_count), bold=True)
4141
total_figure = crayons.yellow(str(total), bold=True)
4242
message = MESSAGE_REPORT.format(action_in_past_tense, figure, total_figure)
43-
print(_format_single(message, total))
43+
do_print(_format_single(message, total))
4444

4545

4646
def report_error_message(message):
47-
print(crayons.white("Error: ", bold=True) + crayons.red(message))
47+
do_print(crayons.white("Error: ", bold=True) + crayons.red(message))
4848

4949

5050
def report_warning_message(message):
51-
print(crayons.white("Warning: ", bold=True) + crayons.yellow(message))
51+
do_print(crayons.white("Warning: ", bold=True) + crayons.yellow(message))
5252

5353

5454
def report_info_message(message):
55-
print(crayons.white("Info: ") + crayons.green(message))
55+
do_print(crayons.white("Info: ") + crayons.green(message))
5656

5757

5858
def report_up_to_date():
59-
print(crayons.green(MESSAGE_UP_TO_DATE, bold=True))
59+
do_print(crayons.green(MESSAGE_UP_TO_DATE, bold=True))
6060

6161

6262
def convert_to_shell_exit_code(number_of_templated_files):
@@ -69,12 +69,12 @@ def convert_to_shell_exit_code(number_of_templated_files):
6969

7070
def report_git_pull(repo):
7171
colored_repo = crayons.green(repo, bold=True)
72-
print(MESSAGE_PULLING_REPO.format(colored_repo))
72+
do_print(MESSAGE_PULLING_REPO.format(colored_repo))
7373

7474

7575
def report_git_clone(repo):
7676
colored_repo = crayons.green(repo, bold=True)
77-
print(MESSAGE_CLONING_REPO.format(colored_repo))
77+
do_print(MESSAGE_CLONING_REPO.format(colored_repo))
7878

7979

8080
def report_template_not_in_moban_file(template):
@@ -90,3 +90,7 @@ def _format_single(message, count):
9090

9191
def report_file_extension_not_needed():
9292
report_info_message(MESSAGE_FILE_EXTENSION_NOT_NEEDED)
93+
94+
95+
def do_print(message):
96+
print(message)

moban/plugins/jinja2/engine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def __init__(self, template_fs, options=None):
8686
], # get a copy of this global variable
8787
)
8888
self.template_loader = template_loader
89+
8990
if options:
9091
if "extensions" in options:
9192
extensions = options.pop("extensions")

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4'
21
ruamel.yaml>=0.15.42;python_version == '3.7'
32
ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7'
43
ruamel.yaml>=0.15.98;python_version == '3.8'

setup.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
NAME = "moban"
4343
AUTHOR = "C. W."
44-
VERSION = "0.7.3"
44+
VERSION = "0.7.4"
4545
4646
LICENSE = "MIT"
4747
ENTRY_POINTS = {
@@ -53,7 +53,7 @@
5353
"General purpose static text generator"
5454
)
5555
URL = "https://github.com/moremoban/moban"
56-
DOWNLOAD_URL = "%s/archive/0.7.3.tar.gz" % URL
56+
DOWNLOAD_URL = "%s/archive/0.7.4.tar.gz" % URL
5757
FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"]
5858
KEYWORDS = [
5959
"python",
@@ -65,11 +65,11 @@
6565
"Topic :: Software Development :: Libraries",
6666
"Programming Language :: Python",
6767
"Intended Audience :: Developers",
68-
"Programming Language :: Python :: 2.6",
69-
"Programming Language :: Python :: 2.7",
70-
"Programming Language :: Python :: 3.3",
71-
"Programming Language :: Python :: 3.4",
72-
"Programming Language :: Python :: 3.5",
68+
69+
"Programming Language :: Python :: 3 :: Only",
70+
71+
72+
7373
"Programming Language :: Python :: 3.6",
7474
"Programming Language :: Python :: 3.7",
7575
"Programming Language :: Python :: 3.8",
@@ -90,15 +90,14 @@
9090

9191
PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"])
9292
EXTRAS_REQUIRE = {
93-
":python_version == '3.4'": ["ruamel.yaml>=0.15.5,<=0.15.94"],
9493
":python_version == '3.7'": ["ruamel.yaml>=0.15.42"],
9594
":python_version != '3.4' and python_version < '3.7'": ["ruamel.yaml>=0.15.5"],
9695
":python_version == '3.8'": ["ruamel.yaml>=0.15.98"],
9796
}
9897
# You do not need to read beyond this line
9998
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
100-
GS_COMMAND = ("gs moban v0.7.3 " +
101-
"Find 0.7.3 in changelog for more details")
99+
GS_COMMAND = ("gs moban v0.7.4 " +
100+
"Find 0.7.4 in changelog for more details")
102101
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
103102
"Please install gease to enable it.")
104103
UPLOAD_FAILED_MSG = (

tests/fixtures/.moban-2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
requires:
2-
- pypi-mobans-pkg
2+
- pypi-mobans-pkg==0.0.12
33
configuration:
44
configuration_dir: "setupmobans:config"
55
template_dir:

tests/integration_tests/test_command_line_options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ def test_version_option():
449449

450450

451451
@patch("logging.basicConfig")
452-
def test_debug_option(fake_config):
452+
def test_warning_verbose(fake_config):
453453
fake_config.side_effect = [IOError("stop test")]
454-
test_args = ["moban", "-vv"]
454+
test_args = ["moban", "-vvv"]
455455
with patch.object(sys, "argv", test_args):
456456
from moban.main import main
457457

@@ -460,7 +460,7 @@ def test_debug_option(fake_config):
460460
except IOError:
461461
fake_config.assert_called_with(
462462
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
463-
level=20,
463+
level=10,
464464
)
465465

466466

tests/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ flake8
77
black;python_version>="3.6"
88
isort;python_version>="3.6"
99
moban-handlebars
10-
pypi-mobans-pkg
10+
pypi-mobans-pkg==0.0.12
1111
# arrow 0.14.0 doesnt support Python 3.4
1212
arrow<0.14.0;python_version=="3.4"
1313
arrow;python_version!="3.4"

tests/test_file_system.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,5 +272,7 @@ def test_pip_install(fake_check_all):
272272

273273
pip_install(["package1", "package2"])
274274
fake_check_all.assert_called_with(
275-
[sys.executable, "-m", "pip", "install", "package1 package2"]
275+
[sys.executable, "-m", "pip", "install", "package1 package2"],
276+
stderr=-3,
277+
stdout=-3,
276278
)

0 commit comments

Comments
 (0)