Skip to content

Commit

Permalink
remove unused compatibility code
Browse files Browse the repository at this point in the history
This change removes `__future__` imports and 'coding: utf-8' 
declarations.

Co-authored-by: Jason Racine <[email protected]>
  • Loading branch information
Jayracine and Jayracine authored Oct 30, 2021
1 parent 8f8e190 commit 5dcf24d
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 42 deletions.
20 changes: 8 additions & 12 deletions poetry/factory.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals

from pathlib import Path
from typing import TYPE_CHECKING
from typing import Dict
Expand All @@ -10,17 +7,16 @@
from cleo.io.io import IO
from cleo.io.null_io import NullIO

from poetry.config.config import Config
from poetry.config.file_config_source import FileConfigSource
from poetry.core.factory import Factory as BaseFactory
from poetry.core.toml.file import TOMLFile

from .config.config import Config
from .config.file_config_source import FileConfigSource
from .locations import CONFIG_DIR
from .packages.locker import Locker
from .packages.project_package import ProjectPackage
from .plugins.plugin_manager import PluginManager
from .poetry import Poetry
from .repositories.pypi_repository import PyPiRepository
from poetry.locations import CONFIG_DIR
from poetry.packages.locker import Locker
from poetry.packages.project_package import ProjectPackage
from poetry.plugins.plugin_manager import PluginManager
from poetry.poetry import Poetry
from poetry.repositories.pypi_repository import PyPiRepository


if TYPE_CHECKING:
Expand Down
2 changes: 0 additions & 2 deletions poetry/masonry/builders/editable.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import hashlib
import os
import shutil
Expand Down
3 changes: 0 additions & 3 deletions tests/console/commands/test_export.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import pytest

from tests.helpers import get_package
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from distutils.core import setup

packages = ["project_with_extras"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from setuptools import setup


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from setuptools import setup


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import ast
import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from setuptools import setup


Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/project_with_setup/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from setuptools import setup


Expand Down
3 changes: 0 additions & 3 deletions tests/installation/test_executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import json
import re
import shutil
Expand Down
2 changes: 0 additions & 2 deletions tests/installation/test_installer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import itertools
import json

Expand Down
2 changes: 0 additions & 2 deletions tests/installation/test_installer_old.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import unicode_literals

import itertools

from pathlib import Path
Expand Down
3 changes: 0 additions & 3 deletions tests/masonry/builders/test_editable_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import os
import shutil

Expand Down
4 changes: 0 additions & 4 deletions tests/test_factory.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals

from pathlib import Path

import pytest
Expand Down
2 changes: 0 additions & 2 deletions tests/utils/fixtures/setups/ansible/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import print_function

import json
import os
import os.path
Expand Down
1 change: 0 additions & 1 deletion tests/utils/fixtures/setups/flask/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import re
from collections import OrderedDict
Expand Down
1 change: 0 additions & 1 deletion tests/utils/fixtures/setups/pendulum/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from distutils.core import setup

from build import *
Expand Down

0 comments on commit 5dcf24d

Please sign in to comment.