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

Default timezone to UTC for blog plugin created date #7730

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

perpil
Copy link
Contributor

@perpil perpil commented Nov 20, 2024

Fix for #7725

I'm still trying to test this, when I try and pull the latest mkdocs-material and apply this change I see this error:

❯ pip install -e mkdocs-material --upgrade
Obtaining file:///Users/david/Documents/GitHub/mkdocs-material
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 167, in prepare_metadata_for_build_editable
          hook = backend.prepare_metadata_for_build_editable
      AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 176, in prepare_metadata_for_build_editable
          whl_basename = build_hook(metadata_directory, config_settings)
        File "/private/var/folders/v5/vyxbm5mj7pg70pn8m8vgftd80000gn/T/pip-build-env-xyqkfrxl/overlay/lib/python3.10/site-packages/hatchling/build.py", line 83, in build_editable
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
        File "/private/var/folders/v5/vyxbm5mj7pg70pn8m8vgftd80000gn/T/pip-build-env-xyqkfrxl/overlay/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
          self.metadata.validate_fields()
        File "/private/var/folders/v5/vyxbm5mj7pg70pn8m8vgftd80000gn/T/pip-build-env-xyqkfrxl/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 266, in validate_fields
          self.core.validate_fields()
        File "/private/var/folders/v5/vyxbm5mj7pg70pn8m8vgftd80000gn/T/pip-build-env-xyqkfrxl/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 1366, in validate_fields
          getattr(self, attribute)
        File "/private/var/folders/v5/vyxbm5mj7pg70pn8m8vgftd80000gn/T/pip-build-env-xyqkfrxl/overlay/lib/python3.10/site-packages/hatchling/metadata/core.py", line 677, in license
          from packaging.licenses import canonicalize_license_expression
      ModuleNotFoundError: No module named 'packaging.licenses'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I see a few recent commits to the file pyproject.toml:

commit fbaeb7074e58d42081bf2da26026f26433287817
Merge: 0aea88ac6 51c9f9acb
Author: squidfunk <[email protected]>
Date:   Mon Nov 18 11:05:18 2024 +0100

    Merge remote-tracking branch 'upstream/master'

commit 5c9ee60ab8209bfb167d3ce9a88025205062c0d4
Author: squidfunk <[email protected]>
Date:   Wed Nov 13 08:51:34 2024 +0100

    Revert "Temporarily pin hatchling to fix build"

    This reverts commit d56a9dd34ad72c301d9702df0103315582564ece.

commit 0aea88ac60c0d5e4e4999d87083aeca91fe9b0f3
Merge: fa109903b d56a9dd34
Author: squidfunk <[email protected]>
Date:   Mon Nov 11 19:19:21 2024 +0100

    Merge remote-tracking branch 'upstream/master'

commit d56a9dd34ad72c301d9702df0103315582564ece
Author: squidfunk <[email protected]>
Date:   Mon Nov 11 19:15:12 2024 +0100

    Temporarily pin hatchling to fix build

@perpil
Copy link
Contributor Author

perpil commented Nov 20, 2024

Unblocked now and will continue testing I needed to upgrade my packaging module

❯ pip install packaging --upgrade
Requirement already satisfied: packaging in /opt/homebrew/lib/python3.10/site-packages (23.1)
Collecting packaging
  Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Using cached packaging-24.2-py3-none-any.whl (65 kB)
Installing collected packages: packaging
  Attempting uninstall: packaging
    Found existing installation: packaging 23.1
    Uninstalling packaging-23.1:
      Successfully uninstalled packaging-23.1
Successfully installed packaging-24.2

@perpil
Copy link
Contributor Author

perpil commented Nov 20, 2024

Ok I've tested locally with a few date/time formats:

date: 2023-09-01T00:00:00Z
date: 2019-02-25T04:25:00
date: 2019-02-25T04:25:00-07:00
date: 2023-09-01T00:00:00
date: 2023-09-01

Let me know if there is anything else I should test.

@squidfunk
Copy link
Owner

Thanks! Could you also make sure that the changes are in the material folder, i.e., run the build?

@perpil
Copy link
Contributor Author

perpil commented Nov 20, 2024

Thanks! Could you also make sure that the changes are in the material folder, i.e., run the build?

Sure, giving it a shot now.

@squidfunk
Copy link
Owner

Thanks! LGTM.

@squidfunk squidfunk merged commit eee4934 into squidfunk:master Nov 20, 2024
4 checks passed
@perpil perpil deleted the patch-2 branch November 25, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants