« first day (3206 days earlier)      last day (1758 days later) » 
00:00 - 18:0018:00 - 21:00

12:39 AM
hi
did something happen o_o;;;;
 
 
1 hour later…
1:56 AM
@AndrasDeak Which airline? Not KLM surely?
...should be expanded to include case where the input object was from a (possibly failed) dict lookup.
 
2:30 AM
cabbage
 
hey guys, is there a better way of doing something like this with list slicing (or numpy masking of some kind):
a[1:100:5]+a[2:100:5]+a[3:100:5] (select 3 of every 5 elements for 100 items)
i feel like im forgetting something really basic
 
Thanks @YvetteColomb, or as we say here, melon very much!
 
user3956566
:)
 
I later end up having to reshape that anyways to put the elements back next to each other
 
2:55 AM
What happened to @coldspeed, he was a feature of the room last year, but since the mod elections, I've hardly seen him.
 
3:37 AM
last I heard, he is taking a break from this room
 
3:48 AM
there a way to create a file object dynamically with raw data, like .update() it?
 
cbg
 
4:03 AM
@EdoEdo I don't understand what you mean. Could you show a short example demonstrating what you want to do?
 
4:14 AM
@YvetteColomb thanks, I missed all of that, being stranded at an airport. It would have stopped way earlier otherwise.
 
i guess i should rephrase it, there a way i can POST binary data in requests purely from memory?
i thought if i put it in a file like object session.post(url,files={'lala':file like object})
 
@ReblochonMasque On his profile he said he is taking a break in python chat room, and says to find him in SOCVR
 
obviously the file size is unknown
 
@ReblochonMasque Ugh he deleted that from his profile
 
my workaround is creating a file, and writing data to it, and then POSTing that file
but if its in memory, i can delete the uploaded data in real time
you might ask yoursel fwhere is the data coming from? well not the HDD.... lol
someting liek that... nm
 
user3956566
4:23 AM
@AndrasDeak that's fine. I'm acutely aware I'm in a well moderated chat room, so didn't want to step on toes. :)
 
why would u stand for 4.5 hours though
i guess that's not what u meant
 
@YvetteColomb thank you, we appreciate that :)
 
user6568562
cbg everyone
 
user6568562
@AndrasDeak Yish, that's the opposite of fun times;
 
@EdoEdo io.BytesIO should do it
 
4:29 AM
in 2.7 the read method is called read1??
 
No
 
i guess requests just knows what to do with it... and file size doesnt have to be known... thanks
class io.BytesIO([initial_bytes])
A stream implementation using an in-memory bytes buffer. It inherits BufferedIOBase.

The optional argument initial_bytes is a bytes object that contains initial data.

BytesIO provides or overrides these methods in addition to those from BufferedIOBase and IOBase:

getvalue()
Return bytes containing the entire contents of the buffer.

read1()
In BytesIO, this is the same as read().
 
I hope I don't need to explain the difference between "A is the same as B" and "B is called A around here"
 
alright sorry, thanks
 
recbg
 
4:48 AM
@randomhopeful thanks, I would agree ;)
@EdoEdo I queued for 4.5 hours at the transfer desk
@smci no, Swiss
@wim I hate slack threads
 
5:51 AM
Thanks @U10-Forward & @DeveshKumarSingh
 
@AndrasDeak I'm doing a happy dance for this :)
 
cbg
 
Dang it - I saw Y's post and got pulled back into the Meta discussion cause I thought it was about that
I need to learn to keep my head down
Actually the random seeding is a big thing for me with Numpy (I use different seeding based on the level of confidence I need and for different calculations based on precision/accuracy in my early calculations so that's helpful too)
@AndrasDeak fyi, I also hope you got home okay and get to tuck in all nice and cozy tonight (cheers and gn)
 
Thanks. Waiting for my flight to Vienna...
Rhubarb, JG
 
6:48 AM
Could someone please tell me if they can connect to this server?
ftp://ssd.jpl.nasa.gov/pub/eph/planets/bsp/de421.bsp
 
@ReblochonMasque yup. Just #chinathings
 
ok, I can't from here, and it seems they don't deliver through vpn.
thanks @AndrasDeak
What are my options?
I can download a 2008 version from here: naif.jpl.nasa.gov/pub/naif/JUNO/kernels/spk
class DeprecatedPlanet(object): I am shocked @BrandonRhodes
getting worse: class DeprecatedEarth(DeprecatedPlanet)
 
7:07 AM
I am trying to print the ASCII Bell (BEL) character, represented by \a
>>> print('\a')

>>> print('\u2407')
␇
Why done putting the escape character not print it, but putting the unicode code-point prints it?
 
because those are two different characters
>>> '\a' == '\u2407'
False
 
okay I found this on the wiki page: en.wikipedia.org/wiki/Bell_character
In ASCII and Unicode the character with the value 7 is BEL. It can be referred to as control-G or ^G in caret notation. Unicode also includes a character for the visual representation of the bell code, "symbol for bell" (␇) at U+2407.
so you cannot print control characters visually, but using a unicode code point you can?
 
No. Again, they're two different characters. Control characters are - per definition - not visible. You can print a different character in order to represent a control character.
 
Think of it as cognitive_repr(bell) ~ "symbol for bell"
 
yes I think I understand it better with the ASCII Backspace Character
 
7:19 AM
Bad analogy: The BEL character \a is the assembler instruction "copy the contents of register A into register B". The "symbol for bell" U+2407 is something you can use to represent this instruction, like mov A B.
 
In [25]: print("ab\bc")
ac
where backspace as a control character gets rid of the preceding character
 
vs. "Symbol for backspace"
 
yes now it make sense
In [37]: print('a\fb')
a
 b
output of linefeed character
 
7:45 AM
Downloaded the file, and fed it directly to `skyfield` parser - all set up and running.
Thanks again @AndrasDeak
 
 
1 hour later…
8:49 AM
Put 100 bounty on a question, get 10 upvotes after that, so half cost covered. Not bad. Django unique together
Plus the nice q badge.
Saturday cbg!
 
@ReblochonMasque no worries
 
9:42 AM
^ a bit confused about SO's definition of "black"
 
10:12 AM
Shad0w_wa1k3r
 
If I run this code below:
print(bin(4)[2:])
print(bin(14)[2:])
print(bin(2)[2:])

then I will get o/p like
100
1110
10


But, I want like
0100
1110
0010

i.e; all have the same number of bytes. Can anyone tell me how to do that?
 
zfill(4)
print(bin(4)[2:].zfill(4))
 
Ok, thanks :)
 
It feels good to actually be useful for once :)
 
10:24 AM
>>> format(2, '04b')
'0010'
 
10:52 AM
re-cbg
 
@AndrasDeak ...why?
 
It annoyed me very much
By the way I'm in Wien
 
11:08 AM
Oh, what's the occasion?
 
Cancelled plane yesterday :| got a replacement today with train from Wien to Budapest
So not much sightseeing :D
 
That's unfortunate :(
 
Yeah :( Very long two days... and still 3 hours away from home, plus commute :D
 
such pain hidden behind such a bright smiley :D
 
Hide the Pain Harold is Hungarian...
 
11:18 AM
He's pretty bad at it though. (Hiding the pain, not being hungarian)
 
I watched his TEDx talk, he's very Hungarian ;)
 
12:15 PM
Literal copy & paste of assignment, without any explanation or effort: stackoverflow.com/questions/57231965/…
@AndrasDeak Done
 
12:27 PM
Hi! Has anyone ever noticed that if we Ctrl + P a webpage n times all of its sha256 hashes are different, can anyone tell me why?
import os
import hashlib

def remove_duplicates(dir):
	unique = []
	for filename in os.listdir(dir):
		filename = dir + filename
		if os.path.isfile(filename):
			file_object = open(filename, 'rb')
			filehash = hashlib.sha256(file_object.read()).hexdigest()
			print(filename, filehash)
			if filehash not in unique:
				unique.append(filehash)

			else:
				os.remove(filename)

remove_duplicates('files_to_merge/')
I am using this script to remove duplicate files
Even if a page is static the hashes are different?
 
"Ctrl + P a webpage"?
I'd think the contents of the files must differ :P Timestamp or "page loaded in x seconds" for instance
You have to compare your files, you know...
 
1:37 PM
The docs of str.capitalize say that "Return a copy of the string with its first character capitalized and the rest lowercased." and the docs of "str.title" say that "Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase."
 
'an apple'.capitalize()
Out[6]: 'An apple'

'an apple'.title()
Out[7]: 'An Apple'
 
and when I try them I get
>>> '1foo 2bar'.capitalize()
'1foo 2bar'
>>> '1foo 2bar'.title()
'1Foo 2Bar'
which means that title picks the first alphabet and capitalizes it, but capitalize doesn't do that
 
why would you insert numbers into a string you're testing the results on :P that just hides the behaviour
 
The behaviour is different, title made the first alphabet encountered uppercase even after a leading digit, but capitalize didn't
and that is not exactly clear for me how it happens from the documentation
 
can you take a guess as to what happened really?
I can take a guess, though i don't know for sure yet either.
perhaps this example can help you guess better.
'1ab2cd3ef'.title()
Out[9]: '1Ab2Cd3Ef'
 
1:43 PM
"words" are basically the regex pattern [a-zA-Z]+...
 
is that the definition in python?
>>> import re
>>> re.findall('[a-zA-Z]+','1ab2cd3ef')
['ab', 'cd', 'ef']
you are correct, I always visualized words as the whitespace delimited sequence of characters in a string
 
So... .title() although I'm not sure how exactly it's implemented basically the same as: re.sub('[a-zA-Z]+', lambda m: m.group().capitalize(), s)...
 
"foo bar baz" where foo, bar and baz are words
yes, that idea makes sense, and I didn't know we can provide a function in re.sub
>>> re.sub('[a-zA-Z]+', lambda m: m.group().capitalize(), '1ab2cd3ef')
'1Ab2Cd3Ef'
 
For the use cases it's meant for... it wouldn't be quite so useful... eg: 'clements-smith'.title() - it's unlikely I'd want "smith" to be lower case there
 
yes, word boundaries can be anything which falls outside string.ascii_lowercase + string.ascii_uppercase' then by that logic?
 
1:50 PM
word boundaries can be anything... normally they're the start and end of a string, end of a string and anything that's considered "whitespace"... but what str.title()'s meant to be convenient for uses a different definition
 
anything? so even english alphabets like a, B etc? I didn't follow
 
@Devesh the docs have information about what's considered a word
 
The algorithm uses a simple language-independent definition of a word as groups of consecutive letters.
okay so the regex you told me follows from that logic
even the unicode definition seem similar to what the docs say
 
yep, cause to do anything more you'd have to start dealing with corpora and looking at each case using lexical analysis
which is fun but way over kill (typically one would do this if they wanted to build a feature for generating titles of articles "on the fly" - i.e. without human interaction)
like Google mail does if you turn that option on
 
@JGreenwell hey - how you been? :)
 
2:01 PM
Not bad, moving fully into academia this year and fully out of industry so its been a bit of a wild but fun experience :)
 
bit of a change, but sounds positive, so pleased to hear :)
 
yes makes sense, the language falls back to the much simpler definition and let the user handle the rest
Also If I understand correctly, str.casefold and str.lower behave the same for english alphabets
but not for alphabets in other languages?
 
yeah, granted coming back to SO after a year just in time for the new meltdown was also "fun"
.casefold is more aggressive
 
yeah that's the thing, what does being aggresive mean
The docs say: Casefolding is similar to lowercasing but more aggressive because it is intended to remove all case distinctions in a string.
but what are these case distinctions
 
but yes, if you do not have any unicode characters (non-english) then it would be the same
 
2:07 PM
yes ,from the docs example
>>> 'ß'.lower()
'ß'
>>> 'ß'.casefold()
'ss'
so it's consider lowercase in english but uppercase in german?
 
aggressive here means (basically) that the algorithm makes more checks against chars beyond an assumption of [a-zA-Z]
.lower just checks [A-Z]
 
okay and the unicode standard is responsible for defining these case translations (upper, lower, title etc)?
 
if you want the full definition of the algorithm they used the Unicode standard ..... I think I still have a copy of that
Yeah - page 155 is where it starts - also search for d144 - Python, I know, uses that definition for matching
 
It's a great insomnia cure :)
 
you mean the chapters in this page? unicode.org/versions/Unicode12.1.0
yes, I saw the same pdf, it's written in wookie I think
 
2:15 PM
its written in character and lexical speak.....so basically, yes :)
 
Yes, D144 A string X is a caseless match for a string Y if and only if:
toCasefold(X) = toCasefold(Y)
 
yep, the next paragraph explains why normalization is needed and that you cannot just compare the binary results
 
so which means
>>> 'ß'.upper()
'SS'
>>> 'ß'.lower()
'ß'
>>> 'ß'.upper().casefold() == 'ß'.lower().casefold()
True
wow, I guess that's enough of unicode for today! The PDF reminds me reading a computer science textbook in my college
 
even funnier:
>>> 'ß'.casefold()
'ss'
>>> 'ss'.casefold()
'ss'
>>> 'ß'.casefold() == 'ss'.casefold()
True
 
huh, i get 'ss' for 'ss'.casefold()
 
2:21 PM
yeah, I wasn't copying and pasting x-x
 
is there an actual rule at work her, or is ß just being weird?
I'm not sure any more ._.
 
@JGreenwell huh! so on the first two lines, printing them seems to yield different results visually, but there is something going under the hood for ==
 
what I can say is (from when I do multi-language stuff) is if you really want to compare strings: convert them to utf-8 then compare those
 
@Arne Arne, what is that character called in german btw?
 
@Arne the answer is yes.
 
2:23 PM
pronounced "ES-TSETT"
it's a ligature of the characters s and z
@ParitoshSingh I knew it! >:(
 
yes, google translate converts to Scheiße to Scheisse which shows es-tsett converting to ss
 
but you had two questions here? is the answer yes for both or only for one :P
 
technically this one shouldn't be a problem (and I don't see it being a problem on my system). Also, technically Python 3 should have everything as unicode already and thereby "just work" but there are some fun exceptions like ñ (which in some languages doesn't have and upper case, in others it does & Python defaults to "it does")
It should do this as the other situations are edge cases but I do tend to work with edge cases more than others :)
 
2:39 PM
Yes, I primarily deal with english alphabets where the behaviour is intuitive, but the docs have these statements which trumped me
about casefold and titlecase
But it got cleared as always by the knowledgeable people in Room 6. Thanks again :)
 
ASCII ftw! /me runs...
 
lol, I was brushing on the standard library functions from python docs and stumbled upon these. I guess till i am within limits of ascii, not many surprises will drop by
 
user6568562
re cbg
 
2:55 PM
@JonClements bad dog :P
 
I'm a puppy gosh darnit! :)
you also seriously typoed "cute" there as well... :p
 
is there a backstory here Jon? :P
 
I know, right. where in tarnation did my spellcheck go?
 
it's a special encoding :P
bad -> cute
 
Ahh yes... fairly sure that's in the unicode standard somewhere :p
 
3:03 PM
Any flask folks here? I having trouble with flask-migrate. Anyone who can answer?
 
@DeveshKumarSingh one of them had to be true, so saying "yes" to their or-ed form was the smart route, i guess
but I just looked it up, german got an uppercase ß in 2017, so it's a proper character now. python is just a little slow in adapting it =D
ß-ẞ, can you see the difference?
the left right one is capitalized, btw
 
>>> '\U+1E9E'
'ẞ'
>>> '\U+1E9E'.lower()
'ß'
Python do have it, and the lowercase accordingly matches
 
@Debendra what issue are you having?
 
3:28 PM
Greeting my lords!
 
Is there a reliable way to test whether having imports all on one line, separated by ; is faster than imports on their own line? I'm pretty convinced this is nonsense but there's an OP that has found some resource that apparently suggests this, and a timeit approach feels like it has a lot of potential pitfalls
 
which question?
also if they are doing import * or import module, one way to speed up import is to just import the functions and modules they need, but guess the OP already knows about it?
 
@DeveshKumarSingh Sorry, was walking home. It's not really relevant, I don't think, but this. Maybe I'm misreading the comment
I suspect that the OP misread the advice considering the context of the question, but I'd rather do a reality check on myself before I make another comment asking for a link to the exact resource
 
@roganjosh All that ; allows is multiple statements on the same line, they still get interpreted as if they were on separate lines anyway
 
That's exactly my understanding. They (I think) are saying otherwise based on a guide's advice
 
3:44 PM
I can't see how import a; import b; import c would be different than separate lines, however, I could see that import a, b, c might be able to do something slightly different
so are they talking about ; or , ?
 
I don't know. The question is here and it's a sidetrack (in the comments) from their main issue which is, to me, the idea that Cython is a silver bullet
 
That's exactly were I am. I have optimized MongoDB with Indexing and other stuff, I only have one loop in my python code and I am utilizing skip() + limit(). I have deployed most of the speed up Python 3 techniques, using many of the good built-ins and doing may things on one line this includes the imports. I have also tested: multiprocessing Process and Pool, but things go to 300% CPU on the Ubuntu LTS. — Erik Eriksson 27 mins ago
Doesn't seem they mention ; or , or how are they importing in one line
 
"may things on one line this includes the imports" how do you read that portion? Like I said, it may be my personal reading
 
two ways of reading it which Jon mentioned above both of which violate pep-8
 
The second version doesn't violate PEP8, but yes, I can see my misreading now
 
3:49 PM
aah, second one does violate it, from the pep
Imports should usually be on separate lines:

Yes: import os
     import sys

No:  import sys, os
 
Wait, I'm thinking of from imports. Now I'm thoroughly confused what this guide suggests
 
from is fine, it's the next line which says that
It's okay to say this though:

from subprocess import Popen, PIPE
but from module import * is frowned upon
 
generally yes, but sometimes, it's what you need... remember that pep8 is a guide, not a rule
 
I invented the ; to rationalise the statement. Now the suggestion is that perhaps that code importing modules that explicitly goes against PEP8 might be able to do something to make it faster (since this is all speculation).
 
yeah, you thought too much into that statement :)
 
3:55 PM
Yup. Thanks guys for pushing me back in the right track
 
no worries, how's the search going?
hah!
@DeveshKumarSingh, yes, for example: import sys, gc, traceback, argparse, logging, platform, that's one line. — Erik Eriksson 3 mins ago
 
Ha, it's not even worth asking me for updates at this point; I've entered some kind of Hollyoaks (a crap soap opera here) phase where I really don't know what's going on. I need clarification and the MD was out wed-fri so I'm hoping to catch him on Monday
 
I am using flask blueprint, to manage database migrations I am using alembic.
I have `manage.py` that creates necessary commands for flask.
 
@Debendra why do you have manage.py for Flask? That's from Django
Migrations are handled by flask db migrate, you don't need your own intermediate manage.py
 
manage.py is my own script that created custom command .
*creates
 
4:03 PM
Ok, putting that point aside, what is the issue?
 
models are not detected for migrations.
#!venv/bin/python
from app import create_app
from flask_script import Manager
from extensions import db
from flask_migrate import Migrate, MigrateCommand
import os
from dotenv import load_dotenv

load_dotenv(verbose=True)

app = create_app(os.environ['APP_SETTINGS'])
migrate = Migrate()
migrate.init_app(app, db)

manager = Manager(app)

manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
 
Right, so the blueprints are registered in __init__ in app?
 
yes.
 
Import the models into __init__
 
from flask import Flask
from extensions import db, bcrypt, csrf_protect, login_manager
from .main.routes import main
from .auth.routes import auth
from .sale.routes import sale
from .people.routes import people
from .setting.routes import setting
from .transaction.routes import transaction
from .inventory.routes import inventory
from .report.routes import report


def create_app(environment):
    app = Flask(__name__)
    app.config.from_object(environment)
    db.init_app(app)
    bcrypt.init_app(app)
that is init.py
 
4:07 PM
If you're starting from scratch, your project won't have the imports necessary for flask-migrate to pick up on them. I don't know the exact rules on how it catches imports, but it just won't see your tables in blueprints
Once you import the classes from models into __init__ then flask-migrate should see them
When you register the blueprint, you only import your routes.py file into the __init__ of the blueprint directory. If your routes don't also import from your models.py file, which would happen when you're just trying to create the skeleton of your app, then the tables won't be spotted
 
Importing all those in __init.py__ would be unnecessary i guess. However if I initialize migrate inside create_app factory works fine.
 
Wait, why are you not doing that anyway?
You're initialising everything else inside the app factory, so why not the migration?
from flask_migrate import Migrate

migrate = Migrate()

def create_app(config_class=Config):
    migrate.init_app(app, db, render_as_batch=True)
render_as_batch is specifically for SQLite3
 
Because I don't want to initialize migrate for production. Migrate is solely for administration, using inside the app would be redundant.
 
I definitely don't follow at all
The whole point of migration is to transfer changes on a dev version to a production version
 
I have whole lot custom command for other purpose, so I am aggregating migrate too.
 
4:21 PM
I really don't have a clear idea on what you're doing
 
but migrate is just a cli tool, it is redundant for production. Just like django manage.py it has nothing to do with productions.
 
No, it isn't redundant for production and no it isn't just like manage.py
 
I am curious where flask uses migrate in production?
 
9 mins ago, by roganjosh
The whole point of migration is to transfer changes on a dev version to a production version
If there are no changes to the SQL schema then why are you using flask-migrate?
It tracks changes to your SQL tables; new tables, new columns, or deleted tables/columns. What are you using the tool to do? It's not for data-transfer
 
Yeah gotcha. But initializing migrate in main app wouldn't be extra work, (memory allocations, processing, etc)?
 
4:34 PM
Test it. My suspicion is no, and that just acts as a hook for running flask db migrate. It's not some continuous process
And, FWIW, it doesn't sound like you even need it
flask-migrate is a wrapper on Alembic, so you can see exactly what it does there. My Django learning was when I was in a soup of "what the hell is this?" so I can't be concrete on the differences :P But if the schema of the underlying database doesn't change, only things like a relationship or new class attributes, you don't need to migrate
 
Of course I need it, My application is performance critical so I am considering to separating from main app.
 
X != Y. That statement is unrelated.
This is totally unclear. You need an MCVE because I can't work out what you're asking at all.
 
Flask is learning curve pain in the ass, I would have used django but I was most familiar with flask in that time. :P
 
The Flask learning curve is a hell of a lot easier, and that's by consensus, not just my opinion
There are also quite a lot of Flask users in this room, including the guy that actually oversees the project. I'm more than happy to help where I can, but this is so abstract and confusing, I can't go further without some example
 
Thanks, I really appreciate your willingness effort.
I have question though, is db.JSON acts same as sqlalchemy.dialects.postgresql.JSON.?
 
5:01 PM
For my own curiosity, why do you thank me for my willingness to help, then just change to a different topic despite me asking multiple times for some example?
 
5:11 PM
@DeveshKumarSingh "I know, but I do not care about PEP-8." :P
 
@wim That was a joke, right?
-
@roganjosh I'd suggest it's a good idea to define a migration for every structural change to the database.
Otherwise, how do you create a database with the same schema from nothing?
 
You can't. But a relationship is not a structural change
@holdenweb read the discussion from Debendra too. IMO, and correct me if I'm wrong, it's an abstract issue and when I've tried to pin them down, they changed the topic
 
@roganjosh yeah, I lost all my will to help them after this
 
@roganjosh "Ooh, shiny!" I understand.
"Migrations aren't needed in production" was a clear sign of misunderstanding.
But I still maintain adding a relationship is a structural change (unlike the addition of an index).
Don't see how you could have been more helpful there.
 
5:23 PM
An actual structural change? Perhaps I've misunderstood relationship but I don't think it can ever touch the schema
 
It's a part of the schema! Relationships can be introspected just like table structures. Whny wouldn't youi incliude them in migrations?
Assuming, of course, that we agree that migrations are to allow controlled changes to multiple database, maintaining the same relational structures in both.
 
That's the ORM linkage? It doesn't change the database?
 
I suspect I'm talking about pure relational systems and you're talking about alembic migrations, or something like that
 
I think so :)
An SQLAlchemy relationship, as I understand it, cannot change the actual structure of the DB. The indices and foreign keys are set. But I'm open to being proven wrong
 
Most of what I know about migrations I've learned by refactoring databases.
"Refactoring Databases" by Ambler and Sadalage lists "Add foreign key constraint" as such a refactoring. Migrations allow you to apply refactorings in a controlled manner. But I'm not an authority, and terminology in this area isn't always precise or agreed univeresally.
 
5:35 PM
The use-case of the OP may have opened some doors for what I need to research because I can conceive of multiple migration paths to follow, but it didn't come to pass
If the app factory is to run tests on something you might want to push from dev to production then I don't see the need to have different migrations, one db just happens to be ahead
 
@roganjosh the relationship is just a join based on the schema (w/SQLAlchemy) so you are correct that it doesn't alter it just uses it
note you can use methods like relationship(Entry, ...., post_update=True) to say "update this linkage after insert" but you have to explicitly enable them (which is always too manual for me to use with a migration plan when I have to do that)
also should be noted, that the SQLAlchemy author also maintains Alembic which is explicitly for migrations (and is probably why SQLAlchemy kinda dodges them in areas)
 
I'm currently researching post_update=True :)
 
5:51 PM
that's the one I remember off the top of my head and the main one (I swear there was another one though......meta_post with PostgreSQL maybe)
 
"this indicates that the relationship should be handled by a second UPDATE statement after an INSERT or before a DELETE. Currently, it also will issue an UPDATE after the instance was UPDATEd as well, although this technically should be improved. "
Such a complex library :/
 
00:00 - 18:0018:00 - 21:00

« first day (3206 days earlier)      last day (1758 days later) »