Matt Robinson cdae53cc29
chore: deprecation warning for file_filename (#1191)
### Summary

Closes #1007. Adds a deprecation warning for the `file_filename` kwarg
to `partition`, `partition_via_api`, and `partition_multiple_via_api`.
Also catches a warning in `ebooklib` that we do not want to emit in
`unstructured`.

### Testing

```python
from unstructured.partition.auto import partition

filename = "example-docs/winter-sports.epub"

# Should not emit a warning
with open(filename, "rb") as f:
    elements = partition(file=f, metadata_filename="test.epub")
# Should be test.epub
elements[0].metadata.filename

# Should emit a warning
with open(filename, "rb") as f:
    elements = partition(file=f, file_filename="test.epub")
# Should be test.epub
elements[0].metadata.filename

# Should raise an error
with open(filename, "rb") as f:
    elements = partition(file=f, metadata_filename="test.epub", file_filename="test.epub")
```
2023-08-24 07:02:47 +00:00
..
2023-08-21 10:27:32 -07:00
2023-08-22 19:31:07 +00:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00
2023-08-21 10:27:32 -07:00