profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/fabiomcosta/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Fabio M. Costa fabiomcosta @godaddy Newark, California https://fb.me/fabs Working at the Website Builder at GoDaddy, previously Facebook

clarete/forbiddenfruit 592

Patch built-in python objects

andrewsmedina/magic2d 18

a framework for building 2D games using html5 canvas and javascript

fabiomcosta/dotfiles 8

my dotfiles :)

cezarsa/crxpp 7

Chrome pixel perfect - An extension to compare a page with its original design.

fabiomcosta/constructuring 5

Transforms Javascript code that uses ES6's destructuring feature into code that runs on today's browsers.

fabiomcosta/arquiteturas_aplicacoes_web 3

Codigo e apresentacao para arquiteturas de aplicacoes web

fabiomcosta/bridgejs 2

Plug & play JavaScript-framework adapter, code like PrototypeJS with any framework.

fabiomcosta/crick 2

Real event simulator for browsers

fabiomcosta/art 1

vector drawing for buttons, icons, widgets and all that stuff

fabiomcosta/backbone 1

Give your JS App some Backbone with Models, Views, Collections, and Events

release hotwired/turbo

v7.0.0-beta.7

released time in 5 minutes

startedoutline/outline

started time in 9 hours

startedtorchbox/buckup

started time in 11 hours

startedtibdex/auto-update

started time in 12 hours

started99designs/aws-vault

started time in 14 hours

startedhashicorp/terraform-cdk

started time in 14 hours

startedjotego/jtframe

started time in 15 hours

release dogsheep/dogsheep-beta

0.10.2

released time in 18 hours

startedMayaPosch/NymphCast

started time in a day

created repositoryungap/is-connected

An `Element.prototype.isConnected` polyfill.

created time in a day

startedWSWhitehouse/Unity-Tag-Selector

started time in a day

release simonw/yaml-to-sqlite

1.0

released time in a day

issue openedclarete/forbiddenfruit

Crash on Windows if dunder methods cursed into `ctypes.c_int` raises an exception

In addition to #56, if the dunder method is cursed into ctypes' integer types, an raised exception caused Python to crash on Windows.

Proof of concept:

#!/usr/bin/env python3

from ctypes import c_int
from forbiddenfruit import curse

def c_int_add(self: c_int, other: int) -> c_int:
    raise TypeError('This exception should be caught')

curse(c_int, '__add__', c_int_add)

try:
    print(c_int(1) + 1) # TypeError (correct) then crash on Windows (wrong)
except TypeError:
    print('TypeError caught')

print('If this gets printed then nothing has crashed')

Test result on Windows (version 10.0.19043.1052, Python 3.8.6, both 64-bit):

(venv) C:\dev\test> python bug2.py 
Exception ignored on calling ctypes callback function: <function c_int_add at 0x000001E12AC1FDC0>
Traceback (most recent call last):
  File "E:\src\pytrickz\venv\lib\site-packages\forbiddenfruit\__init__.py", line 328, in wrapper
    return func(*args, **kwargs)
  File "bug2.py", line 7, in c_int_add
    raise TypeError('This exception should be caught')
TypeError: This exception should be caught

(venv) C:\dev\test> echo %=ExitCode%
C0000005

(venv) C:\dev\test> 

created time in a day

issue openedclarete/forbiddenfruit

Exceptions raised in cursed-in dunder methods are not raised to calling code

Proof of concept:

#!/usr/bin/env python3

from forbiddenfruit import curse

class foo(object):
    def __init__(self): pass

def foo_add(self: foo, other: int) -> foo:
    raise TypeError('This exception should be caught')

curse(foo, '__add__', foo_add)

try:
    print(foo() + 1) # <class '__main__.foo'> (on Windows), __main__ (on Linux)
except TypeError:
    print('AttributeError caught') # Not caught (wrong)

Test result:

(venv) C:\dev\test> python bug.py  
Exception ignored on calling ctypes callback function: <function foo_add at 0x0000026EC623FEE0>
Traceback (most recent call last):
  File "E:\src\pytrickz\venv\lib\site-packages\forbiddenfruit\__init__.py", line 328, in wrapper
    return func(*args, **kwargs)
  File "bug.py", line 13, in foo_add
    raise TypeError('This exception should be caught')
TypeError: This exception should be caught
<class '__main__.foo'>

(venv) C:\dev\test> 

The exception is printed to the screen (presumably by ctypes?) but not raised, except TypeError not triggered, print() receives a garbage result that depends on Python version and class structure (for example, if I remove foo.__init__ from code the result becomes None on Windows).

created time in a day

release simonw/markdown-to-sqlite

1.0

released time in a day

release simonw/sqlite-utils

3.9.1

released time in a day

startedawslabs/aws-lc

started time in a day

startedgcanti/fp-ts-local-storage

started time in 2 days

startedrxhanson/Rectangle

started time in 2 days

release hotwired/turbo

v7.0.0-beta.6

released time in 2 days

startedGetPublii/Publii

started time in 2 days

created repositorykentaromiura/mttools

My typesafe tools

created time in 2 days

release simonw/sqlite-utils

3.9

released time in 2 days

release simonw/sqlite-utils

3.9

released time in 2 days

startedkingoflolz/mesh-transformer-jax

started time in 2 days

release simonw/db-to-sqlite

1.4

released time in 2 days

fork simonw/docs-1

The open-source repo for docs.github.com

https://docs.github.com

fork in 2 days

created repositorynpm/ui

user interface layer for the npm CLI

created time in 3 days

MemberEvent

created repositoryLiferayCloud/hackathon-y

created time in 3 days