Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove __future__ statements #828

Merged
merged 2 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### 26.0.3 [828](https://github.com/openfisca/openfisca-core/pull/828)

- Remove `__future__` statements
- As Python 2 support has been dropped, they are not needed anymore.

### 26.0.2 [830](https://github.com/openfisca/openfisca-core/pull/830)

- Collect and publish measurements of which lines of codes are exercised (or not) by our tests
Expand Down
2 changes: 0 additions & 2 deletions openfisca_core/base_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
If a variable is calculated at a period for which it does not have a formulas, its base_function will be called to try to infere a value based on past or future values of the variable.
"""

from __future__ import unicode_literals, print_function, division, absolute_import


def requested_period_default_value(holder, period, *extra_params):
"""
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/commons.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
from builtins import str


Expand Down
1 change: 0 additions & 1 deletion openfisca_core/data_storage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import shutil
import os

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/entities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import traceback
import warnings
import textwrap
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/errors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import os

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/formula_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


"""Helpers to write formulas."""
from __future__ import unicode_literals, print_function, division, absolute_import


import numpy as np
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/holders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import logging
import os
import sys
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/indexed_enums.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import numpy as np
from enum import Enum as BaseEnum
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/memory_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import logging

log = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/model_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
from datetime import date # noqa analysis:ignore

from numpy import ( # noqa analysis:ignore
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


"""Handle legislative parameters."""
from __future__ import unicode_literals, print_function, division, absolute_import


import os
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

Since a period is a triple it can be used as a dictionary key.
"""

import calendar
import datetime
import re
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/rates.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import numpy

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/reforms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import copy

from openfisca_core.parameters import ParameterNode
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import traceback
import importlib
import logging
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/find_placeholders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import os
import fnmatch
import sys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

The aim of this script is to compare the time taken by the calculation of the values
"""
from __future__ import unicode_literals, print_function, division, absolute_import
from contextlib import contextmanager
import argparse
import sys
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/measure_performances.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


"""Measure performances of a basic tax-benefit system to compare to other OpenFisca implementations."""
from __future__ import unicode_literals, print_function, division, absolute_import
import argparse
import logging
import sys
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import

import numpy as np
import timeit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

Comments are NOT converted.
'''
from __future__ import unicode_literals, print_function, division, absolute_import


import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
or just (output is written in a directory called `yaml_parameters`):
`python xml_to_yaml_country_template.py`
'''
from __future__ import unicode_literals, print_function, division, absolute_import
import sys
import os

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
or just (output is written in a directory called `yaml_parameters`):
`python xml_to_yaml_extension_template.py`
'''
from __future__ import unicode_literals, print_function, division, absolute_import

import sys
import os
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/migrations/v24_to_25.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import argparse
import os
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/openfisca_command.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import
import argparse
import warnings
import sys
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/remove_fuzzy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import
# remove_fuzzy.py : Remove the fuzzy attribute in xml files and add END tags.
# See https://github.com/openfisca/openfisca-core/issues/437

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/run_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import logging
import sys
import os
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/scripts/simulation_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import
import numpy as np

import random
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/simulations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-


from __future__ import unicode_literals, print_function, division, absolute_import
from os import linesep
import tempfile
import logging
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/taxbenefitsystems.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-


from __future__ import unicode_literals, print_function, division, absolute_import
import glob
from inspect import isclass
from os import path, linesep
Expand Down
2 changes: 0 additions & 2 deletions openfisca_core/taxscales.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-


from __future__ import unicode_literals, print_function, division, absolute_import

from bisect import bisect_left, bisect_right
import copy
import logging
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import os

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/tools/simulation_dumper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import os

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/tools/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
A module to run openfisca yaml tests
"""

from __future__ import unicode_literals, print_function, division, absolute_import
from builtins import str

import glob
Expand Down
1 change: 0 additions & 1 deletion openfisca_core/tracers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import numpy as np

Expand Down
1 change: 0 additions & 1 deletion openfisca_core/variables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import datetime
import inspect
import re
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import logging
import os
import traceback
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/errors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals
import logging

log = logging.getLogger('gunicorn.error')
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

from copy import deepcopy

Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

from openfisca_web_api.loader.parameters import build_parameters
from openfisca_web_api.loader.variables import build_variables
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/entities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
from openfisca_core.commons import to_unicode


Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/parameters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
from openfisca_core.parameters import Parameter, ParameterNode, Scale


Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/spec.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import os
import yaml
from copy import deepcopy
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/tax_benefit_system.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import importlib
import traceback
import logging
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/loader/variables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import datetime
import inspect
import textwrap
Expand Down
1 change: 0 additions & 1 deletion openfisca_web_api/scripts/serve.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import sys
import logging

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-


from __future__ import unicode_literals, print_function, division, absolute_import
from setuptools import setup, find_packages

# Please make sure to cap all dependency versions, in order to avoid unwanted
Expand Down Expand Up @@ -39,7 +38,7 @@

setup(
name = 'OpenFisca-Core',
version = '26.0.2',
version = '26.0.3',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.org',
classifiers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import os

from nose.tools import assert_in, raises
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
import os

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_base_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import
import numpy as np
from openfisca_core.tools import assert_near

Expand Down
1 change: 0 additions & 1 deletion tests/core/test_calculate_output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import unicode_literals, print_function, division, absolute_import
from nose.tools import raises

from openfisca_core.model_api import * # noqa analysis:ignore
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_countries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import
from nose.tools import raises, assert_raises

from openfisca_core.variables import Variable
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_cycles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-


from __future__ import unicode_literals, print_function, division, absolute_import
from nose.tools import raises

from openfisca_core import periods
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_dump_restore.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals, print_function, division, absolute_import

import shutil
import tempfile
Expand Down
Loading