a digest of python maillist


我相信不仅仅是文档的问题,python语言本身的简明设计才是 决定性的,这也影响了大部分python程序员的风格。
相比之下, perl简而不明,java明而不简,至于c++……只能说既不简又不明了。

On 7/21/06, Xiao Lei Wu < xiaoleiw@cn.ibm.com> wrote:
>
>
>
- Hide quoted text -
> ----------
>  IMO, the best thing about Python is its language reference manual.  It is
>  about 90 pages long.  After you read it, you believe that the language is
>  fully defined,.  The closest thing to a Perl reference is "Programming
>  Perl", which is about 1000 pages.  After you read that you have no idea
>  whether what you read fully defines a language.
>  ----------
>  我没读过"Programming Perl"这本书,如果真如他所说的那样,我想这个作者应该去上
>  PS:现在的manual应该不只90页了,不过也不会大太多
>


_______________________________________________
python-chinese
Post: send python-chinese@lists.python.cn
Subscribe: send subscribe to python-chinese-request@lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-request@lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese 

 


 

C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test>python run.py 2025-11-01 23:26:35,185 - INFO - 开始运行测试.... 2025-11-01 23:26:35,187 - INFO - 使用环境配置:test 2025-11-01 23:26:35,187 - INFO - 基础url:http://127.0.0.1:5000 2025-11-01 23:26:35,187 - INFO - 日志路径: ./logs/test.log 2025-11-01 23:26:35,190 - INFO - 开始执行测试.. 开始运行测试 使用环境配置:test 基础url:http://127.0.0.1:5000 日志路径: ./logs/test.log 已创建报告目录 ============================= test session starts ============================= platform win32 -- Python 3.13.0, pytest-7.4.3, pluggy-1.6.0 -- C:\Users\Admin\AppData\Local\Programs\Python\Python313\python.exe cachedir: .pytest_cache metadata: {'Python': '3.13.0', 'Platform': 'Windows-11-10.0.26100-SP0', 'Packages': {'pytest': '7.4.3', 'pluggy': '1.6.0'}, 'Plugins': {'allure-pytest': '2.13.2', 'Faker': '37.5.3', 'html': '4.1.1', 'metadata': '3.1.1'}, 'CI': 'true', 'BUILD_NUMBER': '82', 'BUILD_ID': '82', 'BUILD_URL': 'http://localhost:8080/job/auto-api-test/82/', 'NODE_NAME': 'built-in', 'JOB_NAME': 'auto-api-test', 'BUILD_TAG': 'jenkins-auto-api-test-82', 'EXECUTOR_NUMBER': '0', 'JENKINS_URL': 'http://localhost:8080/', 'JAVA_HOME': 'C:\\Program Files\\Java\\jdk-21', 'WORKSPACE': 'C:\\ProgramData\\Jenkins\\.jenkins\\workspace\\auto-api-test', 'GIT_COMMIT': '7cdab6ad7e5dc35917f742387810251caa778788', 'GIT_URL': 'https://gitee.com/weike1234/api_auto_test.git', 'GIT_BRANCH': 'origin/master'} rootdir: C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test plugins: allure-pytest-2.13.2, Faker-37.5.3, html-4.1.1, metadata-3.1.1 collecting ... collected 2 items testcases/test_user_api.py::TestUserAPI::test_login[case0] PASSED [ 50%] testcases/test_user_api.py::TestUserAPI::test_login[case1] PASSED [100%]2025-11-01 23:26:35,548 - INFO - 测试执行完成,退出码0 2025-11-01 23:26:35,548 - INFO - 已生成环境配置 2025-11-01 23:26:35,548 - INFO - 测试执行器退出,退出码:None ============================== 2 passed in 0.11s ============================== 测试执行完成,退出码0 C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test>exit 0 [auto-api-test] $ C:\ProgramData\Jenkins\.jenkins\allure-2.35.1\bin\allure.bat generate C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test\reports\allure-results -c -o C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test\allure-report Report successfully generated to C:\ProgramData\Jenkins\.jenkins\workspace\auto-api-test\allure-report Allure report was successfully generated. Creating artifact for the build. Artifact was added to the build. Checking for post-build Performing post-build step Checking if email needs to be generated Email was triggered for: Always Sending email for trigger: Always Sending mail from default account using custom from address 1943564708@qq.com messageContentType = text/html; charset=UTF-8 Adding recipients from project recipient list Analyzing: 1943564708@qq.com Looking for: 1943564708@qq.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: 1943564708@qq.com => found type: 0 Analyzing: 1943564708@qq.com Looking for: 1943564708@qq.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: 1943564708@qq.com => found type: 0 Analyzing: 1943564708@qq.com Looking for: 1943564708@qq.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: 1943564708@qq.com => found type: 0 Adding recipients from trigger recipient list Successfully created MimeMessage Sending email to: 1943564708@qq.com DEBUG: getProvider() returning jakarta.mail.Provider[TRANSPORT,smtp,org.eclipse.angus.mail.smtp.SMTPTransport,Oracle] DEBUG SMTP: need username and password for authentication DEBUG SMTP: protocolConnect returning false, host=smtp.qq.com, user=我的4060TI$, password=<null> DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.qq.com", port 465, isSSL false 220 newxmesmtplogicsvrszb20-0.qq.com XMail Esmtp QQ Mail Server. DEBUG SMTP: connected to host "smtp.qq.com", port: 465 EHLO host.docker.internal 250-newxmesmtplogicsvrszb20-0.qq.com 250-PIPELINING 250-SIZE 73400320 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250-AUTH=LOGIN 250-MAILCOMPRESS 250-SMTPUTF8 250 8BITMIME DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "SIZE", arg "73400320" DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH XOAUTH2" DEBUG SMTP: Found extension "AUTH=LOGIN", arg "" DEBUG SMTP: Found extension "MAILCOMPRESS", arg "" DEBUG SMTP: Found extension "SMTPUTF8", arg "" DEBUG SMTP: Found extension "8BITMIME", arg "" DEBUG SMTP: protocolConnect login, host=smtp.qq.com, user=weike1234, password=<non-null> DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 DEBUG SMTP: Using mechanism LOGIN DEBUG SMTP: AUTH LOGIN command trace suppressed DEBUG SMTP: AUTH LOGIN failed AuthenticationFailedException message: 535 Login fail. Account is abnormal, service is not open, password is incorrect, login frequency limited, or system is busy. More information at https://help.mail.qq.com/detail/108/1023 这是什么问题
11-02
从你的 Jenkins 构建日志和邮件发送失败的错误信息来看: ``` DEBUG SMTP: AUTH LOGIN failed AuthenticationFailedException message: 535 Login fail. Account is abnormal, service is not open, password is incorrect, login frequency limited, or system is busy. More information at https://help.mail.qq.com/detail/108/1023 ``` 这是 **QQ 邮箱 SMTP 认证失败的典型错误**,说明 Jenkins 使用 QQ 邮箱发送邮件时,**登录失败**。 --- ### 🚫 常见原因分析 #### 1. **密码错误(最常见的原因)** - Jenkins 配置的 QQ 邮箱密码错误; - 注意:QQ 邮箱的 SMTP 登录密码不是你的 QQ 登录密码,而是 **SMTP 授权码**。 ✅ 解决方法: - 登录 [QQ 邮箱网页版](https://mail.qq.com/); - 点击右上角 ⚙️ 设置 > 查看“账户设置”; - 找到 **“POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务”**; - 启用 **“IMAP/SMTP服务”**; - 点击“生成授权码”,复制后粘贴到 Jenkins 邮件配置中作为密码。 --- #### 2. **未开启 SMTP 服务** - QQ 邮箱默认关闭 SMTP 服务。 ✅ 解决方法: - 登录 QQ 邮箱; - 设置中开启 **“IMAP/SMTP服务”**; - 获取并使用授权码登录。 --- #### 3. **授权码格式错误或包含空格** - Jenkins 中输入的授权码可能有误,比如: - 多打了空格; - 使用了中文字符; - 被自动填充了其他内容。 ✅ 解决方法: - 重新生成授权码; - 粘贴时确保没有多余字符; - 在 Jenkins 的 SMTP 配置中确认密码字段是否正确。 --- #### 4. **QQ 邮箱账户异常或被限制** - 账户可能被限制登录; - 或者 QQ 邮箱账户未完成安全验证; - 或者频繁登录导致被限流。 ✅ 解决方法: - 换个时间再试; - 使用其他邮箱测试(如 163、Gmail); - 完成 QQ 邮箱安全验证; - 检查邮箱是否被冻结或限制。 --- #### 5. **Jenkins 邮件配置中用户名或邮箱格式不正确** - Jenkins 中填写的用户名应为你的 **QQ 邮箱地址**(如 `your@qq.com`); - 不要填写 QQ 号或错误格式。 ✅ 正确配置示例: - SMTP server: `smtp.qq.com` - User: `your@qq.com` - Password: `你的 SMTP 授权码` - Port: `465`(SSL)或 `587`(TLS) --- ### ✅ 推荐操作步骤 1. **登录 QQ 邮箱网页版,开启 IMAP/SMTP 服务;** 2. **生成新的 SMTP 授权码;** 3. **在 Jenkins 的 Email 配置中更新授权码;** 4. **点击 Jenkins 的 **Test configuration by sending test email** 发送测试邮件;** 5. **查看 Jenkins 邮件日志是否显示成功。** --- ### ✅ Jenkins 邮件配置位置 - `Manage Jenkins > Configure System` - 找到 **Email Notification** 区域 - 修改 SMTP server、User、Password --- ### ✅ QQ 邮箱 SMTP 配置参考 | 配置项 | 值 | |--------|----| | SMTP Server | `smtp.qq.com` | | SMTP Port | `465`(SSL)或 `587`(TLS) | | Use SSL | ✅ 勾选 | | SMTP 用户名 | `your@qq.com` | | SMTP 密码 | `你的 SMTP 授权码` | | 默认发件人 | `your@qq.com` | --- ### ✅ Jenkins 邮件发送测试命令(命令行测试) 你可以使用 `swaks` 工具手动测试 SMTP 配置是否正常: ```bash swaks --to 1943564708@qq.com --from your@qq.com --server smtp.qq.com:465 --auth-user your@qq.com --auth-password your_authorization_code --tls ``` --- ### ✅ 总结 | 问题 | 原因 | 解决方案 | |------|------|----------| | Jenkins 邮件发送失败 | SMTP 登录失败 | 使用 QQ 邮箱授权码 | | QQ 邮箱无法登录 | 未开启 SMTP 服务 | 登录 QQ 邮箱开启服务 | | 授权码错误 | 粘贴错误或过期 | 重新生成并正确粘贴 | | Jenkins 邮件配置错误 | 用户名或密码错误 | 检查 SMTP 用户名和密码 | ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值