[MacPorts] #71401: py312-pydantic_core: TypeError: expected string or bytes-like object, got 'NoneType' (was: py312-pydantic_core -- TypeError: expected string or bytes-like object, got 'NoneType')

MacPorts noreply at macports.org
Tue Dec 10 22:46:28 UTC 2024


#71401: py312-pydantic_core: TypeError: expected string or bytes-like object, got
'NoneType'
-------------------------------+--------------------
  Reporter:  ashterenli        |      Owner:  (none)
      Type:  defect            |     Status:  new
  Priority:  Normal            |  Milestone:
 Component:  ports             |    Version:
Resolution:                    |   Keywords:
      Port:  py-pydantic_core  |
-------------------------------+--------------------

Old description:

> {{{
> MacPorts base version 2.10.5 installed,
>
> py312-pydantic_core            2.19.0_0 < 2.19.0_0  (platform darwin 23
> != darwin 24)
>
> }}}
>
> fails to update with
> {{{
> :debug:build
> SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk'
> :debug:build SOURCE_DATE_EPOCH='1729841969'
> :info:build Executing:  cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
> /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
> -m build --no-isolation --wheel --outdir
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work
> :debug:build system:  cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
> /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
> -m build --no-isolation --wheel --outdir
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work
> :info:build * Getting build dependencies for wheel...
> :info:build Traceback (most recent call last):
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/__main__.py", line 178, in _handle_build_error
> :info:build     yield
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/__main__.py", line 429, in main
> :info:build     built = build_call(
> :info:build             ^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/__main__.py", line 238, in build_package
> :info:build     out = _build(isolation, srcdir, outdir, distribution,
> config_settings, skip_dependency_check, installer)
> :info:build
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/__main__.py", line 172, in _build
> :info:build     return _build_in_current_env(srcdir, outdir,
> distribution, config_settings, skip_dependency_check)
> :info:build
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/__main__.py", line 151, in _build_in_current_env
> :info:build     missing = builder.check_dependencies(distribution,
> config_settings or {})
> :info:build
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/_builder.py", line 243, in check_dependencies
> :info:build     return {u for d in dependencies for u in
> check_dependency(d)}
> :info:build
> ^^^^^^^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/build/_util.py", line 53, in check_dependency
> :info:build     if req.specifier and not
> req.specifier.contains(dist.version, prereleases=True):
> :info:build
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/packaging/specifiers.py", line 917, in contains
> :info:build     item = Version(item)
> :info:build            ^^^^^^^^^^^^^
> :info:build   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
> /site-packages/packaging/version.py", line 200, in __init__
> :info:build     match = self._regex.search(version)
> :info:build             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> :info:build TypeError: expected string or bytes-like object, got
> 'NoneType'
> :info:build ERROR expected string or bytes-like object, got 'NoneType'
> :info:build Command failed:  cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
> /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
> -m build --no-isolation --wheel --outdir
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
> .org_macports_release_tarballs_ports_python_py-
> pydantic_core/py312-pydantic_core/work
> :info:build Exit code: 1
> :error:build Failed to build py312-pydantic_core: command execution
> failed
> :debug:build Error code: CHILDSTATUS 34582 1
> :debug:build Backtrace: command execution failed
> :debug:build     while executing
> :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
> :debug:build     invoked from within
> :debug:build "command_exec -callback
> portprogress::target_progress_callback build"
> :debug:build     (procedure "portbuild::build_main" line 10)
> :debug:build     invoked from within
> :debug:build "$procedure $targetname"
> }}}
>
> I'll attach the full build log, if it fits within the size restrictions.

New description:

 MacPorts base version 2.10.5 installed,

 {{{
 py312-pydantic_core            2.19.0_0 < 2.19.0_0  (platform darwin 23 !=
 darwin 24)
 }}}

 fails to update with
 {{{
 :debug:build
 SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk'
 :debug:build SOURCE_DATE_EPOCH='1729841969'
 :info:build Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
 -m build --no-isolation --wheel --outdir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work
 :debug:build system:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
 -m build --no-isolation --wheel --outdir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work
 :info:build * Getting build dependencies for wheel...
 :info:build Traceback (most recent call last):
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/__main__.py", line 178, in _handle_build_error
 :info:build     yield
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/__main__.py", line 429, in main
 :info:build     built = build_call(
 :info:build             ^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/__main__.py", line 238, in build_package
 :info:build     out = _build(isolation, srcdir, outdir, distribution,
 config_settings, skip_dependency_check, installer)
 :info:build
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/__main__.py", line 172, in _build
 :info:build     return _build_in_current_env(srcdir, outdir, distribution,
 config_settings, skip_dependency_check)
 :info:build
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/__main__.py", line 151, in _build_in_current_env
 :info:build     missing = builder.check_dependencies(distribution,
 config_settings or {})
 :info:build
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/_builder.py", line 243, in check_dependencies
 :info:build     return {u for d in dependencies for u in
 check_dependency(d)}
 :info:build
 ^^^^^^^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/build/_util.py", line 53, in check_dependency
 :info:build     if req.specifier and not
 req.specifier.contains(dist.version, prereleases=True):
 :info:build
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/packaging/specifiers.py", line 917, in contains
 :info:build     item = Version(item)
 :info:build            ^^^^^^^^^^^^^
 :info:build   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12
 /site-packages/packaging/version.py", line 200, in __init__
 :info:build     match = self._regex.search(version)
 :info:build             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 :info:build TypeError: expected string or bytes-like object, got
 'NoneType'
 :info:build ERROR expected string or bytes-like object, got 'NoneType'
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work/pydantic_core-2.19.0" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
 -m build --no-isolation --wheel --outdir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 pydantic_core/py312-pydantic_core/work
 :info:build Exit code: 1
 :error:build Failed to build py312-pydantic_core: command execution failed
 :debug:build Error code: CHILDSTATUS 34582 1
 :debug:build Backtrace: command execution failed
 :debug:build     while executing
 :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
 :debug:build     invoked from within
 :debug:build "command_exec -callback
 portprogress::target_progress_callback build"
 :debug:build     (procedure "portbuild::build_main" line 10)
 :debug:build     invoked from within
 :debug:build "$procedure $targetname"
 }}}

 I'll attach the full build log, if it fits within the size restrictions.

--

Comment (by ryandesign):

 You've also filed #71513 for the same error in another port. The problem
 is likely specific to your computer. See #71290 for ideas on solving it.

-- 
Ticket URL: <https://trac.macports.org/ticket/71401#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list