-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Bump django-import-export to 4.3.4 #13414
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
aac497a
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 3d473fe
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos ef26e89
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 43a9c5d
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos d9680af
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 9227306
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 775ea11
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 95b7a61
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 4b08180
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 0dd431b
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos cd2756c
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 84df78d
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 863998e
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos d1bf6cb
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 6922337
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos e83a31f
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 9d3b752
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 75cda84
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos e305305
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos e9ba1a2
Tackle "Removed unused method `utils.original()`"
Viicos 3f09363
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 67b0328
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 1f79c4e
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos c0ee80c
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 358b74a
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 51bfef2
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 3081f93
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos ae79eab
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 8d88e26
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 591cf20
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos c69c492
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 9d402dc
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos ea4698c
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 38166f5
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos ade85ff
Tackle https://github.com/django-import-export/django-import-export/p…
Viicos 35b34ad
Fixes
Viicos 1aa4152
Try importing tablib
Viicos dca9a55
Revert import
Viicos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
stubs/django-import-export/import_export/command_utils.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from _typeshed import StrPath | ||
from typing import Any | ||
|
||
from .formats.base_formats import Format | ||
from .resources import ModelResource | ||
|
||
def get_resource_class(model_or_resource_class: str) -> ModelResource[Any]: ... | ||
|
||
MIME_TYPE_FORMAT_MAPPING: dict[str, type[Format]] | ||
|
||
def get_format_class(format_name: str, file_name: StrPath, encoding: str | None = None) -> Format: ... | ||
def get_default_format_names() -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import _typeshed | ||
from logging import Logger | ||
from typing import Any | ||
|
||
logger: Logger | ||
|
||
class DeclarativeMetaclass(type): | ||
def __new__(cls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], attrs: dict[str, Any]) -> _typeshed.Self: ... | ||
|
||
class ModelDeclarativeMetaclass(DeclarativeMetaclass): | ||
def __new__(cls: type[_typeshed.Self], name: str, bases: tuple[type[Any], ...], attrs: dict[str, Any]) -> _typeshed.Self: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
from typing import Any | ||
|
||
class ImportExportError(Exception): ... | ||
class FieldError(ImportExportError): ... | ||
class WidgetError(ImportExportError): ... | ||
|
||
class ImportError(ImportExportError): | ||
error: Exception | ||
number: int | None | ||
row: dict[str, Any] | None | ||
def __init__(self, error: Exception, number: int | None = None, row: dict[str, Any] | None = None) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
from collections.abc import Iterable, Sequence | ||
from typing import Any | ||
|
||
from django import forms | ||
from django.contrib.admin.helpers import ActionForm | ||
|
||
from .formats.base_formats import Format | ||
from .resources import Resource | ||
from .resources import ModelResource, Resource | ||
|
||
class ImportExportFormBase(forms.Form): | ||
resource: forms.ChoiceField | ||
def __init__(self, *args: Any, resources: list[type[Resource[Any]]] | None = None, **kwargs: Any) -> None: ... | ||
format: forms.ChoiceField | ||
def __init__( | ||
self, formats: list[type[Format]], resources: list[type[Resource[Any]]] | None = None, **kwargs: Any | ||
) -> None: ... | ||
|
||
class ImportForm(ImportExportFormBase): | ||
import_file: forms.FileField | ||
input_format: forms.ChoiceField | ||
def __init__(self, import_formats: list[Format], *args: Any, **kwargs: Any) -> None: ... | ||
field_order: Sequence[str] | ||
@property | ||
def media(self) -> forms.Media: ... | ||
|
||
class ConfirmImportForm(forms.Form): | ||
import_file_name: forms.CharField | ||
original_file_name: forms.CharField | ||
input_format: forms.CharField | ||
resource: forms.CharField | ||
def clean_import_file_name(self) -> str: ... | ||
|
||
class ExportForm(ImportExportFormBase): | ||
file_format: forms.ChoiceField | ||
def __init__(self, formats: list[Format], *args: Any, **kwargs: Any) -> None: ... | ||
export_items: forms.MultipleChoiceField | ||
|
||
def export_action_form_factory(formats: list[tuple[str, str]]) -> type[ActionForm]: ... | ||
class SelectableFieldsExportForm(ExportForm): | ||
resources: Iterable[ModelResource[Any]] | ||
is_selectable_fields_form: bool | ||
resource_fields: dict[str, list[str]] | ||
@staticmethod | ||
def create_boolean_field_name(resource: ModelResource[Any], field_name: str) -> str: ... | ||
def get_selected_resource(self) -> ModelResource[Any]: ... | ||
def get_selected_resource_export_fields(self) -> list[str]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from collections.abc import Sequence | ||
from typing import Any, Generic, TypeVar | ||
|
||
from django.db.models import Model | ||
|
||
from .instance_loaders import BaseInstanceLoader | ||
|
||
_ModelT = TypeVar("_ModelT", bound=Model) | ||
|
||
class ResourceOptions(Generic[_ModelT]): | ||
model: _ModelT | str | ||
fields: Sequence[str] | None | ||
exclude: Sequence[str] | None | ||
instance_loader_class: type[BaseInstanceLoader] | None | ||
import_id_fields: Sequence[str] | ||
export_order: Sequence[str] | None | ||
import_order: Sequence[str] | None | ||
widgets: dict[str, Any] | None | ||
use_transactions: bool | None | ||
skip_unchanged: bool | ||
report_skipped: bool | ||
clean_model_instances: bool | ||
chunk_size: int | None | ||
skip_diff: bool | ||
skip_html_diff: bool | ||
use_bulk: bool | ||
batch_size: int | ||
force_init_instance: bool | ||
using_db: str | None | ||
store_row_values: bool | ||
store_instance: bool | ||
use_natural_foreign_keys: bool |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srittau, as per #12990 (comment), do you think we can do the same here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's try it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it doesn't work with pyright, as we make use of the imported symbol in annotations