-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Squashed commit of python_pr3 #4841
base: master
Are you sure you want to change the base?
Conversation
Really nice, hope this gets merged! |
Man this really needs to be merged. It is painful to keep up with changes while still enabling Python. Thank you for the hard work. |
Also, i just noticed when going through the changes, but when squashing you can use Personally i don't really care about having attribution, but it's good practice so i thought i'd mention it ;) |
Hi Matthieu
Yes of course, It's very true that you have contributed quite a lot to my
fork, especially with the editor and operators and the nice walk-through
tutorial.
When doing the squash the intent was not to remove your name but to remove
very old commits which do not actually belong the the project.
On my 1st trial to git rebase my branch to a correct master I spend over 2
hours for nothing. There were lots of conflicts on each new hash, which was
absolutely no fun. So I decided so squash instead ...
If you want to have this fixed, we can schedule for a screen sharing
session to fix it. personally i dont have too much of these abilities.
and again, sorry. Your effort is very well appreciated!
…On Mon, Nov 27, 2023 at 3:23 PM Matthieu LAURENT ***@***.***> wrote:
Also, i just noticed when going through the changes, but when squashing
you can use Co-authored-by:
<https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors>
in your commit message to mention all authors that worked on something.
Personally i don't really care about having attribution, but it's good
practice so i thought i'd mention it ;)
—
Reply to this email directly, view it on GitHub
<#4841 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MX6DNQAMKIGPUAHFPDYGSO73AVCNFSM6AAAAAA7UKWFIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXHEZTGOBXGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Don't worry about it too much ^^ |
Co-authored-by: Matthieu LAURENT <matthieu.laurent69@proton.me>
1c54973
to
a35149f
Compare
…' into python-pr3-squashed
separate python dependency from main target
…' into python-pr3-squashed
1)
we can change
2)
can be fixed
3)
it works here, you were too fast changing all NULL will nullptr :)
4)
python heavily used the INCREF and DECREF reference counter. not sure if
the ref counters are 100% perfectly used,
…On Fri, Dec 1, 2023 at 12:45 PM pca006132 ***@***.***> wrote:
1. Minimal supported python version should be Python 3.10, as Python
3.9 contains node.h that will conflict with src/core/node.h. We can
either write this as requirement or resolve this by changing every #include
"node.h" to #include "src/core/node.h".
2. Backup file still has .scad suffix.
3. For some reason I cannot get the GUI to work:
image.png (view on web)
<https://github.com/openscad/openscad/assets/12198657/db8e6ed0-811d-4140-9810-1b560676efed>
4. For slightly more complicated example (from the openscad-python
website), I got segfault with the GUI (but it works fine in CLI):
def foot(x,y):
c=cube([1,1,10])
return translate(c,[x,y,0])
def plate():
return cube([11,11,1])
parts=[]parts.append(translate(plate(),[0,0,10]))
for y in [0,10]:
for x in [0,10]:
parts.append(foot(x,y))
output(parts)
#0 0x00007ffff658e1b2 in t_primary_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#1 0x00007ffff658e328 in t_primary_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#2 0x00007ffff6593c7f in single_subscript_attribute_target_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#3 0x00007ffff6594db8 in simple_stmt_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#4 0x00007ffff65976b3 in simple_stmts_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#5 0x00007ffff659bf2a in statements_rule ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#6 0x00007ffff659ef22 in _PyPegen_parse ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#7 0x00007ffff633bfa2 in _PyPegen_run_parser ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#8 0x00007ffff633c36c in _PyParser_ASTFromString ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#9 0x00007ffff6577dfe in PyRun_SimpleStringFlags ()
from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
#10 0x0000000000dbce78 in evaluatePython (
code="def foot(x,y):\r\n\tc=cube([1,1,10])\r\n\treturn translate(c,[x,y,0])\r\n\r\ndef plate():\r\n\treturn cube([11,11,1])\r\n\r\nparts=[]\r\nparts.append(translate(plate(),[0,0,10]))\r\n\r\nfor y in [0,10]:\r\n\tfor x in [0,10]:\r\n"..., assignments=std::vector of length 2, capacity 2 = {...})
at /home/pca006132/code/openscad/src/python/pyopenscad.cc:528
#11 0x0000000000cfdfc8 in MainWindow::parseTopLevelDocument (this=0x4f2658a8c00)
at /home/pca006132/code/openscad/src/gui/MainWindow.cc:1992
#12 0x0000000000d81cf2 in TabManager::openTabFile ***@***.***=0x4f26d6b5880, filename=...)
at /home/pca006132/code/openscad/src/gui/TabManager.cc:504
Not sure if 3 and 4 are due to my rather unusual setup... Don't think they
should block the merge if it works for others, I can find some time to
debug that issue.
—
Reply to this email directly, view it on GitHub
<#4841 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MUK6MYBKSVBLNDN6M3YHG7NRAVCNFSM6AAAAAA7UKWFIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVHE4DMMBXGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For 3 and 4, I tried the old commit (before my changes) and it is the same. |
@@ -45,7 +46,7 @@ bool pythonRuntimeInitialized = false; | |||
|
|||
void PyOpenSCADObject_dealloc(PyOpenSCADObject *self) | |||
{ | |||
Py_XDECREF(self->dict); | |||
// Py_XDECREF(self->dict); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this cause memory leak?
Probably this can be activated again,
But the two others in PyOpenSCADObjectToNodeMuli probably not
because the object is probably used after it got freed too early.
I have a hard time to get the reference counter correctly set and someone
with lot of experience should review it closely.
…On Fri, Dec 1, 2023 at 3:57 PM pca006132 ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/python/pyopenscad.cc
<#4841 (comment)>:
> @@ -45,7 +46,7 @@ bool pythonRuntimeInitialized = false;
void PyOpenSCADObject_dealloc(PyOpenSCADObject *self)
{
- Py_XDECREF(self->dict);
+// Py_XDECREF(self->dict);
will this cause memory leak?
—
Reply to this email directly, view it on GitHub
<#4841 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MX7I2L2QMD27UE2MDTYHHV55AVCNFSM6AAAAAA7UKWFIGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONJZHE4DKMJWGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
yes it works now. |
Squashed commit of all my changes