Python 3.13.2 修改日志

原文地址:https://docs.python.org/3/whatsnew/changelog.html#python-3-13-2-final

Python 3.13.2 正式版

发布日期:2025-02-04

macOS

  • [gh-127592]:当最低 macOS 版本早于 10.12 时,禁用了统一 Apple System Log API 的使用。

Windows

  • [gh-127353]:允许通过环境变量在 Windows 上强制启用彩色输出。Andrey Efremov 提交补丁。

工具/演示

  • [gh-129248]:iOS 测试运行器现在会去除测试套件输出日志前缀。
  • [gh-128152]:修复了 Argument Clinic 的 C 预处理器解析器试图解析 C 注释内部预处理指令的 bug。Erlend Aasland 提交补丁。

测试

  • [gh-127906]:在 test_cppext 中测试有限制的 C API。Victor Stinner 提交补丁。
  • [gh-127637]:为 [dis] 命令行界面增加了测试。Bénédikt Tran 提交补丁。
  • [gh-1269
我运行完app.py然后在algorithmselection中上传报出以下错误:127.0.0.1 - - [21/Jun/2025 19:31:25] "POST /upload HTTP/1.1" 500 - Traceback (most recent call last): File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 1536, in __call__ return self.wsgi_app(environ, start_response) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 1514, in wsgi_app response = self.handle_exception(e) File "D:\python3.13.2\Lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) ~^^^^^^^^^^^^^^^^^ File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 1511, in wsgi_app response = self.full_dispatch_request() File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 919, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\python3.13.2\Lib\site-packages\flask_cors\extension.py", line 176, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) ~^^^^^^^^^^^^^^^^^ File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 917, in full_dispatch_request rv = self.dispatch_request() File "D:\python3.13.2\Lib\site-packages\flask\app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "d:\Users\Administrator\Desktop\project\gas_sensor_app\app.py", line 130, in upload_files if not preprocess_data(): ~~~~~~~~~~~~~~~^^ File "d:\Users\Administrator\Desktop\project\gas_sensor_app\app.py", line 87, in preprocess_data sensor_columns = [col for col in dataset.columns if col.startswith('sensor')] ^^^^^^^^^^^^^^ AttributeError: 'int' object has no attribute 'startswith'
06-22
我的代码如下 import numpy as np import cvxpy as cp n = int(input()) adjacent = np.array([list(map(float, input().split(&#39;,&#39;))) for _ in range(n)]) number = np.array([list(map(float, input().split(&#39;,&#39;)))]) neighborhoods = cp.Variable((n, 1), &#39;neighborhoods&#39;, integer=True) adjacent_neighborhoods = cp.Variable((1, n), &#39;adjacent_neighborhoods&#39;, integer=True) proxy_points = cp.multiply(cp.multiply(adjacent, neighborhoods), adjacent_neighborhoods) objective = cp.Maximize(cp.sum(cp.multiply(number, proxy_points)) + cp.sum(cp.multiply(number.T, proxy_points))) constraints = [ 0 <= neighborhoods, neighborhoods <= 1, 0 <= adjacent_neighborhoods, adjacent_neighborhoods <= 1, cp.sum(neighborhoods) == 2, cp.sum(adjacent_neighborhoods) >= 1, cp.sum(adjacent_neighborhoods) <= 2, cp.sum(proxy_points) == 2 ] problem = cp.Problem(objective, constraints) problem.solve(solver=&#39;ECOS&#39;) print(int(round(objective.value))) 我的报错日志如下 "D:\develop\Python\Python 3.13.2\python.exe" D:\develop\Python\PythonProject\PythonLearning.py 7 0,1,1,0,0,0,0 0,0,1,1,1,0,0 0,0,0,1,0,0,0 0,0,0,0,1,1,1 0,0,0,0,0,1,0 0,0,0,0,0,0,1 0,0,0,0,0,0,0 34, 29, 42, 21, 56, 18, 71 Traceback (most recent call last): File "D:\develop\Python\PythonProject\PythonLearning.py", line 24, in <module> problem.solve(solver=&#39;ECOS&#39;) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^ File "D:\develop\Python\Python 3.13.2\Lib\site-packages\cvxpy\problems\problem.py", line 600, in solve return solve_func(self, *args, **kwargs) File "D:\develop\Python\Python 3.13.2\Lib\site-packages\cvxpy\problems\problem.py", line 1170, in _solve data, solving_chain, inverse_data = self.get_problem_data( ~~~~~~~~~~~~~~~~~~~~~^ solver, gp, enforce_dpp, ignore_dpp, verbose, canon_backend, kwargs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "D:\develop\Python\Python 3.13.2\Lib\site-packages\cvxpy\problems\problem.py", line 743, in get_problem_data solving_chain = self._construct_chain( solver=solver, gp=gp, ...<2 lines>... canon_backend=canon_backend, solver_opts=solver_opts) File "D:\develop\Python\Python 3.13.2\Lib\site-packages\cvxpy\problems\problem.py", line 992, in _construct_chain candidate_solvers = self._find_candidate_solvers(solver=solver, gp=gp) File "D:\develop\Python\Python 3.13.2\Lib\site-packages\cvxpy\problems\problem.py", line 908, in _find_candidate_solvers raise error.SolverError( ...<3 lines>... candidates[&#39;conic_solvers&#39;])) cvxpy.error.SolverError: Problem is mixed-integer, but candidate QP/Conic solvers ([]) are not MIP-capable. 进程已结束,退出代码为 1 请你指出我的代码中的问题所在。
03-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

csdddn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值