Skip to content

Latest commit

 

History

History
683 lines (514 loc) · 26 KB

CHANGELOG.rst

File metadata and controls

683 lines (514 loc) · 26 KB

Changelog

6.1.2

Release date: 2024-05-02

  • NXPY-253: Restore capability to use the client with a local HTTP server
  • NXPY-254: Authorization Error for OAuth
  • NXPY-255: Fix Test cases for moto3
  • NXPY-256: Upgrade from Node 16 to 20
  • NXPY-258: File download from aws S3 with auto-redirect not working in case of OAuth
  • NXPY-259: Deploy artifacts to packages.nuxeo.com

Technical changes

  • Added verify to OAuth2 to turn off the certificate verification when using self signed certificates (values: True/ False).
  • Added kwargs to OAuth2.refresh_token() to pass parameters (ex. verify).
  • Replaced mock_s3 with mock_aws in test_upload_s3.py

Minor changes

  • Upgraded actions/checkout from 3 to 4
  • Upgraded actions/download-artifact from 3 to 4
  • Upgraded actions/upload-artifact from 3 to 4
  • Upgraded actions/setup-python from 4 to 5
  • Upgraded codecov/codecov-action from 3.1.2 to 3.1.5
  • Upgraded pypa/gh-action-pypi-publish from master to release/v1

6.1.1

Release date: 2023-11-23

Technical changes

  • Switched flake8 from gitlab to github
  • Added F401 warning in ignore list for flake8

Minor changes

  • Upgraded actions/download-artifact from 2 to 3
  • Upgraded actions/upload-artifact from 2 to 3
  • Upgraded actions/setup-python from 2 to 4
  • Upgraded actions/checkout from 2 to 3
  • Upgraded codecov/codecov-action from 1 to 3.1.2

6.1.0

Release date: 2022-10-21

Technical changes

  • Added ssl_verify arguments

6.0.3

Release date: 2021-07-06

  • NXPY-228: Use proper job names in GitHub workflows
  • NXPY-230: Allow to pass requests arguments to the OAuth2 client
  • NXPY-231: Prevent warnings when packaging the module
  • NXPY-232: Allow specifying the upload provider type in the batch details
  • NXPY-233: Allow to pass additional arguments when querying document

Technical changes

  • Added subclient_kwargs keyword argument to OAuth2.__init__()
  • Added kwargs keyword arguments to nuxeo/documents.py::API.query()

6.0.2

Release date: 2021-06-07

  • NXPY-225: Allow to pass additional arguments when asking for a batchId

Technical changes

  • Added kwargs keyword arguments to nuxeo/uploads.py::API.post()

6.0.1

Release date: 2021-05-18

  • NXPY-223: Fix third-party credentials renewal

6.0.0

Release date: 2021-05-10

  • NXPY-129: Drop support for Python 2.7 and 3.5

Technical changes

  • Removed compat.py

5.2.0

Release date: 2021-05-07

  • NXPY-219: Add support for OpenID Connect Discovery
  • NXPY-220: Use a REST API call instead of Automation for Users.current_user()

Technical changes

  • Added OAuth2.validate_access_token()
  • Added redirect_uri keyword argument to OAuth2.__init__()
  • Added openid_configuration_url keyword argument to OAuth2.__init__()

5.1.0

Release date: 2021-04-27

  • NXPY-201: Implement support for OAuth2
  • NXPY-213: Handle incomplete serialized HTTP error
  • NXPY-214: Add a code coverage GitHub Action on PRs
  • NXPY-215: Add support for the JSON Web Token authentication
  • NXPY-217: Restore Python 2.7 support
  • NXPY-218: Introduce the BasicAuth class

Technical changes

  • Added nuxeo/auth/basic.py
  • Added nuxeo/auth/jwt.py
  • Added nuxeo/auth/oauth2.py
  • Added nuxeo/exceptions.py::OAuth2Error
  • Added nuxeo/utils.py::log_response()

5.0.0

Release date: 2021-03-04

  • NXPY-208: Use __slots__ for memory efficiency and attributes access velocity
  • NXPY-209: Allow to pass a callback to uploads.refresh_token()

Technical changes

  • Added token_callback keyword argument to Uploader.__init__()
  • Removed Task.comment
  • Removed User.password. Use .change_password() instead.
  • Added nuxeo/auth/base.py
  • Added kwargs keyword arguments to nuxeo/uploads.py::API.get_uploader()

4.1.1

Release date: 2021-02-26

  • NXPY-203: Better support badly cased or unknown Portal SSO digest algorithms
  • NXPY-204: Fix data leak issue with mutable model properties
  • NXPY-205: Improve S3 non-chunked uploads

Technical changes

  • Removed Batch.service class attribute
  • Removed Blob.service class attribute
  • Removed BufferBlob.stringio class attribute
  • Removed Comment.service class attribute
  • Removed FileBlob.fd class attribute
  • Removed Directory.service class attribute
  • Removed DirectoryEntry.service class attribute
  • Removed Document.service class attribute
  • Removed Group.service class attribute
  • Removed Model.service class attribute
  • Removed Model.uid class attribute
  • Removed Operation.service class attribute
  • Removed Task.service class attribute
  • Removed User.service class attribute
  • Removed Workflow.service class attribute

4.1.0

Release date: 2021-02-24

  • NXPY-198: Automatic deployment via GitHub Actions
  • NXPY-199: Add support for idempotent calls
  • NXPY-202: Add SSO with Portals authentication

Technical changes

  • Added TokenAuth.HEADER_TOKEN
  • Added nuxeo/auth/portal_sso.py
  • Added nuxeo/auth/token.py
  • Added nuxeo/auth/utils.py
  • Removed nuxeo/auth.py
  • Added nuxeo/constants.py::IDEMPOTENCY_KEY
  • Added nuxeo/exceptions.py::Conflict
  • Added nuxeo/exceptions.py::OngoingRequestError

4.0.0

Release date: 2020-12-05

  • NXPY-186: Remove the Blob.batch_id attribute
  • NXPY-188: Add mimetype tests
  • NXPY-191: Fix urllib3 DeprecationWarning in client.py
  • NXPY-192: Add support for Python 3.10
  • NXPY-193: Fix thread-safety in uploads and workflows

Technical changes

  • Removed Blob.batch_id. Use Blob.batchId instead.
  • Removed utils.py::SwapAttr

3.1.1

Release date: 2020-11-12

  • NXPY-188: Set the Content-Type for uploads done via S3

3.1.0

Release date: 2020-11-06

  • NXPY-183: Set the TCP keep alive option by default
  • NXPY-184: Fix test_upload_s3.py about IllegalLocationConstraintException
  • NXPY-185: Add the Blob.batchId attribute

Technical changes

  • Added Blob.batchId and deprecated Blob.batch_id
  • Added constants.LINUX
  • Added constants.MAC
  • Added constants.TCP_KEEPINTVL
  • Added constants.TCP_KEEPIDLE
  • Added constants.WINDOWS
  • Added nuxeo/tcp/tcp_keep_alive_probes.py

3.0.1

Release date: 2020-09-08

  • NXPY-180: Allow to upload to S3 when the bucket prefix is empty

3.0.0

Release date: 2020-08-25

  • NXPY-159: Allow to pass additional arguments to Batch.complete()
  • NXPY-145: Detect and log appropriate debug info when the transfer if chunked
  • NXPY-163: Add the capability to refresh tokens in third-party batch handlers
  • NXPY-164: Clean-up code smells found by Sourcery
  • NXPY-166: Move to GitHub Actions for testing
  • NXPY-167: Enable back Python 2.7 tests (+ fixes)
  • NXPY-168: Rework Comments handling to work on all supported Nuxeo versions
  • NXPY-169: Fix errors to fully re-support Nuxeo 9.10
  • NXPY-170: Enforce NuxeoClient.server_info() robustness against invalid data
  • NXPY-171: Set the timeout for uploads using the default handler
  • NXPY-172: Always log the server response
  • NXPY-173: Consign additionnal parameters sent to each HTTP requests in logs
  • NXPY-174: Improve test_repository.py reliability
  • NXPY-176: Add Nuxeo.can_use() to determine if a given operation is available
  • NXPY-177: Prevent AttributeError when fetching the server version and the response is bad (and return "unknown")
  • NXPY-178: Use a uniq ID for the S3 direct upload key
  • NXPY-179: Use S3 accelerate endpoint when enabled

Technical changes

  • Batch.complete() now handles additional parameters
  • Added Batch.key
  • Added Nuxeo.can_use()
  • Added Uploader.timeout()
  • Added nuxeo/constants.py::LOG_LIMIT_SIZE
  • nuxeo/uploads.py::API.complete() now handles additional parameters
  • Added kwargs keyword arguments to nuxeo/uploads.py::API.send_data()
  • Added docuid argument to nuxeo/comments.py::API.get()
  • Added params keyword argument to nuxeo/comments.py::API.get()
  • Changed uid from positional argument to keyword argument in nuxeo/comments.py::API.get()
  • Added docuid argument to nuxeo/comments.py::API.post()
  • Changed comment (Comment) argument of nuxeo/comments.py::API.post() to text (str)
  • Added nuxeo/compat.py::lru_cache()
  • Changed nuxeo/constants.py::TIMEOUT_CONNECT from 5 to 10
  • Changed nuxeo/constants.py::TIMEOUT_READ from 30 to 600
  • Added nuxeo/uploads.py::API.refresh_token()
  • Added nuxeo/utils.py::cmp()
  • Added nuxeo/utils.py::get_response_content()
  • Added nuxeo/utils.py::version_compare()
  • Added nuxeo/utils.py::version_compare_client()
  • Added nuxeo/utils.py::version_le()
  • Added nuxeo/utils.py::version_lt()

2.4.4

Release date: 2020-02-28

  • NXPY-148: Use the tmp_path fixture to auto-cleanup created files in tests
  • NXPY-155: Don't use dots or underscores in custom HTTP headers
  • NXPY-156: Do not silence S3 errors on upload resuming
  • NXPY-158: Allow S3 custom endpoint for direct upload

2.4.3

Release date: 2020-01-31

  • NXPY-151: Do not log the full exception when retrieving MPU parts
  • NXPY-152: Remove Uploader assert statements
  • NXPY-153: Do not yield one more time only for S3 uploads
  • NXPY-154: Fix S3 client instanciation not thread-safe

2.4.2

Release date: 2020-01-15

  • NXPY-150: Add nuxeo.uploads.has_s3() helper

Technical changes

  • Added nuxeo.uploads.has_s3()

2.4.1

Release date: 2020-01-13

Technical changes

  • Added Batch.is_s3()

2.4.0

Release date: 2020-01-10

  • NXPY-68: Add the users.current_user() method
  • NXPY-138: Add the Amazon S3 provider for uploads
  • NXPY-143: Remove duplicate constructors code in models.py

Technical changes

  • Added Batch.complete()
  • Added Batch.extraInfo
  • Added Batch.etag
  • Added Batch.multiPartUploadId
  • Added Batch.provider
  • Added nuxeo/constants.py::UP_AMAZON_S3
  • Added nuxeo.exceptions.InvalidUploadHandler
  • Added nuxeo/handlers/default.py
  • Added nuxeo/handlers/s3.py
  • Added nuxeo.uploads.complete()
  • Added nuxeo.uploads.handlers()
  • Added handler="" keyword argument to nuxeo.uploads.post()
  • Added data_len=0 keyword argument to nuxeo.uploads.send_data()
  • Added nuxeo.users.current_user()
  • Added nuxeo.utils.chunk_partition()
  • Added nuxeo.utils.log_chunk_details()
  • Removed Batch.__init__()
  • Removed Comment.__init__()
  • Removed DirectoryEntry.__init__()
  • Removed Directory.__init__()
  • Removed Document.__init__()
  • Removed Group.__init__()
  • Removed Operation.__init__()
  • Removed Task.__init__()
  • Removed User.__init__()
  • Removed Workflow.__init__()

2.3.0

Release date: 2019-12-06

Technical changes

  • Added nuxeo/comments.py
  • Added comments argument to nuxeo/documents.py::API.__init__()
  • Added nuxeo/documents.py::API.comment_api attribute
  • Added nuxeo/models.py::Comment class
  • Added Document.comment()
  • Added Document.comments()
  • Added Nuxeo.comments

2.2.4

Release date: 2019-10-29

  • NXPY-128: Make Batch upload index public
  • NXPY-135: Expand the documentation on how to attach multiple blobs to a given document
  • NXPY-136: Allow additionnal parameters to Directories.get()
  • NXPY-137: Fix failing test about converters
  • NXPY-139: Enhance tox.ini to use multiple specific testenvs

Technical changes

  • nuxeo/directories.py::API.get() now handles additionnal parameters

2.2.3

Release date: 2019-09-30

  • NXPY-125: Add a warning for Python 2 removal
  • NXPY-130: Expand the group examples to show subgroup handling
  • NXPY-132: Add enrichers argument to Documents.get_children()

2.2.2

Release date: 2019-08-26

  • NXPY-112: Update uploadedSize on each and every upload iteration
  • NXPY-110: Max retries for all connections
  • NXPY-111: Add timeouts handling
  • NXPY-113: Use requests.sessions.Session rather than the deprecated requests.session
  • NXPY-114: Do not log the response of the CMIS endpoint
  • NXPY-117: Use black for a one-shot big clean-up
  • NXPY-118: Missing status code from Forbidden and Unauthorized exceptions
  • NXPY-119: Remove the requests warning
  • NXPY-120: Add a test for unavailable converters
  • NXPY-121: Do not log the response of the automation endpoint
  • NXPY-123: Pass the NXDRIVE_TEST_NUXEO_URL envar to tox
  • NXPY-126: Allow several callables for transfer callbacks

Technical changes

  • Added NuxeoClient.disable_retry()
  • Added NuxeoClient.enable_retry()
  • Added NuxeoClient.retries
  • Added nuxeo/constants.py::MAX_RETRY
  • Added nuxeo/constants.py::RETRY_BACKOFF_FACTOR
  • Added nuxeo/constants.py::RETRY_METHODS
  • Added nuxeo/constants.py::RETRY_STATUS_CODES
  • Added nuxeo/constants.py::TIMEOUT_CONNECT
  • Added nuxeo/constants.py::TIMEOUT_READ
  • Changed nuxeo/exceptions.py::HTTPError to inherits from requests.exceptions.RetryError and NuxeoError

2.2.1

Release date: 2019-06-27

  • NXPY-108: [Python 2] Fix repr(HTTPError) with non-ascii characters in the message

2.2.0

Release date: unreleased

  • NXPY-102: Set Upload operations to void operations
  • NXPY-103: Launch flake8 on actual client data
  • NXPY-104: Do not log server response based on content length but content type
  • NXPY-105: Make a diffrence between HTTP 401 and 403 errors
  • NXPY-106: Lower logging level in get_digester()

Technical changes

  • Added nuxeo/client.py::HTTP_ERROR
  • Added nuxeo/exceptions.py::Forbidden
  • Added void_op=True keyword argument to nuxeo/uploads.py::API.execute()

2.1.1

Release date: 2019-06-13

  • NXPY-97: Remove usage of pytest_namespace to allow using pytest > 4
  • NXPY-100: Improve memory consumption

2.1.0

Release date: 2019-06-06

  • NXPY-88: Pass the file descriptor to Requests when doing a simple upload
  • NXPY-89: Add repr(Uploader) to ease debug
  • NXPY-90: Do not open file descriptor on empty file
  • NXPY-91: Make uploads rely on server info for missing chunks
  • NXPY-92: Fix server_info() default value check
  • NXPY-94: Force write of file to disk
  • NXPY-95: Use Sentry in tests
  • NXPY-96: Fix tests execution not failing when it should do (+ clean-up)

Technical changes

  • Added Uploader.is_complete()
  • Added Uploader.process()
  • Removed chunked argument from Uploader.__init__()
  • Removed Uploader.index
  • Removed Uploader.init()
  • Removed Uploader.response
  • Renamed nuxeo/operations.py::API.save_to_file() check_suspended keyword argument to callback
  • Added nuxeo/uploads.py::ChunkUploader
  • Changed nuxeo/uploads.py::API.state() return value index (int) to uploaded_chunks (set)

2.0.5

Release date: 2019-03-28

  • NXPY-80: Stick with pytest < 4 to prevent internal error due to the use of deprecated pytest_namespace
  • NXPY-81: Fix flake8 errors and add flake8 to the CI
  • NXPY-82: Fix test_convert_xpath()
  • NXPY-83: Fix test_convert() and test_convert_given_converter()
  • NXPY-84: Handle list type in operation parameters
  • NXPY-86: Fix directories API
  • NXPY-87: Add an upload helper to control the chunk uploads

Technical changes

  • Added Batch.get_uploader()
  • Added nuxeo/uploads.py::API.get_uploader()
  • Added chunk_size keyword argument to nuxeo/uploads.py::API.upload()
  • Added chunk_size keyword argument to nuxeo/uploads.py::API.state()
  • Removed chunk_limit keyword argument from nuxeo/uploads.py::API.upload()
  • Added callback keyword argument to nuxeo/uploads.py::API.upload()
  • Added nuxeo/uploads.py::Uploader
  • Added UploadError.info

2.0.4

Release date: 2018-10-24

  • NXPY-71: Use tox to test the client on Python 2 and 3
  • NXPY-72: Rely only on application/json content type
  • NXPY-74: Add context as a property of Operation class

2.0.3

Release date: 2018-09-04

  • NXPY-69: Split the get_digester() function in two

Technical changes

  • Added utils.py::get_digest_algorithm()
  • Added utils.py::get_digest_hash()

2.0.2

Release date: 2018-06-28

  • NXPY-64: Distribute a wheel on PyPi
  • NXPY-65: Fix bytes <> str warnings
  • NXPY-67: Fix Python 3.7 DeprecationWarning with ABCs

Technical changes

  • Removed compat.py::get_error_message()

2.0.1

Release date: 2018-05-31

  • NXPY-58: Modify the client to fit in Nuxeo Drive
  • NXPY-63: Handle multiblob uploads to a single document

Technical changes

  • Added Batch.attach()
  • Added Batch.execute()
  • Added nuxeo/uploads.py::attach()
  • Added nuxeo/uploads.py::execute()

2.0.0

Release date: 2018-05-18

This is a refactoring of the module that breaks the compatibility with older versions.

  • NXPY-11: Add usage examples
  • NXPY-16: Move from urllib2 and poster to Requests
  • NXPY-26: Use of setup.cfg
  • NXPY-37: Add type checking for operation parameters
  • NXPY-40: Add chunked resumable upload
  • NXPY-42: Client refactoring
  • NXPY-54: Add new Trash API
  • A lot of code clean-up and improvement

Technical changes

  • Added nuxeo/operations.py::API
  • Added nuxeo/tasks.py::API
  • Added APIEndpoint.exists()
  • Changed BatchBlob to Blob
  • Changed BatchUpload to nuxeo/uploads.py::API
  • Changed Blob._batchid to Blob.batchid
  • Changed Blob._service to Blob.service
  • Changed Directory to nuxeo/directories.py::API
  • Added Document.is_locked()
  • Added Document.isTrashed
  • Added Document.trash()
  • Added Document.untrash()
  • Removed FileBlob.get_upload_buffer()
  • Removed FileBlob._read_data()
  • Added nuxeo/compat.py::get_bytes()
  • Added nuxeo/compat.py::get_error_message()
  • Added nuxeo/compat.py::get_text()
  • Changed Groups to nuxeo/groups.py::API
  • Changed Nuxeo.request() to NuxeoClient.request()
  • Moved Nuxeo.InvalidBatchException to nuxeo/exceptions.py::InvalidBatch
  • Moved Nuxeo.Unauthorized to nuxeo/exceptions.py::Unauthorized
  • Removed Nuxeo.debug()
  • Removed Nuxeo.error()
  • Removed Nuxeo.force_decode()
  • Removed Nuxeo.trace()
  • Changed Nuxeo._check_params() to nuxeo/operations.py::API.check_params()
  • Removed Nuxeo._create_action()
  • Removed Nuxeo._end_action()
  • Removed Nuxeo._get_action()
  • Removed Nuxeo._get_common_headers()
  • Removed Nuxeo._get_cookies()
  • Changed Nuxeo._rest_url to NuxeoClient.api_path
  • Added nuxeo/client.py::NuxeoClient
  • Added NuxeoClient.server_info(force=False)
  • Added NuxeoClient.server_version
  • Changed NuxeoObject to Model
  • Changed NuxeoService to APIEndpoint
  • Changed Repository to nuxeo/documents.py::API
  • Added nuxeo/auth.py::TokenAuth
  • Added nuxeo/exceptions.py::UnavailableConvertor
  • Changed Users to nuxeo/users.py::API
  • Removed Workflows._map()
  • Changed Workflows to nuxeo/workflows.py::API