Python 3 syntax errors #61332

Closed
opened 2019-02-08 17:28:34 +01:00 by Chris Clauss · 9 comments

System Information
Operating system: ALL
Graphics card: ALL

Blender Version
Broken: GIT MASTER
(example: 2.79b release)
(example: 2.80, edbf15d3c0, blender2.8, 2018-11-28, as found on the splash screen)
Worked: (optional)

Short description of error

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./build_files/package_spec/build_archive.py:32:17: E999 SyntaxError: invalid syntax
except Exception, ex:
                ^
./source/blender/python/simple_enum_gen.py:42:38: E999 SyntaxError: invalid syntax
print '\tmod = PyModule_New("dummy");'
                                     ^
**System Information** Operating system: ALL Graphics card: ALL **Blender Version** Broken: GIT MASTER (example: 2.79b release) (example: 2.80, edbf15d3c044, blender2.8, 2018-11-28, as found on the splash screen) Worked: (optional) **Short description of error** **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). $ **flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics** ``` ./build_files/package_spec/build_archive.py:32:17: E999 SyntaxError: invalid syntax except Exception, ex: ^ ./source/blender/python/simple_enum_gen.py:42:38: E999 SyntaxError: invalid syntax print '\tmod = PyModule_New("dummy");' ^ ```
Author

Added subscriber: @ccc-4

Added subscriber: @ccc-4
Author

Legacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3.

Old style exceptions are syntax errors in Python 3 but new style exceptions work as expected in both Python 2 and Python 3.

https:*github.com/sobotka/blender/pull/3 and https:*github.com/sobotka/blender/pull/4 contain the required fixes.

I tried to follow the instructions at https://wiki.blender.org/wiki/Tools/Git to submit a pull request but they do not work because they assume write access to the repo. The Commit Access section should really be rewritten because the developers that have write access to the repo probably do not need instructions. First-time contributors who do not have write access and can not succeed at making a pull request will probably go work on other projects.

Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3. Old style exceptions are syntax errors in Python 3 but new style exceptions work as expected in both Python 2 and Python 3. https:*github.com/sobotka/blender/pull/3 and https:*github.com/sobotka/blender/pull/4 contain the required fixes. I tried to follow the instructions at https://wiki.blender.org/wiki/Tools/Git to submit a pull request but they do not work because they assume **write access** to the repo. The **Commit Access** section should really be rewritten because the developers that have write access to the repo probably do not need instructions. First-time contributors who do not have write access and can not succeed at making a pull request will probably go work on other projects.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Jacques Lucke self-assigned this 2019-02-08 17:58:04 +01:00
Member

There is a "Submit Code" button on the https://developer.blender.org/ front page.

You can upload your diff here: https://developer.blender.org/differential/diff/create/

There is a "Submit Code" button on the https://developer.blender.org/ front page. You can upload your diff here: https://developer.blender.org/differential/diff/create/
Author

What exactly was archived in this case? The whole repo? These two files? The syntax errors? Or just the bug report itself? https://developer.blender.org/D4326

What exactly was *archived* in this case? The whole repo? These two files? The syntax errors? Or just the bug report itself? https://developer.blender.org/D4326
Member

It just means that this report ist closed. Nothing else. Thanks for the patch. Will take a closer look at it on monday.

It just means that this report ist closed. Nothing else. Thanks for the patch. Will take a closer look at it on monday.

This issue was referenced by 7262ac6202

This issue was referenced by 7262ac6202eb9258293473f35a24f375f9d6f635

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#61332
No description provided.