summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2022-06-16 09:27:57 +0300
committerGitHub <noreply@github.com>2022-06-16 09:27:57 +0300
commit79f3d333037a9f486718d4a61ae3c03622ebde23 (patch)
tree8717459bd4c12004d007d9900657a6d0c2d6380e
parent24bc2ddd682631439a590da89735297e09419289 (diff)
parent0d902412c3e1ddfcc305abaf24ccfd5a3b52a53e (diff)
downloadbabel-79f3d333037a9f486718d4a61ae3c03622ebde23.tar.gz
Merge pull request #889 from python-babel/become-2.10.32.10-maint
Become 2.10.3
-rw-r--r--.github/workflows/build.yml27
-rw-r--r--.github/workflows/test.yml8
-rw-r--r--CHANGES.rst10
-rw-r--r--Makefile5
-rw-r--r--babel/__init__.py2
-rwxr-xr-xscripts/make-release.py155
-rw-r--r--setup.cfg5
7 files changed, 46 insertions, 166 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..0593507
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,27 @@
+name: CI
+"on":
+ push:
+ branches:
+ - master
+ - '*-maint'
+ pull_request:
+ branches:
+ - master
+ - '*-maint'
+jobs:
+ Build:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.10"
+ cache: "pip"
+ cache-dependency-path: "**/setup.py"
+ - run: pip install build -e .
+ - run: make import-cldr
+ - run: python -m build
+ - uses: actions/upload-artifact@v3
+ with:
+ name: dist
+ path: dist
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e346f04..4989712 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,9 +2,13 @@ name: Test
on:
push:
- branches: [ master ]
+ branches:
+ - master
+ - '*-maint'
pull_request:
- branches: [ master ]
+ branches:
+ - master
+ - '*-maint'
jobs:
test:
diff --git a/CHANGES.rst b/CHANGES.rst
index 8ffd673..d3b9608 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,16 @@
Babel Changelog
===============
+Version 2.10.3
+--------------
+
+This is a bugfix release for Babel 2.10.2, which was mistakenly packaged with outdated locale data.
+
+Thanks to Michał Górny for pointing this out and Jun Omae for verifying.
+
+This and future Babel PyPI packages will be built by a more automated process,
+which should make problems like this less likely to occur.
+
Version 2.10.2
--------------
diff --git a/Makefile b/Makefile
index 8db9891..114f0c7 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,4 @@ develop:
tox-test: import-cldr
tox
-release: import-cldr
- python scripts/make-release.py
-
-.PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean release clean-test-env standalone-test
+.PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean clean-test-env standalone-test
diff --git a/babel/__init__.py b/babel/__init__.py
index 3d5b854..081178a 100644
--- a/babel/__init__.py
+++ b/babel/__init__.py
@@ -20,4 +20,4 @@ from babel.core import UnknownLocaleError, Locale, default_locale, \
negotiate_locale, parse_locale, get_locale_identifier
-__version__ = '2.10.2'
+__version__ = '2.10.3'
diff --git a/scripts/make-release.py b/scripts/make-release.py
deleted file mode 100755
index d8963f2..0000000
--- a/scripts/make-release.py
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/env python
-"""
- make-release
- ~~~~~~~~~~~~
-
- Helper script that performs a release. Does pretty much everything
- automatically for us.
-
- :copyright: (c) 2013 by Armin Ronacher.
- :license: BSD, see LICENSE for more details.
-"""
-import sys
-import os
-import re
-from datetime import datetime, date
-from subprocess import Popen, PIPE
-
-_date_clean_re = re.compile(r'(\d+)(st|nd|rd|th)')
-
-
-def parse_changelog():
- with open('CHANGES.rst') as f:
- lineiter = iter(f)
- for line in lineiter:
- match = re.search(r'^Version\s+(.*)', line.strip())
- if match is None:
- continue
- version = match.group(1).strip()
- if lineiter.next().count('-') != len(match.group(0)):
- continue
- while 1:
- change_info = lineiter.next().strip()
- if change_info:
- break
-
- match = re.search(r'released on (\w+\s+\d+\w+\s+\d+)'
- r'(?:, codename (.*))?', change_info,
- flags=re.IGNORECASE)
- if match is None:
- continue
-
- datestr, codename = match.groups()
- return version, parse_date(datestr), codename
-
-
-def bump_version(version):
- try:
- parts = map(int, version.split('.'))
- except ValueError:
- fail('Current version is not numeric')
- if parts[-1] != 0:
- parts[-1] += 1
- else:
- parts[0] += 1
- return '.'.join(map(str, parts))
-
-
-def parse_date(string):
- string = _date_clean_re.sub(r'\1', string)
- return datetime.strptime(string, '%B %d %Y')
-
-
-def set_filename_version(filename, version_number, pattern):
- changed = []
-
- def inject_version(match):
- before, old, after = match.groups()
- changed.append(True)
- return before + version_number + after
- with open(filename) as f:
- contents = re.sub(r"^(\s*%s\s*=\s*')(.+?)(')" % pattern,
- inject_version, f.read(),
- flags=re.DOTALL | re.MULTILINE)
-
- if not changed:
- fail('Could not find %s in %s', pattern, filename)
-
- with open(filename, 'w') as f:
- f.write(contents)
-
-
-def set_init_version(version):
- info('Setting __init__.py version to %s', version)
- set_filename_version('babel/__init__.py', version, '__version__')
-
-
-def set_setup_version(version):
- info('Setting setup.py version to %s', version)
- set_filename_version('setup.py', version, 'version')
-
-
-def build_and_upload():
- Popen([sys.executable, 'setup.py', 'release', 'sdist', 'upload']).wait()
-
-
-def fail(message, *args):
- print >> sys.stderr, 'Error:', message % args
- sys.exit(1)
-
-
-def info(message, *args):
- print >> sys.stderr, message % args
-
-
-def get_git_tags():
- return set(Popen(['git', 'tag'], stdout=PIPE).communicate()[0].splitlines())
-
-
-def git_is_clean():
- return Popen(['git', 'diff', '--quiet']).wait() == 0
-
-
-def make_git_commit(message, *args):
- message = message % args
- Popen(['git', 'commit', '-am', message]).wait()
-
-
-def make_git_tag(tag):
- info('Tagging "%s"', tag)
- Popen(['git', 'tag', tag]).wait()
-
-
-def main():
- os.chdir(os.path.join(os.path.dirname(__file__), '..'))
-
- rv = parse_changelog()
- if rv is None:
- fail('Could not parse changelog')
-
- version, release_date, codename = rv
- dev_version = bump_version(version) + '-dev'
-
- info('Releasing %s (codename %s, release date %s)',
- version, codename, release_date.strftime('%d/%m/%Y'))
- tags = get_git_tags()
-
- if version in tags:
- fail('Version "%s" is already tagged', version)
- if release_date.date() != date.today():
- fail('Release date is not today (%s != %s)')
-
- if not git_is_clean():
- fail('You have uncommitted changes in git')
-
- set_init_version(version)
- set_setup_version(version)
- make_git_commit('Bump version number to %s', version)
- make_git_tag(version)
- build_and_upload()
- set_init_version(dev_version)
- set_setup_version(dev_version)
-
-
-if __name__ == '__main__':
- main()
diff --git a/setup.cfg b/setup.cfg
index 87c8e96..ac49ca5 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,3 @@
-[aliases]
-release = sdist bdist_wheel
-
[tool:pytest]
norecursedirs = venv* .* _* scripts {args}
doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE ALLOW_UNICODE IGNORE_EXCEPTION_DETAIL
@@ -11,4 +8,4 @@ filterwarnings =
ignore:babel.numbers.format_decimal:DeprecationWarning
[metadata]
-license_file = LICENSE
+license_files = LICENSE